aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2019-04-05 17:24:06 +0200
committerMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2019-04-05 17:26:16 +0200
commit903f1a13a0c2953d5f556ccdd996d72120188c56 (patch)
tree0e6ddff1367581138c943fce01014219724b2bc8 /sci-biology
parentsci-libs/trilinos: version bump to 12.14.1 (diff)
downloadsci-903f1a13a0c2953d5f556ccdd996d72120188c56.tar.gz
sci-903f1a13a0c2953d5f556ccdd996d72120188c56.tar.bz2
sci-903f1a13a0c2953d5f556ccdd996d72120188c56.zip
sci-biology/ncbi-tools++: set -rpath-link to temp build location
Add more regexps specifying which parts of the test suite should not be compiled at all. We have so far problems with say ncbi-tools++-18.0.0 libs installed in ${EPREFIX}/usr/lib64/ncbi-tools++/ which get picked during linking of a currently emerged package, like ncbi-tools++-22.0.0. That happens due to LDPATH being set through ``` echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}" > ${S}/99${PN} doenvd "${S}/99${PN}" ``` which results in ``` $ cat /etc/env.d/99ncbi-tools++ LDPATH=/usr/lib64/ncbi-tools++ $ ``` and later used during linking of a future version. Some symbols will be resolved by ${EPREFIX}/usr/lib64/ncbi-tools++/ from older version, some probably not. It is confusing to debug the errors popping up during compilation/linking. Aaron Ucko from NCBI proposed: To avoid interference from old installations, please try passing `LDFLAGS=-Wl,-rpath-link,"${S}"_build/lib` to configure, no patches (likely) needed. @kiwifb François Bissey commented with: <quote> LDPATH is used to generate the ld.so.conf.d files. So it is important to have it to be able to find the libraries that are not in a standard path. LDPATH is a Gentoo special. You need to regenerate the cache with ldconfig after installing such a library and such a path. ... $ /usr/bin/x86_64-pc-linux-gnu-g++ -std=gnu++11 -Wl,--verbose -Wl,-rpath,/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0 -Wl,--enable-new-dtags -Wl,-export-dynamic -pthread -Wl,-O1 -Wl,--as-needed -g speedtest.o -L/scratch/var/tmp/portage/sci-biology/ncbi-tools++-22.0.0/work/\ ncbi_cxx--22_0_0_build/lib -lprosplign -lxalgoalignutil -ltaxon1 -lxalgoseq -lxcleanup -lxobjedit -ltaxon3 -lvalid -lvalerr -lproteinkmer -lxblast -lxalgoblastdbindex -lcomposition_adjustment -lxalgodustmask -lxalgowinmask -lseqmasks_io -lseqdb -lblast_services -lxalnmgr -lxobjutil -lxobjread -lvariation -lcreaders -lsubmit -lxnetblastcli -lxnetblast -lblastdb -lscoremat -ltables -lxqueryparse -lxregexp -lncbi_xloader_genbank -lncbi_xreader_id1 -lncbi_xreader_id2 -lncbi_xreader_cache -ldbapi_driver -lncbi_xreader -lxconnect -lid1 -lid2 -lxobjmgr -lgenome_collection -lseqedit -lseqsplit -lsubmit -lseqset -lseq -lseqcode -lsequtil -lpub -lmedline -lbiblio -lgeneral -lxser -lxutil -lxncbi -lxcompress -lz -lbz2 -llzo2 -lz -lnsl -ldl -lpcre -llmdb -lpthread -ldw -ldl -lm -lpthread -o speedtest It cannot find libmlacli.so. Note that there isn’t a `-lmlacli` anywhere in the above line. It is searched for because you are compiling an executable and executable cannot have unresolved symbols. It must in the table of needed libraries for libxobjedit.so libmlacli.so needed by /scratch/var/tmp/portage/sci-biology/\ ncbi-tools++-22.0.0/work/ncbi_cxx--22_0_0_build/lib/libxobjedit.so Because there is no path or possibly a final path in libxobjedit.so that library cannot be found. Two solutions here: 1) add -lmlacli in the compilation line above 2) Precede the whole line with LD_LIBRARY_PATH=/scratch/var/tmp/portage/sci-biology/\ ncbi-tools++-22.0.0/work/ncbi_cxx--22_0_0_build/lib The LDPATH setting probably enabled you to find a previously installed version of the library. François PS: You can pass that analysis upstream because -lmlacli should probably be added by right. </quote> Later François also wrote: <quote> rpath are usually the preferred solution but it is not the end all solution. Looking for LDPATH in your /etc/env.d/ may shock you. In the case of ncbi, adding path is only one of the solution I would consider. I don’t see why they need to install in /usr/lib{,64}/ncbi-tools++ rather than just /usr/lib{,64} in the first place. It is not even versioned to allow several versions installed in parallel. It is not plugins or “modules” or other special kinds of shared objects. Possibly it is some language runtime - at best. Does it use names that could collide easily with something else? May be some of them should be prefixed then. </quote> make[3]: Entering directory '/scratch/var/tmp/portage/sci-biology/\ ncbi-tools++-22.0.0/work/ncbi_cxx--22_0_0_build/build/app/speedtest' Updating dependency information for /scratch/var/tmp/portage/sci-biology/\ ncbi-tools++-22.0.0/work/ncbi_cxx--22_0_0/src/app/speedtest/speedtest.cpp. /usr/bin/x86_64-pc-linux-gnu-g++ -std=gnu++11 -c -Wall -Wno-format-y2k -pthread -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize -fPIC -g -D_DEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_MT -D_REENTRANT -D_THREAD_SAFE -I/scratch/var/tmp/portage/sci-biology/ncbi-tools++-22.0.0/work/\ ncbi_cxx--22_0_0_build/inc -I/scratch/var/tmp/portage/sci-biology/ncbi-tools++-22.0.0/work/\ ncbi_cxx--22_0_0/include /scratch/var/tmp/portage/sci-biology/ncbi-tools++-22.0.0/work/\ ncbi_cxx--22_0_0/src/app/speedtest/speedtest.cpp -o speedtest.o /usr/bin/x86_64-pc-linux-gnu-g++ -std=gnu++11 -Wl,-rpath,/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0 -Wl,--enable-new-dtags -Wl,-export-dynamic -pthread -Wl,-O1 -Wl,--as-needed -g speedtest.o -L/scratch/var/tmp/portage/sci-biology/ncbi-tools++-22.0.0/work/\ ncbi_cxx--22_0_0_build/lib -lprosplign -lxalgoalignutil -ltaxon1 -lxalgoseq -lxcleanup -lxobjedit -ltaxon3 -lvalid -lvalerr -lproteinkmer -lxblast -lxalgoblastdbindex -lcomposition_adjustment -lxalgodustmask -lxalgowinmask -lseqmasks_io -lseqdb -lblast_services -lxalnmgr -lxobjutil -lxobjread -lvariation -lcreaders -lsubmit -lxnetblastcli -lxnetblast -lblastdb -lscoremat -ltables -lxqueryparse -lxregexp -lncbi_xloader_genbank -lncbi_xreader_id1 -lncbi_xreader_id2 -lncbi_xreader_cache -ldbapi_driver -lncbi_xreader -lxconnect -lid1 -lid2 -lxobjmgr -lgenome_collection -lseqedit -lseqsplit -lsubmit -lseqset -lseq -lseqcode -lsequtil -lpub -lmedline -lbiblio -lgeneral -lxser -lxutil -lxncbi -lxcompress -lz -lbz2 -llzo2 -lz -lnsl -ldl -lpcre -llmdb -lpthread -ldw -ldl -lm -lpthread -o speedtest /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/\ bin/ld: warning: libmlacli.so, needed by /scratch/var/tmp/portage/\ sci-biology/ncbi-tools++-22.0.0/work/ncbi_cxx--22_0_0_build/lib/\ libxobjedit.so, not found (try using -rpath or -rpath-link) The problem here is that the rpath would have to be provided when you link libxobjedit.so. I checked the log and it wasn’t done. And you definitely don’t want to do that unless you re-link without the rpath (or the correct final rpath) at install time. For information cmake does exactly that. But in the end adding a path in this case is no substitute to providing the libraries you need. When building stuff with libtool, libtool produces test scripts that set LD_LIBRARY_PATH properly for running the tests before install. So the test executables don’t have to be linked with rpath to the build folder. Or the objects that you want to ship either. </quote> This change will ensure `LDFLAGS=-Wl,-rpath-link,"${S}"_build/lib` is passed to `bash ./src/build-system/configure` in `src_configure()` and at least helps to get symbols resolved during linking although it is probably still far from ideal. Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt4
-rw-r--r--sci-biology/ncbi-tools++/ncbi-tools++-22.0.0.ebuild11
2 files changed, 12 insertions, 3 deletions
diff --git a/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt b/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt
index 8df346f64..fa27aa13b 100644
--- a/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt
+++ b/sci-biology/ncbi-tools++/files/disable-testsuite-compilation.txt
@@ -2,3 +2,7 @@
-.*/test
-.*/unit_test
-.*/unit_tests
+-dbapi/driver/ftds.*/freetds/.*/unittests
+-sample
+-.*/demo
+-.*/samples
diff --git a/sci-biology/ncbi-tools++/ncbi-tools++-22.0.0.ebuild b/sci-biology/ncbi-tools++/ncbi-tools++-22.0.0.ebuild
index 971789fb4..0c0e1b24c 100644
--- a/sci-biology/ncbi-tools++/ncbi-tools++-22.0.0.ebuild
+++ b/sci-biology/ncbi-tools++/ncbi-tools++-22.0.0.ebuild
@@ -289,11 +289,11 @@ src_configure() {
# copy optimization -O options from CXXFLAGS to DEF_FAST_FLAGS and pass that also to configure
# otherwise your -O2 will be dropped in some subdirectories and replaced by e.g. -O9
- einfo "bash ./src/build-system/configure --srcdir="${S}" --prefix="${EPREFIX}/usr" --libdir=/usr/lib64 ${myconf[@]}"
+ einfo "LDFLAGS=-Wl,-rpath-link,"${S}"_build/lib bash ./src/build-system/configure --srcdir="${S}" --prefix="${EPREFIX}/usr" --libdir=/usr/lib64 ${myconf[@]}"
# ECONF_SOURCE="src/build-system" \
# econf \
- bash \
+ LDFLAGS=-Wl,-rpath-link,"${S}"_build/lib bash \
./src/build-system/configure \
--srcdir="${S}" \
--prefix="${EPREFIX}/usr" \
@@ -342,7 +342,7 @@ src_compile() {
# .../status/.dbapi_driver.dep or .../build/Makefile.flat.)
#
# To take full advantage of --with-flat-makefile, you'll need the following (instead of 'emake all_p -C "${S}"_build/build') and call configure --with-flat-makefile:
- emake -C "${S}"_build/build -f Makefile.flat
+ LDFLAGS=-Wl,-rpath-link,"${S}"_build/lib emake -C "${S}"_build/build -f Makefile.flat
#
# >=gcc-5.3.0 is not supported, see also bug #579248#c8
# configure: error: Do not know how to build MT-safe with compiler /usr/bin/x86_64-pc-linux-gnu-g++ 5.3.0
@@ -351,6 +351,11 @@ src_compile() {
src_install() {
rm -rvf "${S}"_build/lib/ncbi || die
emake install prefix="${ED}/usr" libdir="${ED}/usr/$(get_libdir)/${PN}"
+ #
+ #if [ ! use static-libs -a ! use static ]; then
+ # rm -f "${ED}/usr/$(get_libdir)/${PN}"/*.a \
+ # "${ED}/usr/$(get_libdir)/${PN}"/*-static.a || die
+ #fi
# dobin "${S}"_build/bin/*
# dolib.so "${S}"_build/lib/*so*