[Pkg-octave-devel] Bug#310226: octave2.9: FTBFS: linking a shared lib to a static lib fails.
Kurt Roeckx
Kurt Roeckx <kurt@roeckx.be>, 310226@bugs.debian.org
Sun, 22 May 2005 16:23:38 +0200
Package: octave2.9
Version: 2.9.2-2
Severity: serious
Hi,
Your package is failing to build on a few arches (atleast hppa
and amd64) because when you're creating the shared lib you're
linking to a static version. Static version should be compiled
without -fPIC while shared version must be compiled with it.
(See policy section 10.2)
This is giving the following error:
/usr/bin/g++ -shared -o __glpk__.oct pic/__glpk__.o -L../libcruft -lcruft -L../
liboctave -loctave -L. -loctinterp -llapack-3 -lblas-3 -lfftw3 -lamd -lumfpack
-lreadline -lncurses -ldl -lhdf5 -lz -lm -L/usr/lib/gcc-lib/x86_64-linux/3.3.
6 -L/usr/lib/gcc-lib/x86_64-linux/3.3.6/../../../../lib64 -L/usr/lib/gcc-lib/x8
6_64-linux/3.3.6/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtb
egin -lg2c -lm -lgcc_s -lglpk
/usr/bin/ld: /usr/lib/gcc-lib/x86_64-linux/3.3.6/../../../../lib64/libglpk.a(gl
plib2.o): relocation R_X86_64_32 can not be used when making a shared object; r
ecompile with -fPIC
/usr/lib/gcc-lib/x86_64-linux/3.3.6/../../../../lib64/libglpk.a: could not read
symbols: Bad value
collect2: ld returned 1 exit status
There are some solutions for this:
- Ask the glpk maintainer to provide a shared lib. This
is ussually the prefered solution.
- Ask the glpk maintainer to provide a special static pic
(libglpk-pic.a or something) version and link to that
version. This solution ussually isn't want you want.
Kurt