Menu

#15 -rpath hardcoding causes build to fail on various systems

closed
nobody
None
5
2009-01-27
2003-07-30
Anonymous
No

Hard coding the -rpath option to libtool causes symbol
referencing errors as below. I removed all -rpath
options from various Makefiles whenever I had a symbol
reference error and the library compiled without a
problem. I had this problem on a Slackware Linux 8.1
system, a Solaris 9 system, and a Solaris 8 system.
There was no problem compiling on a Slackware 9.0
system. The Slack 9.0 and the Solari had gcc 3.2.2,
the Slack 8.1 had gcc 2.95.3.
An example of the error is below:

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I../../include
-I../../libltdl -g -O2 -MT plstream.lo -MD -MP -MF
.deps/plstream.Tpo -c
plstream.cc -fPIC -DPIC -o .libs/plstream.lo

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I../../include
-I../../libltdl -g -O2 -MT plstream.lo -MD -MP -MF
.deps/plstream.Tpo -c
plstream.cc -o plstream.o >/dev/null 2>&1

mv -f .libs/plstream.lo plstream.lo

/bin/bash ../../libtool --mode=link g++ -g -O2 -o
libplplotcxxd.la -rpath
/usr/local/lib -version-info 8:0:3 -rpath
/usr/local/lib -no-undefined
../../src/libplplotd.la plstream.lo

rm -fr .libs/libplplotcxxd.la .libs/libplplotcxxd.*
.libs/libplplotcxxd.*
/usr/ccs/bin/ld -G -z defs -h libplplotcxxd.so.5 -o

.libs/libplplotcxxd.so.5.3.0 plstream.lo

-R/trash/mmilazzo/plplot-5.2.1/src/.libs
-R/usr/local/lib
-L/trash/mmilazzo/plplot-5.2.1/lib/csa/.libs
../../src/.libs/libplplotd.so -lc
Undefined first referenced

symbol in file

_ZNSt8ios_base4InitD1Ev plstream.lo

_ZNSt8ios_base4InitC1Ev plstream.lo

_ZTVN10__cxxabiv120__si_class_type_infoE plstream.lo

_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
plstream.lo
_ZTVN10__cxxabiv117__class_type_infoE plstream.lo

__gxx_personality_v0 plstream.lo

_ZSt4cerr plstream.lo

ld: fatal: Symbol referencing errors. No output written
to
libs/libplplotcxxd.so.5.3.0

gmake[3]: *** [libplplotcxxd.la] Error 1

gmake[3]: Leaving directory
`/data/trash/mmilazzo/plplot-5.2.1/bindings/c++'
gmake[2]: *** [all-recursive] Error 1

gmake[2]: Leaving directory
`/data/trash/mmilazzo/plplot-5.2.1/bindings'
gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory
`/data/trash/mmilazzo/plplot-5.2.1'
gmake: *** [all] Error 2

Discussion

  • Andrew Ross

    Andrew Ross - 2009-01-27
    • status: open --> closed
     
  • Andrew Ross

    Andrew Ross - 2009-01-27

    Bug related to obsolete autotools build system and now very old compilers.

     

Log in to post a comment.