Package: bobcat
Version: 2.10.01-2
Severity: normal
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty
User: debian-...@lists.debian.org
Usertags: ld-as-needed

with ld --as-needed fails to build with:

gcc -shared -Wl,-z,def,-soname,libbobcat.so.2 -lmilter -L/usr/lib/libmilter -lX11 -lssl -lreadline -o tmp/lib/libbobcat.so.2.10.02 */os/*.o

^^^ the mistake is that shared libraries are placed before the object files on the command line.

chmod -x libbobcat.so.2.10.02
ln -sf libbobcat.so.2.10.02 libbobcat.so.2
ln -sf libbobcat.so.2 libbobcat.so
./build lcgen

and the fails later with ...

g++ --std=c++0x -isystem tmp -o tmp/bin/bobcatlcgen lc/lcgen/main.cc lc/lcgen/o/* -lbobcat -Ltmp/lib/
tmp/lib//libbobcat.so: undefined reference to `OpenSSL_add_all_digests'
tmp/lib//libbobcat.so: undefined reference to `history_length'
tmp/lib//libbobcat.so: undefined reference to `BN_init'
tmp/lib//libbobcat.so: undefined reference to `BN_num_bits'
tmp/lib//libbobcat.so: undefined reference to `BN_exp'
[...]

attached is what I would suspect would fix the problem but it doesn't. any further ideas?
--- bobcat-2.10.01.orig/icmake/libraries
+++ bobcat-2.10.01/icmake/libraries
@@ -34,7 +34,7 @@ void shared_library(string destDir, stri
         libsomajor  = libso + "." + element(0, strtok(g_version, "."));
 
         run(GCC + " -shared -Wl,-z,def,-soname," + libsomajor +
-            g_sharedLibReq + " -o " + destDir + libsoshared + " */os/*.o");
+            " -o " + destDir + libsoshared + " */os/*.o " + g_sharedLibReq);
     
         chdir(destDir);
     

Reply via email to