OS: Gentoo slibtool: 5cfb110 GNU libtool: 2.4.7
Gentoo
2.4.7
After implementing -dlpreopen it become possible to run the GNU libtool testsuite using slibtool. Some of these seem like slibtool bugs.
-dlpreopen
30: deplibs_check_method FAILED (demo.at:469)
rdclibtool --tag=CC --mode=link gcc -g -O2 -no-undefined -rpath /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib -o libhell1.la hell1.lo -L. -lhell0 rdclibtool: lconf: {.name="libtool"}. rdclibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/tmp/libtool-2.4.7/tests/testsuite.dir/030"}. rdclibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 29, .st_ino = 408672}. rdclibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rdclibtool: lconf: found "/tmp/libtool-2.4.7/tests/testsuite.dir/030/libtool". rdclibtool: link: ln -s libhell1.so.def .libs/libhell1.so.def.linux rdclibtool: link: ln -s libhell1.so.def.linux .libs/libhell1.so.def.host rdclibtool: link: ln -s /dev/null .libs/libhell1.a.disabled rdclibtool: link: ln -s /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib .libs/libhell1.so.slibtool.rpath rdclibtool: link: ar -crs .libs/libhell1.expsyms.a .libs/hell1.o rdclibtool: link: gcc .libs/hell1.o -g -O2 -L./.libs -lhell0 -shared -fPIC -Wl,--no-undefined -Wl,-soname -Wl,libhell1.so.0 -o .libs/libhell1.so.0.0.0 /usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-musl/bin/ld: cannot find -lhell0: No such file or directory collect2: error: ld returned 1 exit status rdclibtool: error logged in slbt_exec_link_create_library(), line 364: flow error: unexpected condition or other. rdclibtool: < returned to > slbt_exec_link(), line 400.
$ file ./libhell0.a ./libhell0.a: current ar archive
Notice how slibtool tries to be smart about -L. -lhell0.
-L. -lhell0
$ tree .libs/ .libs/ ├── hell1.o ├── libhell1.a.disabled -> /dev/null ├── libhell1.exp ├── libhell1.expsyms.a ├── libhell1.so.def.host -> libhell1.so.def.linux ├── libhell1.so.def.linux -> libhell1.so.def ├── libhell1.so.slibtool.deps └── libhell1.so.slibtool.rpath -> /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib
$ ./run ## ----------------------------- ## ## GNU Libtool 2.4.7 test suite. ## ## ----------------------------- ## 30. demo.at:438: testing deplibs_check_method ... libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: linking file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: linking file 'm4/libtool.m4' libtoolize: linking file 'm4/ltoptions.m4' libtoolize: linking file 'm4/ltsugar.m4' libtoolize: linking file 'm4/ltversion.m4' libtoolize: linking file 'm4/lt~obsolete.m4' aclocal -I m4 -I m4 ./demo.at:468: $ACLOCAL -I m4$macro_dir stderr: stdout: ./demo.at:468: $AUTOHEADER stderr: stdout: ./demo.at:468: $AUTOMAKE --add-missing stderr: configure.ac:5: installing 'build-aux/compile' configure.ac:7: installing 'build-aux/config.guess' configure.ac:7: installing 'build-aux/config.sub' configure.ac:4: installing 'build-aux/install-sh' configure.ac:4: installing 'build-aux/missing' stdout: ./demo.at:468: $AUTOCONF stderr: stdout: ./demo.at:468: : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" --disable-static stderr: stdout: checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make LIBTOOL=rdclibtool V=1 sets $(MAKE)... yes checking whether make LIBTOOL=rdclibtool V=1 supports nested variables... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking whether make LIBTOOL=rdclibtool V=1 supports the include directive... yes (GNU style) checking dependency style of gcc... none checking build system type... x86_64-pc-linux-musl checking host system type... x86_64-pc-linux-musl checking how to print strings... print -r checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/x86_64-gentoo-linux-musl/bin/ld -m elf_x86_64 checking if the linker (/usr/x86_64-gentoo-linux-musl/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... 98304 checking how to convert x86_64-pc-linux-musl file names to x86_64-pc-linux-musl format... (cached) func_convert_file_noop checking how to convert x86_64-pc-linux-musl file names to toolchain format... (cached) func_convert_file_noop checking for /usr/x86_64-gentoo-linux-musl/bin/ld -m elf_x86_64 option to reload object files... -r checking for file... file checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... print -r -- checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... : checking if : is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/x86_64-gentoo-linux-musl/bin/ld -m elf_x86_64 -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... yes checking whether a program can dlopen itself... yes checking whether a statically linked program can dlopen itself... no 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... no checking for cos in -lm... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands ./demo.at:469: $as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target stderr: rdclibtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o hell1.lo hell1.c rdclibtool: lconf: {.name="libtool"}. rdclibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/tmp/libtool-2.4.7/tests/testsuite.dir/030"}. rdclibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 29, .st_ino = 408672}. rdclibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rdclibtool: lconf: found "/tmp/libtool-2.4.7/tests/testsuite.dir/030/libtool". rdclibtool --tag=CC --mode=link gcc -g -O2 -no-undefined -rpath /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib -o libhell1.la hell1.lo -L. -lhell0 rdclibtool: lconf: {.name="libtool"}. rdclibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/tmp/libtool-2.4.7/tests/testsuite.dir/030"}. rdclibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 29, .st_ino = 408672}. rdclibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rdclibtool: lconf: found "/tmp/libtool-2.4.7/tests/testsuite.dir/030/libtool". /usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-musl/bin/ld: cannot find -lhell0: No such file or directory collect2: error: ld returned 1 exit status rdclibtool: error logged in slbt_exec_link_create_library(), line 364: flow error: unexpected condition or other. rdclibtool: < returned to > slbt_exec_link(), line 400. make: *** [Makefile:604: libhell1.la] Error 2 stdout: gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o main.o main.c rdclibtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o hell1.lo hell1.c rdclibtool: compile: gcc -I. -DHAVE_CONFIG_H -g -O2 -c hell1.c -DPIC -fPIC -o .libs/hell1.o gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o hello.o hello.c gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o foo.o foo.c rm -f libhell0.a ar cru libhell0.a hello.o foo.o ranlib libhell0.a rdclibtool --tag=CC --mode=link gcc -g -O2 -no-undefined -rpath /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib -o libhell1.la hell1.lo -L. -lhell0 rdclibtool: link: ln -s libhell1.so.def .libs/libhell1.so.def.linux rdclibtool: link: ln -s libhell1.so.def.linux .libs/libhell1.so.def.host rdclibtool: link: ln -s /dev/null .libs/libhell1.a.disabled rdclibtool: link: ln -s /tmp/libtool-2.4.7/tests/testsuite.dir/030/_inst/lib .libs/libhell1.so.slibtool.rpath rdclibtool: link: ar -crs .libs/libhell1.expsyms.a .libs/hell1.o rdclibtool: link: gcc .libs/hell1.o -g -O2 -L./.libs -lhell0 -shared -fPIC -Wl,--no-undefined -Wl,-soname -Wl,libhell1.so.0 -o .libs/libhell1.so.0.0.0 ./demo.at:469: exit code was 2, expected 0 30. demo.at:438: FAILED (demo.at:469) ## ------------- ## ## Test results. ## ## ------------- ## ERROR: 1 test was run, 1 failed unexpectedly. ## -------------------------- ## ## testsuite.log was created. ## ## -------------------------- ##
Gentoo issue: https://bugs.gentoo.org/926365
Fixed.
b5f778b
Metadata Update from @orbea: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.