Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I try to compile the dbus 1.4.16 and i get the following error during the configuration:
Code:
checking for accept4... yes
checking abstract socket namespace... no
checking for pkg-config... (cached) /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XML_ParserCreate_MM in -lexpat... no
configure: error: Could not find expat.h, check config.log for failed attempts
I installed expat successfully. The libraries are installed at the following directory:
I think it is a general problem in my linux system that the expat library can not be found.
I did the following thing: In a test folder i created a dummy.c file with the following content:
then the compiler does not complain and the program was successfully compiled. What can I do about this problem? Why should the linker
not find -lexpat?
In your dummy.c, you are able to find the header, in /usr/include/ (NOT /usr/local/include), because that's where it normally lives. What happens when you modify it to /usr/local/include/expat.h ?
However, you have a link-time error without -L, because the compiler is trying to find libexpat in the wrong directory. You can add /usr/local/lib to the config files in /etc/ld.so.conf.d/, if you want to include that path in the library search without an explicit -L flag.
Last edited by jhwilliams; 11-25-2011 at 03:39 AM.
Thank you for your help. I could compile DBus successfully with the following commands:
Code:
export LDFLAGS=-Wl,-L/usr/local/lib,-lexpat
export CPPFLAGS=-I/usr/local/include
./configure
make
make install
It would be interesting why the compiler cannot explicitly find the -lexpat library. As I said, I have a entry in the ld.so.conf file for that and I run the ldconfig command. The ldconfig -p command shows also that the library is in the cache.
What other possibilities are there that the linker (ld) does find the library?
Oh yes, sorry - you did say that earlier (wrt ldconfig.)
Very strange, I'm just not sure. Quite honestly, though, I've run into enough broken configure scripts before that don't respect all of the flags. I wouldn't be surprised if it's just that.
I'm glad the variable exports is a functional workaround for now, at least!
Ok I ignore that at the moment. Maybe it is the toolchain I am using on my embedded device which is running on a ATOM (Intel) architecture. I used the LFS 6.7 Book to compile a fully functional Toolchain. Then i copied this toolchain on the embedded device to compile several diffrent programs. For a webinterface i needed the PHP Zend compiler. Now i need the AVAHI libraries for the mDNS and DNS-SD services. It was a little bit a pain in the *peep* until i figured out how to use the toolchain in a such way. I didn't want to compile the whole gcc & libc stuff again on the embedded device. So for now it is a quite good way with the Toolchain from CHAPTER 5 (LFS BOOK).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.