Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 314095 - sci-libs/minuit[openmp]: fails with forced --as-needed
Summary: sci-libs/minuit[openmp]: fails with forced --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: Gentoo Science Related Packages
URL: http://www.gentoo.org/proj/en/qa/asne...
Whiteboard:
Keywords:
: 300672 (view as bug list)
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2010-04-09 12:23 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-07-01 17:11 UTC (History)
3 users (show)

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


Attachments
Build log (hippodraw-1.21.3-r2:20100408-141040.log,211.69 KB, text/plain)
2010-04-09 12:24 UTC, Diego Elio Pettenò (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-09 12:23:51 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-09 12:24:27 UTC
Created attachment 227107 [details]
Build log
Comment 2 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-04-09 16:49:23 UTC
This one is tricky. It's rather problem with libtool.

The linking call:
/bin/sh ../libtool --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++ -fopenmp -O2 -pipe -Wall -fopenmp  -Wl,--as-needed,--hash-style=gnu,-O1 -o libMinuit2.la -rpath /usr/lib64 *.lo

results in:
 x86_64-pc-linux-gnu-g++ -shared -nostdlib *.o (some -L and -l) -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O1   -Wl,-soname -Wl,libMinuit2.so.0 -o .libs/libMinuit2.so.0.0.0

The flag that's missing is -fopenmp and according to GCC manual it _should_ be present during linking, as it brings required libs...
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-05-31 19:26:56 UTC
*** Bug 300672 has been marked as a duplicate of this bug. ***
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-06-02 09:52:10 UTC
Should work now:
+  02 Jun 2010; Kacper Kowalik <xarthisius@gentoo.org> minuit-5.27.02.ebuild,
+  +files/minuit-5.27.02-asneeded.patch:
+  Adding workaround for bug 314095

though be advised that it's not properly fixed. Leaving this bug open.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-07-01 17:11:40 UTC
+  01 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
+  files/minuit-5.27.02-asneeded.patch:
+  Update -Wl,--as-needed patch with OpenMP library finding code from
+  ImageMagick's configure.ac wrt #314095.