#40692 closed defect (fixed)
p5.12-perlmagick fails to build on 10.5/ppc (-fopenmp)
Reported by: | danielluke (Daniel J. Luke) | Owned by: | astricker@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.0 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | p5-perlmagick |
Description
With #40447 fixed, I upgraded ImageMagick on my 10.5/ppc system, but p5.12-perlmagick failed to build with:
:info:build cc1: error: unrecognized command line option "-fopenmp"
As a quick hack, I edited the Main.PL files in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/p5.12-perlmagick/work/ImageMagick-6.8.7-0/PerlMagick that had -fopenmp and removed it (which allowed the build to succeed).
I'll attach my main.log for reference.
Attachments (1)
Change History (10)
Changed 11 years ago by danielluke (Daniel J. Luke)
comment:1 Changed 11 years ago by astricker@…
Obviously your 10.5 ppc system doesn't support OpenMP. It should be deactivated by adding configure.args-append --disable-openmp
in configure phase. But this should only be applied to ppc architecture.
I've found the following solution:
--- a/graphics/ImageMagick/Portfile +++ b/graphics/ImageMagick/Portfile @@ -112,6 +112,10 @@ test.run yes test.target check test.env DYLD_LIBRARY_PATH=${worksrcpath}/magick/.libs +platform darwin ppc { + configure.args-append --disable-openmp +} + variant graphviz description {Support Graphviz} { depends_lib-append path:bin/dot:graphviz configure.args-delete --without-gvc
Can you apply this to your Portfile and check if it works?
comment:2 Changed 11 years ago by danielluke (Daniel J. Luke)
I can try it, but FYI - ImageMagick installs fine, it's p5.12-perlmagic that has -fopenmp and fails to install.
comment:3 Changed 11 years ago by astricker@…
Woops, my fault. Of course it's not the ImageMagick Port but the p5-perlmagick port. But as they build from the same source it looks similar:
--- a/perl/p5-perlmagick/Portfile +++ b/perl/p5-perlmagick/Portfile @@ -33,6 +33,10 @@ distname ${my_name}-${version} checksums rmd160 90032fae2b82155e80daed94f6556fc7de566845 \ sha256 2b9c4097c727a25ffe1523d8158feea2d50517061e047f1ccbd8a11d531e132e +platform darwin ppc { + configure.args-append --disable-openmp +} + if {${perl5.major} != ""} { depends_lib-append port:ImageMagick
Can you try this and ignore the first post from tomorrow when it really was too early in the morning?
comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
The correct wording would be platform darwin powerpc
. However we may need to instead check build_arch or universal_archs.
Note that we have several other tickets open about ImageMagick requesting that OpenMP be either enabled or disabled. Currently ImageMagick decides for itself when OpenMP should be used, and it varies at least by compiler and possibly OS version.
comment:5 Changed 11 years ago by astricker@…
The we may introduce an user variant to enable openmp and keep it disabled by default?
comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
I'm not sure yet whether I'll want it on or off by default. But yes, I think making the ImageMagick portfile control openmp is a good idea. See the other tickets.
As for p5-perlmagick, I'm surprised it cares or needs to know. Can't I just always tell p5-perlmagick to disable openmp? Would that be a problem?
comment:7 Changed 11 years ago by astricker@…
I don't see either why p5-perlmagick needs openmp. So I guess disabling it always is the best solution.
comment:8 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ok, let's try that. r111988
comment:9 Changed 11 years ago by danielluke (Daniel J. Luke)
I can confirm that this fixes it on m 10.5/ppc machine.
Build failure on 10.5/ppc