On Thu, Dec 18, 2008 at 11:53:21AM -0800, termdex wrote: > So I've just installed 2008.11 and tried to see if GCC 4.3.2 would compile. I > had problems last time I tried on Solaris 10. > > No problem building GCC 4.3.2. > > user at os2k8:~$ gcc -v > Using built-in specs. > Target: i686-pc-solaris2.11 > Configured with: ../gcc-4.3.2/configure --prefix=/usr/local/gcc-4.3.2 > --build=i686-pc-solaris2.11 --with-as=/usr/sfw/bin/gas --with-gnu-as > --with-ld=/usr/sfw/bin/gld --with-gnu-ld --enable-languages=c,c++ > --enable-shared --with-gmp=/usr/local --with-mpfr=/usr/local > Thread model: posix > gcc version 4.3.2 (GCC) > > However, when I try to build something else (BerkeleyDB) 'gld' gives me > errors. > > cc -o .libs/db_verify .libs/db_verify.o .libs/util_cache.o .libs/util_sig.o > ./.libs/libdb-4.2.so -Wl,--rpath -Wl,/usr/local/BerkeleyDB.4.2/lib > /usr/sfw/bin/gld: warning: libgcc_s.so.1, needed by ./.libs/libdb-4.2.so, not > found (try using -rpath or -rpath-link) > > And yes, I've created symbolic links to /usr/local/bin and cc from the > install directory. 'which cc' points to the correct /usr/local/bin/cc and not > /usr/gnu/bin/cc. > > I've tried setting LDFLAGS='-rpath /usr/local/lib:/lib:/usr/lib' and also > with '-L' prior to 'configure' and 'make' but that makes no difference. Same > with setting LD_LIBRARY_PATH, just as something to try. > > Obviously, I've run 'crle' to include /usr/local/lib.
The gcc installation is probably putting libgcc_s.so.1 in /usr/local/gcc-4.3.2/... and then not adding that path to the linker command line it's invoking. The latter seems like a straight bug. You should be able to test this by finding that library and adding -L and -R options for that location. Of course, one also has to wonder why you're using GNU ld when the Solaris linker is head and shoulders above anything else out there. Won't necessarily fix this problem if gcc isn't giving it the right arguments, but it's entirely possible that gcc's OS-dependent configuration for Solaris with Solaris ld is correct and the config for Solaris with GNU ld is not. -- Keith M Wesolowski "Sir, we're surrounded!" Fishworks "Excellent; we can attack in any direction!"
