Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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).
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 (?).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.