Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293024 - sci-misc/boinc-6.10.18 fails to build with -Wl,--as-needed
Summary: sci-misc/boinc-6.10.18 fails to build with -Wl,--as-needed
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tomáš Chvátal (RETIRED)
URL: http://boinc.berkeley.edu/trac/ticket...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-13 13:44 UTC by Martin von Gagern
Modified: 2009-11-29 13:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Change library order (gentoo293024.patch,811 bytes, patch)
2009-11-13 14:33 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-11-13 13:44:00 UTC
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
Comment 1 Martin von Gagern 2009-11-13 13:57:54 UTC
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.
Comment 2 Martin von Gagern 2009-11-13 14:33:35 UTC
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.
Comment 3 Martin von Gagern 2009-11-13 14:39:53 UTC
Reported upstream: http://boinc.berkeley.edu/trac/ticket/959
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-14 01:37:57 UTC
Martin, i guess the package should build fine without your patch on --as-needed when you use -server, plz try.
Comment 5 Martin von Gagern 2009-11-14 12:22:16 UTC
(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.
Comment 6 Martin von Gagern 2009-11-14 12:25:11 UTC
(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.
Comment 7 Martin von Gagern 2009-11-14 12:31:27 UTC
(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!
Comment 8 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-29 13:29:15 UTC
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