Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280642 - sci-libs/mathgl-1.8.1 request gcc to have been build with openmp
Summary: sci-libs/mathgl-1.8.1 request gcc to have been build with openmp
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 11:12 UTC by François Bissey
Modified: 2010-06-30 22:18 UTC (History)
1 user (show)

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


Attachments
Andrey Grozin patch to correct the behavior (mathgl-1.8.1-openmp.patch,759 bytes, patch)
2009-08-07 11:14 UTC, François Bissey
Details | Diff
better patch to enable autoconfiguration of openmp rather than just disabling it. (mathgl-1.8.1-openmp.patch,1.44 KB, patch)
2009-08-12 12:19 UTC, François Bissey
Details | Diff
patch to mathgl-1.8.1.ebuild to include openmp useflag. (ebuild.patch,1.10 KB, patch)
2009-08-12 12:20 UTC, François Bissey
Details | Diff
patch to add the openmp useflag to the ebuild (ebuild.patch,1.13 KB, patch)
2009-09-22 12:20 UTC, François Bissey
Details | Diff
openmp m4 macro (ax_openmp.m4,2.81 KB, text/plain)
2009-09-22 12:21 UTC, François Bissey
Details
patch configure.ac and mgl/Makefile.am to add openmp configurability (mathgl-1.9.0.1-openmp.patch,1.27 KB, patch)
2009-09-22 12:22 UTC, François Bissey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description François Bissey 2009-08-07 11:12:55 UTC
The mathgl makefile hardcode the use of -openmp -lgomp in its makefile
causing the compilation to fails on systems where gcc has been built without
this features (because I have an antique system with only one CPU).
I already reported the problem to the maintainer previously and a patch
is ready to remove the compulsory behavior but was never applied to the tree.
I just stumbled on the issue again.

Reproducible: Always

Steps to Reproduce:
1. USE="-openmp" emerge -v gcc
2. emerge -v mathgl
3. Failure
Comment 1 François Bissey 2009-08-07 11:14:57 UTC
Created attachment 200486 [details, diff]
Andrey Grozin patch to correct the behavior

This is a patch sent to me by the maintainer of mathgl to correct the problem
a few month back.
Comment 2 François Bissey 2009-08-12 12:19:05 UTC
Created attachment 201021 [details, diff]
better patch to enable autoconfiguration of openmp rather than just disabling it.

Patch configure.ac and mgl/Makefile.am - openmp can now be enabled
with --enable-openmp. 
It has to be tested on an openmp enabled machine.
Patched ebuild to follow shortly.
Comment 3 François Bissey 2009-08-12 12:20:02 UTC
Created attachment 201022 [details, diff]
patch to mathgl-1.8.1.ebuild to include openmp useflag.
Comment 4 Sébastien Fabbro (RETIRED) gentoo-dev 2009-08-26 06:55:26 UTC
The patch should not be gcc specific. The user might want to build with another openmp able compiler. See fftw package for an example (or many other openmp packages).
Comment 5 François Bissey 2009-09-22 12:19:20 UTC
OK, after failing miserably at patching 1.8.1 properly as suggested
by bicatali, I managed to do something for version 1.9.
The upgrade to libtool 2.2 helped as it showed why the previous attempt had
failed. So a bit of summary:
I looked at fftw as suggested and used the m4 macro shipped with it as patched 
in the fftw ebuild. I put it in config rather than a m4 folder as it would
conflict with an option in Makefile.am (thanks libtool 2.2).
I followed flameeyes autotool mythbusters guideline to add an openmp configure
option "on" by default so that it would cause minimum disruption for upstream.
I included a detailed compiler check in the ebuild as well.
Patch to follow. 
Comment 6 François Bissey 2009-09-22 12:20:57 UTC
Created attachment 204914 [details, diff]
patch to add the openmp useflag to the ebuild
Comment 7 François Bissey 2009-09-22 12:21:32 UTC
Created attachment 204915 [details]
openmp m4 macro
Comment 8 François Bissey 2009-09-22 12:22:20 UTC
Created attachment 204917 [details, diff]
patch configure.ac and mgl/Makefile.am to add openmp configurability
Comment 9 François Bissey 2009-09-22 12:23:23 UTC
Aaaaa further note I have no openmp enabled machine at the moment, so
it needs testing with one.
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2010-06-30 22:18:50 UTC
No omp support anymore