FTBFS with ld --as-needed

Bug #685551 reported by Matthias Klose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
shogun (Debian)
Fix Released
Unknown
shogun (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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?

Tags: python27
Revision history for this message
Matthias Klose (doko) wrote :

fixed in 0.9.3-4ubuntu5

Changed in shogun (Ubuntu):
status: New → Fix Released
Changed in shogun (Debian):
status: Unknown → New
Changed in shogun (Debian):
status: New → Fix Committed
Changed in shogun (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.