On 05.12.2010 22:11, Soeren Sonnenburg wrote:
On Sun, 2010-12-05 at 16:56 +0100, Matthias Klose wrote:
Package: shogun
Version: 0.9.3-4
Severity: normal
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty
User: debian-...@lists.debian.org
Usertags: ld-as-needed

I didn't debug the build system too much, a build with ld --as-needed fails 
with:

c++ -Xlinker --no-undefined -lm -pthread -lhdf5 -llapack -lcblas -lglpk -lm
-llzo2 -lz -llzma -L../libshogun -lshogun -shared -L /usr/lib/octave-3.2.4
-loctinterp -loctave -lcruft  -o Classifier.oct Classifier_wrap.cxx.o
sg_print_functions.cpp.o -L../libshogun -lshogun
Classifier_wrap.cxx.o: In function `SWIG_check_num_args':
/build/buildd/shogun-0.9.3/src/octave_modular/Classifier_wrap.cxx:785: undefined
reference to `error(char const*, ...)'
/build/buildd/shogun-0.9.3/src/octave_modular/Classifier_wrap.cxx:783: undefined
reference to `error(char const*, ...)'
Classifier_wrap.cxx.o: In function `octave_swig_ref::operator new(unsigned 
int)':
/build/buildd/shogun-0.9.3/src/octave_modular/Classifier_wrap.cxx:1727:
undefined reference to `octave_allocator::alloc(unsigned int)'
Classifier_wrap.cxx.o: In function
`octave_value_typeinfo::lookup_binary_op(octave_value::binary_op, int, int)':
/usr/include/octave-3.2.4/octave/ov-typeinfo.h:138: undefined reference to
`octave_value_typeinfo::instance'
[further undefined reference messages omitted]

the reason is that objects and local libraries have to appear on the command
line first, like:

c++ -Xlinker --no-undefined -shared \
      -o Classifier.oct \
      Classifier_wrap.cxx.o \
      -L../libshogun -lshogun \
      -lm -pthread -lhdf5 -llapack -lcblas -lglpk -lm -llzo2 -lz -llzma \
      -L /usr/lib/octave-3.2.4 -loctinterp -loctave -lcruft

any hint where to fix this properly?

Shogun generates a .config file upon configure with all the link flags
being in LINKFLAGS, LINKFLAGS_INTERFACE, and PRELINKFLAGS
POSTLINKFLAGS .

And linking takes place in Makefile.template with the PRE / LINKFLAGS /
POSTLINKFLAGS.

So the fix should be to modify configure and replace LINKFLAGS_OCTAVE
with POSTLINKFLAGS_OCTAVE in this section:

some more changes were required. a really "interesting" build system.

patch at
http://launchpadlibrarian.net/60267720/shogun_0.9.3-4ubuntu4_0.9.3-4ubuntu5.diff.gz

  Matthias



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to