Is There a Port for a compiler compatible with OpenMP and Imagemagick

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is There a Port for a compiler compatible with OpenMP and Imagemagick

Fred Weinhaus
I am trying to install Imagemagick from source using all my delegates
installed from MacPorts. I have been doing this for years on OSX
SnowLeopard. But I recently bought a new Mac with OSX 10.12.4 Sierra and
the compiler will compile Imagemagick fine, except there is not support
for OpenMP. I have tried using gcc and gcc5 and gcc6 from MacPorts, but
that does not seem to help. I have found a document at
implies that gcc6 should work with the addition of a few other delegates. I did
install the ports for all those delegates suggested, but it still does not work.
The following is my configure command:


./configure CC=/opt/local/lib/gcc6/gcc CXX=/opt/local/lib/gcc6/g++ \
CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-openmp \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
--disable-silent-rules --disable-dependency-tracking --without-pango \
--with-lqr --with-gslib --with-gs-font-
dir=/opt/local/share/ghostscript/fonts/



Can anyone recommend a compiler port that is compatible with Imagemagick and
OpenMP?

Seems to me that the MacPorts ImageMagick port maintainer must be using something 
to properly compile Imagemagick with OpenMP for your Imagemagick port.

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ryan Schmidt-24

> On Apr 25, 2017, at 18:38, Fred Weinhaus <[hidden email]> wrote:
>
> I am trying to install Imagemagick from source using all my delegates
> installed from MacPorts. I have been doing this for years on OSX
> SnowLeopard. But I recently bought a new Mac with OSX 10.12.4 Sierra and
> the compiler will compile Imagemagick fine, except there is not support
> for OpenMP. I have tried using gcc and gcc5 and gcc6 from MacPorts, but
> that does not seem to help. I have found a document at
> https://solarianprogrammer.com/2016/09/22/compiling- gcc-6-macos/ which
> implies that gcc6 should work with the addition of a few other delegates. I did
> install the ports for all those delegates suggested, but it still does not work.
> The following is my configure command:
>
>
> ./configure CC=/opt/local/lib/gcc6/gcc CXX=/opt/local/lib/gcc6/g++ \
> CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
> --enable-openmp \
> --enable-delegate-build --enable-shared --disable-static --disable-opencl \
> --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
> --disable-silent-rules --disable-dependency-tracking --without-pango \
> --with-lqr --with-gslib --with-gs-font-
> dir=/opt/local/share/ghostscript/fonts/
>
>
>
> Can anyone recommend a compiler port that is compatible with Imagemagick and
> OpenMP?
>
> Seems to me that the MacPorts ImageMagick port maintainer must be using something
> to properly compile Imagemagick with OpenMP for your Imagemagick port.
>
> Thanks.


Like most ports, the ImageMagick port uses the default compiler for the currently running macOS / Xcode version (i.e. clang on OS X 10.7 and later). The portfile doesn't contain any statements about openmp so I have no idea whether the port supports openmp. My understanding is that support for openmp was added in clang 3.8 if that helps.

Attempting to use FSF GCC C++ compilers on OS X 10.9 or later will usually result in problems, since FSF GCC C++ uses libstdc++ and any dependencies you may be trying to use, including dependencies provided by macOS or MacPorts, were built using clang++ using libc++, and you cannot mix and match C++ libraries like that.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ken Cunningham Webuse
In reply to this post by Fred Weinhaus
This page <http://www.openmp.org/resources/openmp-compilers/> says clang-3.9 supports openmp if you send the compiler the flag "-fopenmp".

So perhaps that might give you a place to start.

If you wanted to install imagemagick with macports instead of rolling your own build, you could do something like the following:

sudo port -v install imagemagick configure.cppflags-append="-fopenmp" configure.compiler=macports-clang-3.9


There's more info here:
http://openmp.llvm.org/

Ken
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ryan Schmidt-24


> On Apr 25, 2017, at 19:48, Ken Cunningham <[hidden email]> wrote:
>
> sudo port -v install imagemagick configure.cppflags-append="-fopenmp" configure.compiler=macports-clang-3.9

You can't augment a port's variables from the command line, only override them, which isn't recommended.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ryan Schmidt-24
In reply to this post by Ryan Schmidt-24

> On Apr 25, 2017, at 22:11, Fred Weinhaus <[hidden email]> wrote:
>
>
>> On Apr 25, 2017, at 5:21 PM, Ryan Schmidt <[hidden email]> wrote:
>>
>>
>>> On Apr 25, 2017, at 18:38, Fred Weinhaus <[hidden email]> wrote:
>>>
>>> I am trying to install Imagemagick from source using all my delegates
>>> installed from MacPorts. I have been doing this for years on OSX
>>> SnowLeopard. But I recently bought a new Mac with OSX 10.12.4 Sierra and
>>> the compiler will compile Imagemagick fine, except there is not support
>>> for OpenMP. I have tried using gcc and gcc5 and gcc6 from MacPorts, but
>>> that does not seem to help. I have found a document at
>>> https://solarianprogrammer.com/2016/09/22/compiling- gcc-6-macos/ which
>>> implies that gcc6 should work with the addition of a few other delegates. I did
>>> install the ports for all those delegates suggested, but it still does not work.
>>> The following is my configure command:
>>>
>>>
>>> ./configure CC=/opt/local/lib/gcc6/gcc CXX=/opt/local/lib/gcc6/g++ \
>>> CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
>>> --enable-openmp \
>>> --enable-delegate-build --enable-shared --disable-static --disable-opencl \
>>> --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
>>> --disable-silent-rules --disable-dependency-tracking --without-pango \
>>> --with-lqr --with-gslib --with-gs-font-
>>> dir=/opt/local/share/ghostscript/fonts/
>>>
>>>
>>>
>>> Can anyone recommend a compiler port that is compatible with Imagemagick and
>>> OpenMP?
>>>
>>> Seems to me that the MacPorts ImageMagick port maintainer must be using something
>>> to properly compile Imagemagick with OpenMP for your Imagemagick port.
>>>
>>> Thanks.
>>
>>
>> Like most ports, the ImageMagick port uses the default compiler for the currently running macOS / Xcode version (i.e. clang on OS X 10.7 and later). The portfile doesn't contain any statements about openmp so I have no idea whether the port supports openmp. My understanding is that support for openmp was added in clang 3.8 if that helps.
>>
>> Attempting to use FSF GCC C++ compilers on OS X 10.9 or later will usually result in problems, since FSF GCC C++ uses libstdc++ and any dependencies you may be trying to use, including dependencies provided by macOS or MacPorts, were built using clang++ using libc++, and you cannot mix and match C++ libraries like that.
>
> My apologies if I am replying the wrong way. I do not know how to post again to the same topic. This is my first topic on this forum. If replying like this is wrong, please point me in the right direction for this forum usages.

Well it's a mailing list, not a forum. To reply to a message, press the Reply All button in your email program, that way you send your reply to both the sender's address and the list address. I've re-added the list address to this reply.


> I can compile ImageMagick from source using MacPorts delegates by the following:
>
> ./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
>   --enable-openmp \
>   --enable-delegate-build --enable-shared --disable-static --disable-opencl \
>   --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
>   --disable-silent-rules --disable-dependency-tracking --without-pango \
>   --with-lqr --with-gslib --with-gs-font-dir=/opt/local/share/ghostscript/fonts/
>
>
> But it does not enable OpenMP.

I don't know much about openmp, sorry. You might need to ask the developers of ImageMagick.


> I tried to check my versions of clang and gcc and get the following:
>
> clang --version
> Apple LLVM version 8.1.0 (clang-802.0.42)
> Target: x86_64-apple-darwin16.5.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>
> and
>
> gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 8.1.0 (clang-802.0.42)
> Target: x86_64-apple-darwin16.5.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>
>
> I do not see any clang version that is like 3.8 or 3.9.  

Yes, Apple assigns their own version numbers to the fork of clang they ship with Xcode and the command line tools. They used to tell us what FSF versions of clang those correspond to, but they don't anymore. I don't know what FSF version of clang Apple LLVM 8.1 corresponds to. Jeremy Sequoia probably knows.


> Sorry, I am not a software or unix expert.  Can you tell me how I can verify if the Xcode compilers are correct for enabling openmp?

I don't know; maybe someone else on the list does.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Richard L. Hamilton-3
Is this the sort of version cross-reference you're looking for?


On Apr 26, 2017, at 00:38, Ryan Schmidt <[hidden email]> wrote:


On Apr 25, 2017, at 22:11, Fred Weinhaus <[hidden email]> wrote:


On Apr 25, 2017, at 5:21 PM, Ryan Schmidt <[hidden email]> wrote:


On Apr 25, 2017, at 18:38, Fred Weinhaus <[hidden email]> wrote:

I am trying to install Imagemagick from source using all my delegates
installed from MacPorts. I have been doing this for years on OSX
SnowLeopard. But I recently bought a new Mac with OSX 10.12.4 Sierra and
the compiler will compile Imagemagick fine, except there is not support
for OpenMP. I have tried using gcc and gcc5 and gcc6 from MacPorts, but
that does not seem to help. I have found a document at
https://solarianprogrammer.com/2016/09/22/compiling- gcc-6-macos/ which
implies that gcc6 should work with the addition of a few other delegates. I did
install the ports for all those delegates suggested, but it still does not work.
The following is my configure command:


./configure CC=/opt/local/lib/gcc6/gcc CXX=/opt/local/lib/gcc6/g++ \
CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-openmp \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
--disable-silent-rules --disable-dependency-tracking --without-pango \
--with-lqr --with-gslib --with-gs-font-
dir=/opt/local/share/ghostscript/fonts/



Can anyone recommend a compiler port that is compatible with Imagemagick and
OpenMP?

Seems to me that the MacPorts ImageMagick port maintainer must be using something
to properly compile Imagemagick with OpenMP for your Imagemagick port.

Thanks.


Like most ports, the ImageMagick port uses the default compiler for the currently running macOS / Xcode version (i.e. clang on OS X 10.7 and later). The portfile doesn't contain any statements about openmp so I have no idea whether the port supports openmp. My understanding is that support for openmp was added in clang 3.8 if that helps.

Attempting to use FSF GCC C++ compilers on OS X 10.9 or later will usually result in problems, since FSF GCC C++ uses libstdc++ and any dependencies you may be trying to use, including dependencies provided by macOS or MacPorts, were built using clang++ using libc++, and you cannot mix and match C++ libraries like that.

My apologies if I am replying the wrong way. I do not know how to post again to the same topic. This is my first topic on this forum. If replying like this is wrong, please point me in the right direction for this forum usages.

Well it's a mailing list, not a forum. To reply to a message, press the Reply All button in your email program, that way you send your reply to both the sender's address and the list address. I've re-added the list address to this reply.


I can compile ImageMagick from source using MacPorts delegates by the following:

./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
 --enable-openmp \
 --enable-delegate-build --enable-shared --disable-static --disable-opencl \
 --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
 --disable-silent-rules --disable-dependency-tracking --without-pango \
 --with-lqr --with-gslib --with-gs-font-dir=/opt/local/share/ghostscript/fonts/


But it does not enable OpenMP.

I don't know much about openmp, sorry. You might need to ask the developers of ImageMagick.


I tried to check my versions of clang and gcc and get the following:

clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

and

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


I do not see any clang version that is like 3.8 or 3.9.  

Yes, Apple assigns their own version numbers to the fork of clang they ship with Xcode and the command line tools. They used to tell us what FSF versions of clang those correspond to, but they don't anymore. I don't know what FSF version of clang Apple LLVM 8.1 corresponds to. Jeremy Sequoia probably knows.


Sorry, I am not a software or unix expert.  Can you tell me how I can verify if the Xcode compilers are correct for enabling openmp?

I don't know; maybe someone else on the list does.




signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ken Cunningham Webuse
In reply to this post by Ryan Schmidt-24

On 2017-04-25, at 8:01 PM, Ryan Schmidt wrote:

>
>
>> On Apr 25, 2017, at 19:48, Ken Cunningham <[hidden email]> wrote:
>>
>> sudo port -v install imagemagick configure.cppflags-append="-fopenmp" configure.compiler=macports-clang-3.9
>
> You can't augment a port's variables from the command line, only override them, which isn't recommended.

Ah, interesting. I usually put it in the portfiles directly, but could have sworn ...



Re: ImageMagick and openmp.

When i looked at the default MacPorts version built with Sierra, indeed, no openmp support was compiled in:

$ Magick++-config --cxxflags --cppflags --ldflags --libs
-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16


but, uninstalling it:

$ sudo port uninstall ImageMagick @6.9.8-3_0+x11

installing clang-3.9

$ sudo port install clang-3.9

and then rebuilding imagemagick against clang-3.9:

$ sudo port -v upgrade imagemagick configure.compiler=macports-clang-3.9

and now you do get openmp support, as you can see:

$ Magick++-config --cxxflags --cppflags --ldflags --libs
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16


and

$ identify --version
Version: ImageMagick 6.9.8-3 Q16 x86_64 2017-04-26 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml zlib



So it appears clang-3.9 has the mojo for Imagemagick to automatically add in openmp support, but this is not the default build on Sierra. I didn't change anything in the portfile.

Are you OK just using the macports version with openmp support? Compiling your own version, you'd build it against clang-3.9 or greater, most easily done using clang_select to specify that version of clang for you.

Let me know if I can help further.

Best,

Ken
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Fred Weinhaus

On Apr 26, 2017, at 8:01 AM, Ken Cunningham <[hidden email]> wrote:


On 2017-04-25, at 8:01 PM, Ryan Schmidt wrote:



On Apr 25, 2017, at 19:48, Ken Cunningham <[hidden email]> wrote:

sudo port -v install imagemagick configure.cppflags-append="-fopenmp" configure.compiler=macports-clang-3.9

You can't augment a port's variables from the command line, only override them, which isn't recommended.

Ah, interesting. I usually put it in the portfiles directly, but could have sworn ...



Re: ImageMagick and openmp.

When i looked at the default MacPorts version built with Sierra, indeed, no openmp support was compiled in:

$ Magick++-config --cxxflags --cppflags --ldflags --libs
-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16


but, uninstalling it:

$ sudo port uninstall ImageMagick @6.9.8-3_0+x11

installing clang-3.9

$ sudo port install clang-3.9

and then rebuilding imagemagick against clang-3.9:

$ sudo port -v upgrade imagemagick configure.compiler=macports-clang-3.9

and now you do get openmp support, as you can see:

$ Magick++-config --cxxflags --cppflags --ldflags --libs
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/ImageMagick-6
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/opt/local/lib -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16


and

$ identify --version
Version: ImageMagick 6.9.8-3 Q16 x86_64 2017-04-26 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml zlib



So it appears clang-3.9 has the mojo for Imagemagick to automatically add in openmp support, but this is not the default build on Sierra. I didn't change anything in the portfile.

Are you OK just using the macports version with openmp support? Compiling your own version, you'd build it against clang-3.9 or greater, most easily done using clang_select to specify that version of clang for you.

Let me know if I can help further.

Best,

Ken

Ken,

That looks very promising. I do not want to use the ImageMagick port, mainly because I need to install both IM 6 and IM 7 and there is no IM 7 port. So I would like to do my own manual install of ImageMagick using all the ports from MacPorts.

I think I can resolve what I need for my configure command if you would run

convert -list configure

The send me what it says in the section for CONFIGURE 

or just send me the whole thing.

Thanks.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Ken Cunningham Webuse
In reply to this post by Ken Cunningham Webuse
> Ken,
>
> That looks very promising. I do not want to use the ImageMagick port, mainly because I need to install both IM 6 and IM 7 and there is no IM 7 port. So I would like to do my own manual install of ImageMagick using all the ports from MacPorts.
>
> I think I can resolve what I need for my configure command if you would run
>
> convert -list configure
>
> The send me what it says in the section for CONFIGURE
>
> or just send me the whole thing.
>
> Thanks.

Here you are. K


Path: /opt/local/lib/ImageMagick-6.9.8//config-Q16/configure.xml

Name           Value
-------------------------------------------------------------------------------
CC             /opt/local/bin/clang-mp-3.9
CFLAGS         -I/opt/local/include/libxml2 -I/opt/local/include/libpng16 -D_THREAD_SAFE -I/opt/local/include/OpenEXR  -I/opt/local/include/openjpeg-2.1  -I/opt/local/include/freetype2 -I/opt/local/include/freetype2     -fopenmp -pipe -Os -arch x86_64 -Wall -mtune=westmere -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH     /opt/local/lib/ImageMagick-6.9.8/modules-Q16/coders
CONFIGURE      ./configure  '--prefix=/opt/local' '--enable-shared' '--enable-static' '--disable-ltdl-install' '--disable-silent-rules' '--with-frozenpaths' '--with-openexr' '--disable-hdri' '--with-dps' '--with-bzlib' '--with-djvu' '--with-fontconfig' '--with-gslib' '--with-jbig' '--with-jpeg' '--with-lcms' '--with-openjp2' '--with-png' '--with-tiff' '--with-webp' '--with-zlib' '--with-modules' '--with-xml' '--without-perl' '--without-fpx' '--without-wmf' '--without-gvc' '--without-rsvg' '--without-lqr' '--without-pango' '--with-x' '--with-gs-font-dir=/opt/local/share/fonts/urw-fonts' 'CC=/opt/local/bin/clang-mp-3.9' 'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/opt/local/bin/clang++-mp-3.9' 'CXXFLAGS=-pipe -Os -stdlib=libc++ -arch x86_64'
CONFIGURE_PATH /opt/local/etc/ImageMagick-6/
COPYRIGHT      Copyright (C) 1999-2016 ImageMagick Studio LLC
CPPFLAGS       -I/opt/local/include/ImageMagick-6
CXX            /opt/local/bin/clang++-mp-3.9
CXXFLAGS       -pipe -Os -stdlib=libc++ -arch x86_64 -D_THREAD_SAFE -pthread
DEFS           -DHAVE_CONFIG_H
DELEGATES      bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lzma openexr openjp2 png ps tiff webp x xml zlib
DISTCHECK_CONFIG_FLAGS 'CC=/opt/local/bin/clang-mp-3.9' 'CFLAGS=-pipe -Os -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/opt/local/bin/clang++-mp-3.9' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64'  --disable-deprecated  --with-quantum-depth=16  --with-jemalloc=no  --with-umem=no  --with-autotrace=no  --with-fpx=no  --with-fontpath=  --with-gs-font-dir=/opt/local/share/fonts/urw-fonts  --with-gvc=no  --with-lqr=no  --with-pango=no  --with-rsvg=no  --with-wmf=no  --with-perl=no
DOCUMENTATION_PATH /opt/local/share/doc/ImageMagick-6
EXEC-PREFIX    /opt/local
EXECUTABLE_PATH /opt/local/bin
FEATURES       DPC Cipher OpenMP Modules
FILTER_PATH    /opt/local/lib/ImageMagick-6.9.8/modules-Q16/filters
GIT_REVISION   11445
HOST           x86_64-apple-darwin16.5.0
INCLUDE_PATH   /opt/local/include/ImageMagick-6
LDFLAGS        -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64
LIB_VERSION    0x698
LIB_VERSION_NUMBER 6,9,8,3
LIBRARY_PATH   /opt/local/lib/ImageMagick-6.9.8
LIBS            -L/opt/local/lib -llcms2 -L/opt/local/lib -lfreetype   -L/opt/local/lib -lfftw3  -L/opt/local/lib -lfontconfig -lfreetype -lXext   -lSM -lICE -lX11  -lXt -L/opt/local/lib -llzma -lbz2 -L/opt/local/lib -lz -lltdl  -lm -lgomp    
NAME           ImageMagick
PCFLAGS        -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX         /opt/local
QuantumDepth   16
RELEASE_DATE   2017-04-26
SHARE_PATH     /opt/local/share/ImageMagick-6
SHAREARCH_PATH /opt/local/lib/ImageMagick-6.9.8/config-Q16
TARGET_CPU     x86_64
TARGET_OS      darwin16.5.0
TARGET_VENDOR  apple
VERSION        6.9.8
WEBSITE        http://www.imagemagick.org

Path: [built-in]

Name           Value
-------------------------------------------------------------------------------
FEATURES       OpenMP
NAME           ImageMagick
QuantumDepth   16
Macpro2010:~ cunningh$


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Fred Weinhaus

> On Apr 26, 2017, at 9:13 AM, Ken Cunningham <[hidden email]> wrote:
>
>> Ken,
>>
>> That looks very promising. I do not want to use the ImageMagick port, mainly because I need to install both IM 6 and IM 7 and there is no IM 7 port. So I would like to do my own manual install of ImageMagick using all the ports from MacPorts.
>>
>> I think I can resolve what I need for my configure command if you would run
>>
>> convert -list configure
>>
>> The send me what it says in the section for CONFIGURE
>>
>> or just send me the whole thing.
>>
>> Thanks.
>
> Here you are. K
>
>
> Path: /opt/local/lib/ImageMagick-6.9.8//config-Q16/configure.xml
>
> Name           Value
> -------------------------------------------------------------------------------
> CC             /opt/local/bin/clang-mp-3.9
> CFLAGS         -I/opt/local/include/libxml2 -I/opt/local/include/libpng16 -D_THREAD_SAFE -I/opt/local/include/OpenEXR  -I/opt/local/include/openjpeg-2.1  -I/opt/local/include/freetype2 -I/opt/local/include/freetype2     -fopenmp -pipe -Os -arch x86_64 -Wall -mtune=westmere -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
> CODER_PATH     /opt/local/lib/ImageMagick-6.9.8/modules-Q16/coders
> CONFIGURE      ./configure  '--prefix=/opt/local' '--enable-shared' '--enable-static' '--disable-ltdl-install' '--disable-silent-rules' '--with-frozenpaths' '--with-openexr' '--disable-hdri' '--with-dps' '--with-bzlib' '--with-djvu' '--with-fontconfig' '--with-gslib' '--with-jbig' '--with-jpeg' '--with-lcms' '--with-openjp2' '--with-png' '--with-tiff' '--with-webp' '--with-zlib' '--with-modules' '--with-xml' '--without-perl' '--without-fpx' '--without-wmf' '--without-gvc' '--without-rsvg' '--without-lqr' '--without-pango' '--with-x' '--with-gs-font-dir=/opt/local/share/fonts/urw-fonts' 'CC=/opt/local/bin/clang-mp-3.9' 'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/opt/local/bin/clang++-mp-3.9' 'CXXFLAGS=-pipe -Os -stdlib=libc++ -arch x86_64'
> CONFIGURE_PATH /opt/local/etc/ImageMagick-6/
> COPYRIGHT      Copyright (C) 1999-2016 ImageMagick Studio LLC
> CPPFLAGS       -I/opt/local/include/ImageMagick-6
> CXX            /opt/local/bin/clang++-mp-3.9
> CXXFLAGS       -pipe -Os -stdlib=libc++ -arch x86_64 -D_THREAD_SAFE -pthread
> DEFS           -DHAVE_CONFIG_H
> DELEGATES      bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lzma openexr openjp2 png ps tiff webp x xml zlib
> DISTCHECK_CONFIG_FLAGS 'CC=/opt/local/bin/clang-mp-3.9' 'CFLAGS=-pipe -Os -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/opt/local/bin/clang++-mp-3.9' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64'  --disable-deprecated  --with-quantum-depth=16  --with-jemalloc=no  --with-umem=no  --with-autotrace=no  --with-fpx=no  --with-fontpath=  --with-gs-font-dir=/opt/local/share/fonts/urw-fonts  --with-gvc=no  --with-lqr=no  --with-pango=no  --with-rsvg=no  --with-wmf=no  --with-perl=no
> DOCUMENTATION_PATH /opt/local/share/doc/ImageMagick-6
> EXEC-PREFIX    /opt/local
> EXECUTABLE_PATH /opt/local/bin
> FEATURES       DPC Cipher OpenMP Modules
> FILTER_PATH    /opt/local/lib/ImageMagick-6.9.8/modules-Q16/filters
> GIT_REVISION   11445
> HOST           x86_64-apple-darwin16.5.0
> INCLUDE_PATH   /opt/local/include/ImageMagick-6
> LDFLAGS        -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64
> LIB_VERSION    0x698
> LIB_VERSION_NUMBER 6,9,8,3
> LIBRARY_PATH   /opt/local/lib/ImageMagick-6.9.8
> LIBS            -L/opt/local/lib -llcms2 -L/opt/local/lib -lfreetype   -L/opt/local/lib -lfftw3  -L/opt/local/lib -lfontconfig -lfreetype -lXext   -lSM -lICE -lX11  -lXt -L/opt/local/lib -llzma -lbz2 -L/opt/local/lib -lz -lltdl  -lm -lgomp    
> NAME           ImageMagick
> PCFLAGS        -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
> PREFIX         /opt/local
> QuantumDepth   16
> RELEASE_DATE   2017-04-26
> SHARE_PATH     /opt/local/share/ImageMagick-6
> SHAREARCH_PATH /opt/local/lib/ImageMagick-6.9.8/config-Q16
> TARGET_CPU     x86_64
> TARGET_OS      darwin16.5.0
> TARGET_VENDOR  apple
> VERSION        6.9.8
> WEBSITE        http://www.imagemagick.org
>
> Path: [built-in]
>
> Name           Value
> -------------------------------------------------------------------------------
> FEATURES       OpenMP
> NAME           ImageMagick
> QuantumDepth   16
> Macpro2010:~ cunningh$
>
>


Thanks very much. That gave me enough information to recompile ImageMagick from source to get OpenMP enabled. I did it by installing the clang-9 port and then using the following to compile ImageMagick from source:

./configure CC=/opt/local/bin/clang-mp-3.9 CXX=/opt/local/bin/clang++-mp-3.9 \
CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-openmp \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
--disable-silent-rules --disable-dependency-tracking --without-pango \
--with-lqr --with-gslib --with-gs-font-dir=/opt/local/share/ghostscript/fonts/

I really appreciate all the help you and Ryan provided. You guys are great.

Thanks again.

Fred
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is There a Port for a compiler compatible with OpenMP and Imagemagick

Chris Jones
In reply to this post by Richard L. Hamilton-3


On 26/04/17 07:11, Richard L. Hamilton wrote:
> Is this the sort of version cross-reference you're looking for?
> https://gist.github.com/yamaya/2924292

That doesn't give anything more that 'clang --version' gives for each
OS/Xcode release. So doesn't really help much.

>
>
>> On Apr 26, 2017, at 00:38, Ryan Schmidt <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>
>>> On Apr 25, 2017, at 22:11, Fred Weinhaus <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>
>>>> On Apr 25, 2017, at 5:21 PM, Ryan Schmidt <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>>
>>>>> On Apr 25, 2017, at 18:38, Fred Weinhaus <[hidden email]
>>>>> <mailto:[hidden email]>> wrote:
>>>>>
>>>>> I am trying to install Imagemagick from source using all my delegates
>>>>> installed from MacPorts. I have been doing this for years on OSX
>>>>> SnowLeopard. But I recently bought a new Mac with OSX 10.12.4
>>>>> Sierra and
>>>>> the compiler will compile Imagemagick fine, except there is not support
>>>>> for OpenMP. I have tried using gcc and gcc5 and gcc6 from MacPorts, but
>>>>> that does not seem to help. I have found a document at
>>>>> https://solarianprogrammer.com/2016/09/22/compiling- gcc-6-macos/ which
>>>>> implies that gcc6 should work with the addition of a few other
>>>>> delegates. I did
>>>>> install the ports for all those delegates suggested, but it still
>>>>> does not work.
>>>>> The following is my configure command:
>>>>>
>>>>>
>>>>> ./configure CC=/opt/local/lib/gcc6/gcc CXX=/opt/local/lib/gcc6/g++ \
>>>>> CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
>>>>> --enable-openmp \
>>>>> --enable-delegate-build --enable-shared --disable-static
>>>>> --disable-opencl \
>>>>> --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
>>>>> --disable-silent-rules --disable-dependency-tracking --without-pango \
>>>>> --with-lqr --with-gslib --with-gs-font-
>>>>> dir=/opt/local/share/ghostscript/fonts/
>>>>>
>>>>>
>>>>>
>>>>> Can anyone recommend a compiler port that is compatible with
>>>>> Imagemagick and
>>>>> OpenMP?
>>>>>
>>>>> Seems to me that the MacPorts ImageMagick port maintainer must be
>>>>> using something
>>>>> to properly compile Imagemagick with OpenMP for your Imagemagick port.
>>>>>
>>>>> Thanks.
>>>>
>>>>
>>>> Like most ports, the ImageMagick port uses the default compiler for
>>>> the currently running macOS / Xcode version (i.e. clang on OS X 10.7
>>>> and later). The portfile doesn't contain any statements about openmp
>>>> so I have no idea whether the port supports openmp. My understanding
>>>> is that support for openmp was added in clang 3.8 if that helps.
>>>>
>>>> Attempting to use FSF GCC C++ compilers on OS X 10.9 or later will
>>>> usually result in problems, since FSF GCC C++ uses libstdc++ and any
>>>> dependencies you may be trying to use, including dependencies
>>>> provided by macOS or MacPorts, were built using clang++ using
>>>> libc++, and you cannot mix and match C++ libraries like that.
>>>
>>> My apologies if I am replying the wrong way. I do not know how to
>>> post again to the same topic. This is my first topic on this forum.
>>> If replying like this is wrong, please point me in the right
>>> direction for this forum usages.
>>
>> Well it's a mailing list, not a forum. To reply to a message, press
>> the Reply All button in your email program, that way you send your
>> reply to both the sender's address and the list address. I've re-added
>> the list address to this reply.
>>
>>
>>> I can compile ImageMagick from source using MacPorts delegates by the
>>> following:
>>>
>>> ./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
>>>  --enable-openmp \
>>>  --enable-delegate-build --enable-shared --disable-static
>>> --disable-opencl \
>>>  --with-modules --with-quantum-depth=16 --without-wmf --with-rsvg \
>>>  --disable-silent-rules --disable-dependency-tracking --without-pango \
>>>  --with-lqr --with-gslib
>>> --with-gs-font-dir=/opt/local/share/ghostscript/fonts/
>>>
>>>
>>> But it does not enable OpenMP.
>>
>> I don't know much about openmp, sorry. You might need to ask the
>> developers of ImageMagick.
>>
>>
>>> I tried to check my versions of clang and gcc and get the following:
>>>
>>> clang --version
>>> Apple LLVM version 8.1.0 (clang-802.0.42)
>>> Target: x86_64-apple-darwin16.5.0
>>> Thread model: posix
>>> InstalledDir:
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>>
>>> and
>>>
>>> gcc --version
>>> Configured with:
>>> --prefix=/Applications/Xcode.app/Contents/Developer/usr
>>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>>> Apple LLVM version 8.1.0 (clang-802.0.42)
>>> Target: x86_64-apple-darwin16.5.0
>>> Thread model: posix
>>> InstalledDir:
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>>
>>>
>>> I do not see any clang version that is like 3.8 or 3.9.
>>
>> Yes, Apple assigns their own version numbers to the fork of clang they
>> ship with Xcode and the command line tools. They used to tell us what
>> FSF versions of clang those correspond to, but they don't anymore. I
>> don't know what FSF version of clang Apple LLVM 8.1 corresponds to.
>> Jeremy Sequoia probably knows.
>>
>>
>>> Sorry, I am not a software or unix expert.  Can you tell me how I can
>>> verify if the Xcode compilers are correct for enabling openmp?
>>
>> I don't know; maybe someone else on the list does.
>>
>>
>
Loading...