--- richard@tortoise.demon.co.uk wrote:
Could anyone tell me what I'm doing wrong here?
I'll try :_
I'm still using suse 7.2 and recently I tried installing an application that I think needs a more recent library that comes with the c compiler.
Well, technically if one is compiling from source then the version of gcc that you're using (and hence glibc) is used in compilation so that is never a problem. BUT, if you had used a binary file that was compiled using a version of GLIBC that was greater than 7.2, then it won't work!
So, I got gcc-3.2.tar.gz, putting it into /root/downloads/gcc uncompressing it created: /root/downloads/gcc/gcc-3.2 I made /root/downloads/gcc/objdir and from there did /root/downloads/gcc/gcc-3.2/configure followed by make bootstrap It took almost 12 hours to compile! Then I did make install
Ouch! This is not going to be good.
Now, gcc -v is reporting different versions, depending who I am!
Of course....
If I log on as root, gcc -v reports 3.2
If I log on as an ordinary user and then su to root, gcc -v reports 2.95.3 , reading specs from a different place.
What is happening here is that your library cache is VERY confused as to which libs are which. I'm hoping that after compilation you ran the following: ldconfig that would have updated "/etc/ld.so" which is VERY important. The fact the you compiled GCC and the installed it meant that many of the libs would have gone into: /usr/local/lib so, before running "ldconfig", ensure that the above path is present in the file "/etc/ld.so.conf" and then run "ldconfig" again. One important feature here is the use of $PATH. The reason, I suspect as to why you're getting a mis-match of GCC versions is to do with how $PATH changes between $USER <> "root" and an su'ed account. When you enter a program name at the CL, Bash (or whatever shell you happen to be using) will look in $PATH for that name, but more importantly it'll look for it in the order that the directories are listed in $PATH. You'll notice that if you log in as a non-root user, type: echo $PATH then "su -" (the "-" is important here, as if root is not created a login shell, then $PATH will not change), you'll see a subtle difference. My guess here is that somewhere along the line "/usr/local/bin" is being listed BEFORE "/usr/bin" and causing you problems. Should that be the case (and you want to use the GCC compiled and stored in /usr/local/bin) then you can either: ln -s /usr/local/bin/gcc /usr/bin (BAD idea) or, you can edit: /etc/profile and change the order of the directory listings for $PATH for root or $USER <> "root". I hope that helps? -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/