Hello Dmitri, Please keep the mailing list in Cc: so this information is conserved, thanks.
* Dmitri Chubarov wrote on Mon, May 14, 2007 at 03:27:57PM CEST: > > That's right. The most recent version of libtool handles > AC_LIBTOOL_PROG_COMPILER_PIC with Sun 5.9 C/C++ compilers correctly. > > Although, there was one failed test: > 29: C++ subdir-objects FAILED (am-subdir.at:160) > > I attach the testsuite.log Thanks. I quote below the interesting part of the log. The line containing RUNPATH gives a clue. Please post (from the build tree) the output of ./libtool --tag=CXX --config cat tests/testsuite.dir/29/subdir/subdemo Are you using Gentoo? Alternatively, which ld is used by sunCC, and why does it have different hardcoding characteristics as suncc? The former seems to set only DT_RPATH, while the latter also sets DT_RUNPATH. (I think `sunCC -v' should cause verbose output; otherwise, try `-#'). Let's see cd tests/testsuite.dir/29 /bin/sh ./libtool --tag=CXX --mode=link sunCC -v -g -o subdir/subdemo subdir/main.o subdir/libsub.la -ldl Libtool currently assumes that the different compilers (C, C++, Fortran) it was configured for have the same behavior wrt. the setting of shlibpath_overrides_runpath. It seems that is not the case for you. I wonder whether we need to make this a per-tag variable. :-/ Thanks, Ralf [...] > am-subdir.at:158: CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options > stderr: > stdout: > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking for gcc... suncc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... no > checking whether suncc accepts -g... yes > checking for suncc option to accept ANSI C... none needed > checking for style of include used by make... GNU > checking dependency style of suncc... none > checking whether suncc and cc understand -c and -o together... yes > checking whether we are using the GNU C++ compiler... no > checking whether sunCC accepts -g... yes > checking dependency style of sunCC... none > checking how to run the C++ preprocessor... sunCC -E > checking build system type... x86_64-suse-linux > checking host system type... x86_64-suse-linux > checking for a sed that does not truncate output... /usr/bin/sed > checking for egrep... grep -E > checking for fgrep... grep -F > checking for non-GNU ld... /usr/bin/ld -m elf_x86_64 > checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes > checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B > checking the name lister (/usr/bin/nm -B) interface... BSD nm > checking whether ln -s works... yes > checking the maximum length of command line arguments... 32768 > checking whether the shell understands some XSI constructs... yes > checking whether the shell understands "+="... yes > checking for /usr/bin/ld -m elf_x86_64 option to reload object files... -r > checking how to recognize dependent libraries... pass_all > checking for ar... ar > checking for strip... strip > checking for ranlib... ranlib > checking command to parse /usr/bin/nm -B output from suncc object... ok > checking how to run the C preprocessor... suncc -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking for dlfcn.h... yes > checking whether we are using the GNU C++ compiler... (cached) no > checking whether sunCC accepts -g... (cached) yes > checking dependency style of sunCC... (cached) none > checking how to run the C++ preprocessor... sunCC -E > checking for objdir... .libs > checking for suncc option to produce PIC... -KPIC -DPIC > checking if suncc PIC flag -KPIC -DPIC works... yes > checking if suncc static flag -Bstatic works... no > checking if suncc supports -c -o file.o... yes > checking if suncc supports -c -o file.o... (cached) yes > checking whether the suncc linker (/usr/bin/ld -m elf_x86_64 -m elf_x86_64) > supports shared libraries... yes > checking dynamic linker characteristics... RUNPATH /foo > GNU/Linux ld.so > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... yes > checking whether the sunCC linker (/usr/bin/ld -m elf_x86_64 -m elf_x86_64) > supports shared libraries... yes > checking for sunCC option to produce PIC... -KPIC -DPIC > checking if sunCC PIC flag -KPIC -DPIC works... yes > checking if sunCC static flag -Bstatic works... no > checking if sunCC supports -c -o file.o... yes > checking if sunCC supports -c -o file.o... (cached) yes > checking whether the sunCC linker (/usr/bin/ld -m elf_x86_64 -m elf_x86_64) > supports shared libraries... yes > checking dynamic linker characteristics... GNU/Linux ld.so > checking how to hardcode library paths into programs... immediate > configure: creating ./config.status > config.status: creating Makefile > config.status: executing depfiles commands > config.status: executing libtool commands > am-subdir.at:158: $MAKE > stderr: > stdout: > make[4]: Entering directory `/tmp/libtool/build-HEAD/tests/testsuite.dir/29' > source='subdir/sub.cxx' object='subdir/sub.lo' libtool=yes \ > DEPDIR=.deps depmode=none /bin/sh ./depcomp \ > /bin/sh ./libtool --tag=CXX --mode=compile sunCC > -DPACKAGE_NAME=\"subdir-demo\" -DPACKAGE_TARNAME=\"subdir-demo\" > -DPACKAGE_VERSION=\"2.1a\" -DPACKAGE_STRING=\"subdir-demo\ 2.1a\" > -DPACKAGE_BUGREPORT=\"[EMAIL PROTECTED]" -DPACKAGE=\"subdir-demo\" > -DVERSION=\"2.1a\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 > -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 > -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 > -DLT_OBJDIR=\".libs/\" -I. -I. -I./../.. -g -c -o subdir/sub.lo > subdir/sub.cxx > libtool: compile: sunCC -DPACKAGE_NAME=\"subdir-demo\" > -DPACKAGE_TARNAME=\"subdir-demo\" -DPACKAGE_VERSION=\"2.1a\" > "-DPACKAGE_STRING=\"subdir-demo 2.1a\"" -DPACKAGE_BUGREPORT=\"[EMAIL > PROTECTED]" -DPACKAGE=\"subdir-demo\" -DVERSION=\"2.1a\" -DSTDC_HEADERS=1 > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 > -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 > -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I. -I./../.. > -g -c subdir/sub.cxx -KPIC -DPIC -o subdir/.libs/sub.o > libtool: compile: sunCC -DPACKAGE_NAME=\"subdir-demo\" > -DPACKAGE_TARNAME=\"subdir-demo\" -DPACKAGE_VERSION=\"2.1a\" > "-DPACKAGE_STRING=\"subdir-demo 2.1a\"" -DPACKAGE_BUGREPORT=\"[EMAIL > PROTECTED]" -DPACKAGE=\"subdir-demo\" -DVERSION=\"2.1a\" -DSTDC_HEADERS=1 > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 > -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 > -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I. -I./../.. > -g -c subdir/sub.cxx -o subdir/sub.o >/dev/null 2>&1 > /bin/sh ./libtool --tag=CXX --mode=link sunCC -g -o subdir/libsub.la > -rpath /usr/local/lib subdir/sub.lo -ldl > libtool: link: sunCC -G -hlibsub.so.0 -o subdir/.libs/libsub.so.0.0.0 > subdir/.libs/sub.o -ldl -library=Cstd -library=Crun > libtool: link: (cd "subdir/.libs" && rm -f "libsub.so.0" && ln -s > "libsub.so.0.0.0" "libsub.so.0") > libtool: link: (cd "subdir/.libs" && rm -f "libsub.so" && ln -s > "libsub.so.0.0.0" "libsub.so") > libtool: link: sunCC -xar -o subdir/.libs/libsub.a subdir/sub.o > libtool: link: creating subdir/libsub.la > libtool: link: ( cd "subdir/.libs" && rm -f "libsub.la" && ln -s > "../libsub.la" "libsub.la" ) > source='subdir/main.cxx' object='subdir/main.o' libtool=no \ > DEPDIR=.deps depmode=none /bin/sh ./depcomp \ > sunCC -DPACKAGE_NAME=\"subdir-demo\" -DPACKAGE_TARNAME=\"subdir-demo\" > -DPACKAGE_VERSION=\"2.1a\" -DPACKAGE_STRING=\"subdir-demo\ 2.1a\" > -DPACKAGE_BUGREPORT=\"[EMAIL PROTECTED]" -DPACKAGE=\"subdir-demo\" > -DVERSION=\"2.1a\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 > -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 > -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 > -DLT_OBJDIR=\".libs/\" -I. -I. -I./../.. -g -c -o subdir/main.o > subdir/main.cxx > /bin/sh ./libtool --tag=CXX --mode=link sunCC -g -o subdir/subdemo > subdir/main.o subdir/libsub.la -ldl > libtool: link: sunCC -g -o subdir/.libs/subdemo subdir/main.o > subdir/.libs/libsub.so -ldl > libtool: link: creating subdir/subdemo > make[4]: Leaving directory `/tmp/libtool/build-HEAD/tests/testsuite.dir/29' > am-subdir.at:160: subdir/subdemo; lt_status=$?; if test $lt_status -eq 0; > then :; > elif test "X$host" != "X$build" && \ > { test -x "subdir/subdemo" || test -x "subdir/subdemo"$EXEEXT; } > then (exit 77); else (exit $lt_status); fi > --- /dev/null 2006-09-20 23:56:23.000000000 +0700 > +++ /tmp/libtool/build-HEAD/tests/testsuite.dir/at-stderr 2007-05-14 > 20:10:06.000000000 +0700 > @@ -0,0 +1 @@ > +/tmp/libtool/build-HEAD/tests/testsuite.dir/29/subdir/.libs/subdemo: error > while loading shared libraries: libsub.so.0: cannot open shared object file: > No such file or directory > am-subdir.at:160: exit code was 127, expected 0 > 29. am-subdir.at:93: 29. C++ subdir-objects (am-subdir.at:93): FAILED > (am-subdir.at:160) _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool