[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

linking with multiple versions of gcc installed



Hi,

I have an older powerpc machine that is basically running Woody (stable).
   gcc-2.95 installed as the default compiler.
   glibc-2.2 installed as the C libriary.

I have a newer powerpc machine that has Sarge (testing) installed on it.
   gcc-3.3 installed as the default compiler.
   glibc-2.3 installed as the C libriary.
   gcc-2.95 also installed.

The newer machine has mounted the /home directory of the older machine via NFS. My project compiles and links fine on the old macihne using 'gcc' or 'gcc-2.95'.
The new machine fails linking when using 'gcc-2.95' as the invoked command.
   eg. undefined references to '__lib_open@GLIBC_2.0'

BTW, my project is using glibc-2.2.5 which is stored under configuration management. ie. None of the standard libraries or headers _SHOULD_ be used when linking or compiling etc. I am using the -nostdlib switches, etc.

I think the problem is that the file /repository/glibc-2.2.5/usr/lib/libc.so has the following.
   GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
I'm assuming that this causes the local system files to be referenced which is not what I want. I don't want to edit the libc.so as this file is copied to the end product filesystem. Is the correct solution to use -rpath or more likely -rpath-link in my linking commands ???
If so, could some one give me some idea of the best way to use them.

Many thanks,
Brendan Simon.





Reply to: