LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-10-2007, 10:38 PM   #1
quep_fly
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian Etch.
Posts: 27

Rep: Reputation: Disabled
changing include directories - /usr/local/include


So I have been having some troubles installing libvorbis and SDL_mixer (both in order to get the Wesnoth game working) - and it seems as if include files in /usr/local/include are not being found by my compiler. When compiling SDL_mixer, it tells me that a certain variables is undeclared, and I have found this variable to be declared in a libvorbis header file which is installed by libvorbis into /usr/local/include. Is it possible that my compiler is not looking for include files in /usr/local/include? And how can I change this?

Is it safe to simply copy all the include files in /usr/local/include into /usr/include? I have tried stuff like this before, and sometimes it can be very damaging.

Thanks in advance,

Matthew
 
Old 08-10-2007, 10:59 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,720
Blog Entries: 1

Rep: Reputation: 222Reputation: 222Reputation: 222
I've never built Wesnoth, but it probably uses pkg-config to find dependencies. The metadata file for libvorbis will tell Wesnoth where to look for headers. This is the metadata file for libvorbis on my machine.
Code:
# libvorbis pkg-config source file

prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: vorbis
Description: vorbis is the primary Ogg Vorbis library
Version: 1.1.2
Requires: ogg
Conflicts:
Libs: -L${libdir} -lvorbis -lm
Cflags: -I${includedir}
Before or when you execute the configure script for Wesnoth, set the PKG_CONFIG_PATH env variable to include /usr/local/lib/pkgconfig (although it should be a default location).
Code:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
./configure --options
 
Old 08-10-2007, 11:09 PM   #3
quep_fly
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian Etch.
Posts: 27

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply - I appreciate it. But I am not using pkg-config. I am not sure how or if I could do this - as my Linux system has no direct access to the internet. Instead, I am trying to install wesnoth using the source package off its website. But the problem I am actually having, I think, is installing libSDL_mixer and libvorbisfile.

So I think the issue is with where gcc make is looking for include files (?).

Last edited by quep_fly; 08-10-2007 at 11:11 PM.
 
Old 08-10-2007, 11:37 PM   #4
quep_fly
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian Etch.
Posts: 27

Original Poster
Rep: Reputation: Disabled
Okay, I think I'm finding something. I may need a new version of gcc (though I know I have a 3.x version...)

http://gcc.gnu.org/ml/gcc/1999-07n/msg00973.html
 
Old 08-11-2007, 12:27 AM   #5
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,720
Blog Entries: 1

Rep: Reputation: 222Reputation: 222Reputation: 222
pkg-config is a helper utility that is found on most Linux systems.
 
Old 08-11-2007, 02:23 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,092

Rep: Reputation: 299Reputation: 299Reputation: 299
Changing the gcc version probably won't solve the include issue. The compiler looks in certain places for header filer files, e.g. /usr/include and IIRC does not look in /usr/local/include by default. You can do:

export CFLAGS="-I /usr/local/include"

to tell gcc it needs to look in /usr/local/include for headers. However, I've occasionally found CFLAGS to be overwritten by the configure script so there may be another way to pass the include directory to configure (check ./configure --help and see if there is such an option). You are also probably going to need to add /usr/local/lib to your library path assuming there are libraries in that idrectory that need to be linked against. Usually you can append this to your LD_LIBRARY_PATH.
 
Old 08-12-2007, 04:36 PM   #7
quep_fly
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian Etch.
Posts: 27

Original Poster
Rep: Reputation: Disabled
Hi, sorry, I was wrong. I just recompiled a few dependencies, and it started working. I did copy a few include files from /usr/local/include to /usr/include, so this might have been the issue. I will try your advice, in case this was the issue.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
which headers usr/include/ or /usr/include/nptl/? Chris.Rector Linux - Enterprise 0 02-02-2007 01:40 PM
deleted /usr/local/include Ha1f *BSD 3 11-05-2006 08:44 AM
Missing /usr/include/GL/gl.h openfun Ubuntu 1 04-24-2006 10:24 AM
/usr/include/linux contains? alaios Linux - General 4 11-11-2004 10:34 PM
/usr/local/include deleted.... HappyDude Fedora 5 11-02-2004 01:01 PM


All times are GMT -5. The time now is 02:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration