Summary: | sci-misc/boinc-5.2.14 to fails build with CFLAGS containing -funroll-loops | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Darragh Bailey <daragh.bailey> |
Component: | Current packages | Assignee: | Tomáš Chvátal (RETIRED) <scarabeus> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sci |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch to boinc configure script to allow cflags with -l in the middle to work. |
Description
Darragh Bailey
2006-07-07 17:14:46 UTC
ok, I dug into this and have isolated the problem. In the config.log output from the test line configure:22065: checking for shmget in dynamic library cygipc and onwards the flag -funroll-loops has been messed up to be just -funroll which is an invalid option to gcc and results in a large number of subseqent tests in failing. Previous test to that is: configure:21307: checking for curl_free This changes LDFLAGS for all subsequent tests CURL_LIB_PATHS=`echo $LIBCURL | sed 's/-l[^ ]*//g'` LDFLAGS="$CURL_LIB_PATHS $LDFLAGS" Working back through the configure script the CURL_LIB_PATHS appears to resolve to CURL_LIB_PATHS=`/usr/bin/curl-config --libs | sed 's/-l[^ ]*//g'` running the curl-config command on my machine returns the following # /usr/bin/curl-config --libs -L/usr/lib64 -lcurl -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll-loops -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz passing it through the sed command returns the following. -L/usr/lib64 -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll which is clearly wrong. it basically is trying to remove all the items of -l*, the problem is that it doesn't do this in a manner to make sure that its only applying to full flags. i.e it should not remove the -loops part of the cflag --funroll-loops. This means that it will break where any cflag is used that follows the form .*-l.* which is clearly wrong. Changing the sed command to read sed 's/[^[a-zA-Z]]*-l[^ ]*//g' appear to work fine, and I believe should work for any case where -l occurs in the middle of a flag, or a -l.* pattern occurs at the start of the list (unlikely anyway). Will attach a patch to fix the problem later. Created attachment 91179 [details, diff]
patch to boinc configure script to allow cflags with -l in the middle to work.
changed the sed option to be just the following instead.
sed 's/ \+-l[^ ]*//g'
If it needs to strip -l options from the start the whole command can be changed to
sed -e 's/ \+-l[^ ]*//g' -e 's/^-l[^ ]* //'
I don't see an easy way to combine those properly
I'll submit a patch to the boinc project for the configure.ac script so that this gets fixed upstream as well.
Please, post the following info to Bug 139662. - portage, gcc-config and eselect-compiler versions - the output of `eselect compiler show` and `gcc-config -c` Thanks. I thought the original summary was far better, and so have changed it back. I am going to be bumping boinc and will test this. I personally do not use -funroll-loops but this bug should certainly be fixed so I will keep an eye out for it. Thanks for your work on this - I will see what I can get done on it today. The fix for this was finally committed to the boinc development tree http://boinc.berkeley.edu/trac/changeset/13919 # ChangeLog for sci-misc/boinc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.45 2009/01/02 20:40:21 cryos Exp $ 02 Jan 2009; Marcus D. Hanwell <cryos@gentoo.org> metadata.xml: Removed myself as maintainer. Fixed by upstream in meantime, so only version in the tree has the fix. |