[MacPorts] #34231: ImageMagick: should not depend on pango + fix openMP
MacPorts
noreply at macports.org
Thu May 3 00:56:09 PDT 2012
#34231: ImageMagick: should not depend on pango + fix openMP
---------------------------------------+------------------------------------
Reporter: frederic.devernay@… | Owner: ryandesign@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.4
Keywords: haspatch | Port: ImageMagick
---------------------------------------+------------------------------------
Comment(by frederic.devernay@…):
OK I just attached the test file from the gcc bug
https://trac.macports.org/attachment/ticket/34231/test.cpp . Compilation
instructions are in the comments of the file.
This file is very short, and very easy to understand: launch a secondary
thread, do some openmp stuff in it. This situation will happen in IM
whenever you call an IM function that may do some OpenMP from a secondary
thread (I always do that, and most image processing software with a GUI
will do that, because the main thread usually handles the GUI).
It consistently crashes in the same function (gomp_resolve_num_threads)
with:
gcc-4.2 from XCode 3.2.6 on x86_64
gcc-4.2 from XCode 3.1.4 on PowerPC
llvm-g++-4.2 from XCode 4.3.1 on x86_64 (which means that llvm-g++ is not
a good option either)
you can add many different combinations to this list: anything based on
gcc-4.2 will just crashed, because OpenMP was buggy in GCC 4.2 and 4.3, as
I explained. Shouldn't we avoid compiler bugs?
It doesn't crash with
clang 3.1 from XCode 4.3.1 on x86_64
I don't know about the clang from XCode 3.2.6, but XCode 3.1.4 doesn't
have clang
You say "The only compilers ImageMagick might be compiled with today are
the ones that come with Xcode", but port that rely on recent compiler
functionality, such as R, build by default with recent gcc versions
(macports-gcc-4.5 in the case of R).
I think there are two options for the IM port:
- build without OpenMP by default if the compiler is gcc-4.2 or llvm-
gcc-4.2, and if the openmp variant is requested build with a more recent
gcc (or add a default "+gcc45" variant to do so, which can be
desactivated: if the user really wants a buggy IM he/she can do a "sudo
port install ImageMagick +openmp -gcc45")
- build with openmp by default but add a +gcc45 variant if clang is not
available (the openmp and gcc45 variants can still be disactivated
anyway).
In the above, replace gcc45 with you preferred gcc version, as long as
it's >= 4.4
--
Ticket URL: <https://trac.macports.org/ticket/34231#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list