On Wednesday 2013-12-11 19:14, Greg Freemyer wrote:
suddenly it doesn't compile due to a C++ code issue:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory/sleuthkit...
Is there something in flux in factory and I should just ignore this?
It would seem that libtsk.so is built without having all its dependencies specified. (In short, `ldd -r libtsk.so` returns unresolved symbols.)
See the "Re: [opensuse-packaging] Packages failing to link" thread.
I must be doing this wrong. I did a local build, then a traditional "cd" to the directory where the new libtsk.so is. ldd -r libtsk.so is showing me lots of what looks to me like the normal c++ stuff undefined. What do I need to do before calling ldd -r libtsk.so?
Your linker problem is unrelated to recent factory changes, and the problem is reproducible on plain 13.1 as well, because libtsk is an oddball (that took me some looking-into as well). You can reproduce the issue with the following testcase: # Makefile.am noinst_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = x.cpp lib_LTLIBRARIES = libbar.la libbar_la_SOURCES = libbar_la_LIBADD = libfoo.la # x.cpp #include <iostream> int anyfunc(void) { std::cout << std::endl; return 0; } The C++ linker frontend (CXXLD; g++) implicitly places -lstdc++ on the (raw) linker's command line so that libfoo.so gets properly recorded into libfoo.so (if and when built). However, -lstdc++ never makes it to the static archive's companion file (libfoo.la, which sits in to records dependencies because archives themselves don't), which is because *the linker is never run for them in the first place*. Therefore, whenever linking in a static archive with C++ things, you can get screwed. The workaround is to manually add libtsk_la_LIBADD = -lstdc++ but it feels really really ugly. My recommendation? Abolish make recursion in tsk/, abolish libtsk[a-z]*.la. Have libtsk.la be directly built from all sources, in one go. That also benefits parallel build, because there will no longer be a serialization point. In other words, libtsk_la_SOURCES = base/md5c.c base/mymalloc.c base/sha1c.c ... img/img_open.c img/img_types.c ... vs/... Or have the libtsk sublibraries turned into shared libraries too. Needs adding libtskimg_la_LIBADD=../base/libtskbase.la and similar though. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org