Problems with libraries
I have LFS4.0 on a stand-alone system ( I deleted my base distro). I am slugging my way through the parts of BLFS that I want to install and am running into weird problems, to wit:
1) I have installed libjpeg6b (as per BLFS instructions), however, every program that I install says "checking for libjpeg6b... no". I know that the libraries are there. I have added the directory to ld.so.conf. I have run ldconfig as root. Why is configure not finding it? 2) I am trying to install KDE. Got artsd installed. Then moved on to kdelibs. It, too, cannot find libjpeg6b, but then it says that qt is not installed. I KNOW that qt is installed (as per BLFS instructions), I even went to the directory that qt is in and ran designer. It DID start. $QTDIR is set correctly in my ~/.bash_profile, and $QTDIR/bin is in my path. The library path is set in ld.so.conf (/opt/qt/lib/). Any ideas? 3) So, I said enough of this for now, let's go get a game and have a little fun. I downloaded cube (FPS), and found that I needed SDL libraries. I downloaded it, installed it, and tried to install cube again. It said that I needed SDL_image. I finally found it, installed it (no apparent errors). Tried to install cube again, it STILL says that I need SDL_image. SDL has been installing libraries in /usr/local/lib, and that is in ld.so.conf. I have run ldconfig. What is making all of these libraries invisible to "configure"? |
Another piece to the puzzle:
I went into my .bash_profile and added all of the directories that were in ld.so.conf into the LD_LIBRARY_PATH . Problem #3 went away (well, at least it went further before it bombed out). Problem #2 also went away after doing this. Why would my system require the library directories to be in the LD_LIBRARY_PATH instead of reading them from ld.so.conf? I have LD_LIBRARY_PATH=$LD_LIBRARY_PATH:blah:blah:blah. Any ideas? |
You did do a ldconfig after the install didn't you?
|
Looking for all of those libraries is such a pain, so let your system do it for you:
find /usr -name lib >> /etc/ld.so.conf& /sbin/ldconfig This will at least make sure that all the shared libraries on your system are visible. Bert |
Baloo: yep. Did the ldconfig thing as root.
Bert: that's cool. But the problem remains, that until I put the directories into .bash_profile as an entry in LD_LIBRARY_PATH, the system doesn't see them. However, tonight I will comment out the LD_LIBR... line, and see if the system will work correctly with just the /etc/ld.so.conf I mean, it's working now, but everytime I need to add a directory to ld.so.conf, I have to remember to add it to the .bash_profile, too. |
I think i am having a similar problem with libraries. I compile and install them, but ./configure doesnt seem to recognize them. I check paths in ld.so.conifg but no help. I run ldconfig, but no help.
How do you specify them in .bash_profile or etc/profile (as in my case with slackware)? |
I think that "configure" looks at predetermined places for what it is searching for without caring much of the LD_PATH so for example it is easier to use export before ./configure to tell the program where are somme libraries especially when they are not in/lib /usr/lib or /usr/local/lib. For example with qt in /opt/lib/qt I would do the following for kdelibs:
tar xfvj kdelibs-3.1.tar.bz2 mv kdelibs-3.1 export QTDIR=/opt/lib/qt and then ./configure sometimes you need to export the CFLAGS and CXXFLAGS otherwise they wont be considered if they are only in the .bash_profile.... for some programs where there is no configure you have to take a look at the Makefile and edit it if the path they assume for certains libraries or programs don't correspond to your installation..... |
I've had a similar problem before. It came about because I installed some libraries into /usr/local. I ended up re-installing them, but someone also suggested to me that I export some ldflags before I run configure:
export LDFLAGS="-L/usr/local/lib" I think that this was the command, but since I've never really played around w/ compiler opt's (and I'm at school) I can't verify that for you. Just something to try if you're still stuck. |
All times are GMT -5. The time now is 09:01 PM. |