autoconf
[Top][All Lists]
Advanced

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

libstdc++ on solaris / rpath / gnulib's havelib macros


From: David Byron
Subject: libstdc++ on solaris / rpath / gnulib's havelib macros
Date: Fri, 16 Feb 2007 14:07:49 -0800

I've gotten myself pretty far along with being able to run things without
setting LD_LIBRARY_PATH.  On SunOS 5.9 I'm running into a bit of a strange
problem that I wonder if people have seen before.  I need to specify an
rpath to find libstdc++.so.6 but I'm not sure what the best way is.

First, here's the error I see:

bash-2.05$ ./testrunner -kv
ld.so.1: ./testrunner: fatal: libstdc++.so.6: open failed: No such file or
directory

I think the key here is that when configuring, I change to a non-default C
and C++ compiler by setting these:

CC=/usr/local/tools/sun4u_SunOS/gcc-3.4.4/bin/gcc
CXX=/usr/local/tools/sun4u_SunOS/gcc-3.4.4/bin/g++

It seems like checking to see if a non-default CXX is being used and setting
rpath appropriately would cover it.  Trouble is, I haven't deciphered enough
of AC_LIB_LINKFLAGS_BODY to see how get the appropriate flags for setting
rpath without adding another configure option.  Any chance someone with
sharper m4 skills can help me split AC_LIB_LINKFLAGS_BODY so that the stuff
below the AC_LIB_ARG_WITH invocation is a separate function?

There's lots more detail below if it's helpful.

Thanks.

-DB

bash-2.05$ ls -l /usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/*stdc*
-rw-r--r--   1 sandman  users    7355340 Nov 11  2005
/usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/libstdc++.a
-rwxr-xr-x   1 sandman  users        998 Nov 11  2005
/usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/libstdc++.la
lrwxrwxrwx   1 nobody4  nogroup       18 Nov 11  2005
/usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/libstdc++.so ->
libstdc++.so.6.0.3
lrwxrwxrwx   1 nobody4  nogroup       18 Nov 11  2005
/usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/libstdc++.so.6 ->
libstdc++.so.6.0.3
-rwxr-xr-x   1 sandman  users    5376896 Nov 11  2005
/usr/local/tools/sun4u_SunOS/gcc-3.4.4/lib/libstdc++.so.6.0.3

The relevant part of ldd -s testrunner is:

   find object=libstdc++.so.6; required by testrunner
    search path=/usr/local/tools/sun4u_SunOS/gcc-3.4.4/cppunit-1.8/lib
(RPATH from file testrunner)
    trying
path=/usr/local/tools/sun4u_SunOS/gcc-3.4.4/cppunit-1.8/lib/libstdc++.so.6
    search path=/usr/lib  (default)
    trying path=/usr/lib/libstdc++.so.6
        libstdc++.so.6 =>        (file not found)

My /usr/lib doesn't have any libstdc++ related files in it.  My
/usr/local/lib does though:

bash-2.05$ ls -l /usr/local/lib/*stdc++*
-rw-r--r--   1 root     bin      8562408 Jun 23  2003
/usr/local/lib/libstdc++.a
-rwxr-xr-x   1 root     bin         1069 Jun 23  2003
/usr/local/lib/libstdc++.la
lrwxrwxrwx   1 root     other         18 Aug 12  2005
/usr/local/lib/libstdc++.so -> libstdc++.so.5.0.4
lrwxrwxrwx   1 root     other         18 Aug 12  2005
/usr/local/lib/libstdc++.so.5 -> libstdc++.so.5.0.4
-rwxr-xr-x   1 root     bin      8280728 Jun 23  2003
/usr/local/lib/libstdc++.so.5.0.4

but they're not the right version.

Here's what crle says:

$ crle

Default configuration file (/var/ld/ld.config) not found
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system
default)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]