This feels like a variation on the theme from bug #286771, but I'm still investigating how of it is really the same. libtool: link: i686-pc-linux-gnu-g++ -pthread -march=prescott -O2 -ggdb -O3 -funroll-loops -fforce-addr -ffast-m ath -o .libs/crypt_prog crypt_prog-crypt_prog.o -Wl,--as-needed ../lib/.libs/libboinc.so -L/usr/lib libboinc_cr ypt.a -L/usr -lssl -lcrypto -ldl -lz -pthread libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `check_validity(char const*, char const*, unsigned char *, char*)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:586: undefined reference to `is_file' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:589: undefined reference to `boinc_fope n' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:598: undefined reference to `dir_open(c har const*)' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:601: undefined reference to `dir_scan(char*, __dirstream*, int)' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:606: undefined reference to `dir_close(__dirstream*)' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:611: undefined reference to `dir_close(__dirstream*)' libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `verify_file(char const*, R_RSA_PUBLIC_KEY&, DATA_BLOCK&, bool&)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:337: undefined reference to `md5_file(char const*, char*, double&)' libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `sign_block(DATA_BLOCK&, R_RSA_PRIVATE_KEY&, DATA_BLOCK&)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:299: undefined reference to `md5_block(unsigned char const*, int, char*)' libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `sign_file(char const*, R_RSA_PRIVATE_KEY&, DATA_BLOCK&)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:285: undefined reference to `md5_file(char const*, char*, double&)' libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `cert_verify_file(CERT_SIGS*, char const*, char const*)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:636: undefined reference to `is_file' /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:637: undefined reference to `boinc_fopen' libboinc_crypt.a(libboinc_crypt_la-crypt.o): In function `verify_string(char const*, char const*, R_RSA_PUBLIC_KEY&, bool&)': /var/tmp/portage/sci-misc/boinc-6.10.18/work/boinc-6.10.18/lib/crypt.cpp:385: undefined reference to `md5_block(unsigned char const*, int, char*)' collect2: ld returned 1 exit status make[2]: *** [crypt_prog] Error 1
It's the order which is causing trouble here: ../lib/.libs/libboinc.so has to come after libboinc_crypt.a so that the linker knows what symbols to look for. And it's indeed an issue related to -Wl,--as-needed, as without it, the link succeeds even if the arguments are in the wrong order.
Created attachment 210126 [details, diff] Change library order With this patch in place, I still don't get boinc compiled, but at least I reach the error messages from bug #292784, so I assume it solves the issue I wrote about above.
Reported upstream: http://boinc.berkeley.edu/trac/ticket/959
Martin, i guess the package should build fine without your patch on --as-needed when you use -server, plz try.
(In reply to comment #4) > Martin, i guess the package should build fine without your patch on --as-needed > when you use -server, plz try. It does.
(In reply to comment #5) > (In reply to comment #4) > > without your patch on --as-needed > > It does. Sorry, misread your comment: read "with" instead of "without". Trying now without, but as the lib directory is for clients as well, as far as I understand it, this should affect a client-only build as well. Let's see.
(In reply to comment #4) > Martin, i guess the package should build fine without your patch on --as-needed > when you use -server, plz try. This time for real: works. Dunno why, don't care. Thanks!
Ok since i killed server build i wont apply the patch and just close this. At some point upstream might have some brain and we will introduce the server option back. Anyway i just hope they will apply it and your work didnt go to /dev/null. Cheers