Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 387869 - sci-mathematics/singular-3.1.2-r2 - x86_64-pc-linux-gnu-g++: error: unrecognized option ‘--as-needed’
Summary: sci-mathematics/singular-3.1.2-r2 - x86_64-pc-linux-gnu-g++: error: unrecogni...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 13:10 UTC by Markus Walter
Modified: 2011-12-23 12:50 UTC (History)
2 users (show)

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


Attachments
build log (build.log,291.44 KB, text/plain)
2011-10-20 13:10 UTC, Markus Walter
Details
emerge --info (info.txt,5.40 KB, text/plain)
2011-10-20 13:10 UTC, Markus Walter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2011-10-20 13:10:46 UTC
Created attachment 290363 [details]
build log

On my hardened ~amd64 machine with hardened-gcc 4.6.1 I see the following error when trying to merge sci-mathematics/singular-3.1.2-r2. The error is not present in version 3.1.3.1 (but sage needs ~3.1.2). This is a different error than the other reported compile issue with singular.

x86_64-pc-linux-gnu-g++ -g -pipe -fpic -DPIC -O1 --as-needed -fPIC -shared p_Procs_Lib_FieldZp.dl_og -o p_Procs_FieldZp.sog
x86_64-pc-linux-gnu-g++: error: unrecognized option ‘--as-needed’
make[2]: *** [p_Procs_FieldZp.sog] Error 1
Comment 1 Markus Walter 2011-10-20 13:10:59 UTC
Created attachment 290365 [details]
emerge --info
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2011-10-20 17:02:09 UTC
Hi Markus.  The root of the problem is that the build system passes pure linker options (such as --as-needed without the -Wl, prefix) to gcc.  In fact, the other bug is a consequence of my partial fix (and upstreams terrible make file) I'll bug upstream again.  Can you e-mail to gentoo-science mailing list and ask whether sage really needs 3.1.2?  If yes, they could try to backport the 'fix' to the sage overlay, but I don't recommend it because it leads to other trouble. Heck, I'll cc Francois directly, he knows the sage-singular interface.
Comment 3 François Bissey 2011-10-20 21:21:06 UTC
I'll have to check what sage does now, but by default they are not using LD_FLAGS so that behavior wouldn't be corrected there.

I have build that version of singular for ages without problem. So my guess it is an aspect of hardened. Technically you can use singular-3.1.3.1 with sage 4.7.1.
The only issue is that some tests will break because the normalisation of some results has changed. sage-4.7.2 is coming and it will use singular-3.1.3.3 (you can pick it from the overlay if you want Thomas) I haven't tested it extensively I am afraid but it seems to work.
Comment 4 François Bissey 2011-10-23 01:50:55 UTC
I have softened the dependency on singular in sage-4.7.1 so you should be able to use a later version. You may have to do some unmasking.
Comment 5 Markus Walter 2011-10-23 09:53:33 UTC
Thanks, portage no longer wants to downgrade singular on my machine.
Comment 6 Thomas Kahle (RETIRED) gentoo-dev 2011-12-23 12:50:08 UTC
3.1.3.3 is in tree now.  Please test and let's aim for stable after a suitable waiting time.

+*singular-3.1.3.3 (23 Dec 2011)
+
+  23 Dec 2011; Thomas Kahle <tomka@gentoo.org> +singular-3.1.3.3.ebuild,
+  +files/singular-3.1.3.3-Minor.h.patch,
+  +files/singular-3.1.3.3-os_x_ppc.patch,
+  +files/singular-3.1.3.3.make_parallel.2.patch:
+  Import 3.1.3.3 from sage-on-gentoo. Thanks François Bissey