Opened 8 years ago
Closed 8 years ago
#822 closed defect (fixed)
static_test.sh fails when htslib installed outside runtime linker path
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | minor | Milestone: | yat 0.13 |
Component: | test | Version: | trunk |
Keywords: | Cc: |
Description
The test fails with following log:
+ make g++ -DPACKAGE_NAME=\"hello\" -DPACKAGE_TARNAME=\"hello\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"hello\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hello\" -DVERSION=\"1.0\" -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/\" -DHAVE_YAT=1 -I. -I/home/peterJo/projects/software/yat/htslib -I/home/peterJo/projects/software/yat/htslib/yat/utility -I/home/peterJo/projects/software/yat/htslib/.. -pthread -I/home/peterJo/local/include/ -g -O2 -MT hello.o -MD -MP -MF .deps/hello.Tpo -c -o hello.o hello.cc mv -f .deps/hello.Tpo .deps/hello.Po /bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -all-static -o hello hello.o /home/peterJo/projects/software/yat/htslib/yat/libyat.la -lgslcblas libtool: warning: complete static linking is impossible in this configuration libtool: link: g++ -g -O2 -o hello hello.o /home/peterJo/projects/software/yat/htslib/yat/.libs/libyat.a -L/usr/lib64 -L/home/peterJo/local/lib -lhts -lz -lgsl -lboost_thread-mt -lboost_system -lgslcblas + ./hello ./hello: error while loading shared libraries: libhts.so.1: cannot open shared object file: No such file or directory + exit_fail + warn_ '../test/static_test.sh: failed test: ' + echo ../test/static_test.sh: failed test: ../test/static_test.sh: failed test: + Exit 1 + set +x FAIL test/static_test.sh (exit status: 1)
The problem is that I have libhts installed in ~/local/lib
and the runtime linker has no idea where to find this. The purpose of this test is to create a statically linked binary, so why is even the runtime linker relevant? Well the log also contain this warning from libtool
libtool: warning: complete static linking is impossible in this configuration
which I understand is caused by the fact that not all libraries are available as static archives. I guess it's the boost libraries that only come as *.so
. Without digging into the history of this test, I recall it was created to catch a problem when we linked only to ATLAS
's libcblas and not the underlying libatlas. This in no problem in the dynamic world (rather preferred and dictated by some), but when entering the static world it becomes a problem.
Should we:
1) remove the test as it's not possible to link statically anyway
2) keep the test, but avoid calling the binary
./hello
(to avoid false positive)
3) keep the test but avoid the static linking
#sed -i -e 's,^AM_LDFLAGS =,AM_LDFLAGS = -all-static,' Makefile.am
Change History (2)
comment:1 Changed 8 years ago by
Milestone: | yat 0.x+ → yat 0.13 |
---|
comment:2 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [3394]) remove static_test.sh. The test is identical with yat_m4_test.sh except that libtool is issued with -all-static. fixes #822.