[Debian-med-packaging] Problems linking hdf5, gzstream, boost_program_options due to usage of simple Makefile

Ghislain Vaillant ghisvail at gmail.com
Tue Mar 29 19:47:33 UTC 2016


Hey Andreas

On 29/03/16 20:18, Andreas Tille wrote:
> Hi,
>
> I'm trying to package seer[1] for the Debian Med team.  Upstream provides a
> simple Makefile which is probably the cause why the libraries for linking
> are not found properly so it ends up in
>
> ...
> g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -O3 -std=c++11 -I/nonexistent/software/include -I../gzstream -I../dlib -D DLIB_NO_GUI_SUPPORT=1 -D DLIB_USE_BLAS=1 -D DLIB_USE_LAPACK=1 -Wl,-z,relro  sample.o significant_kmer.o kmer.o covar.o seerCommon.o seerErr.o seerFilter.o seerIO.o seerChiFilter.o seerMain.o seerCmdLine.o seerContinuousAssoc.o seerBinaryAssoc.o logitFunction.o linearFunction.o -lhdf5 -lgzstream -lz -larmadillo -lboost_program_options -llapack -lblas -Wl,-z,relro -o seer
> /usr/bin/ld: cannot find -lhdf5
> /usr/bin/ld: cannot find -lgzstream
> /usr/bin/ld: cannot find -lboost_program_options
> collect2: error: ld returned 1 exit status
>
> Any hint how to elegantly deal with this situation?

For HDF5, you would need to inject an additional LDFLAG with the Debian
path to the HDF5 libraries:

-L/usr/lib/<multiarch-triplet>/hdf5/serial

which you should be able to query with:

pkg-config --libs-only-L hdf5-serial

For Boost, unless you are missing a dependency on
libboost-program-options-dev, I don't get why it cannot be found. The
library is normally located on a standard path for the compiler.

No idea what is gzstream and which package provides it. If you do, you
might want to check whether the package provides a pkg-config file and
use the same trick as HDF5 to inject the library path, assuming it uses
a non-standard one.

Good luck,
Ghis



More information about the Debian-med-packaging mailing list