Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMP support configured but cannot build #71

Open
hangingman opened this issue Nov 23, 2023 · 6 comments
Open

OpenMP support configured but cannot build #71

hangingman opened this issue Nov 23, 2023 · 6 comments

Comments

@hangingman
Copy link
Collaborator

hangingman commented Nov 23, 2023

On Mac, with Homebrew

// install imagemagick--7.1.1-12

$ brew install imagemagick
$ brew install openjdk@11
$ sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
$ ./configure --with-java-home=/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home
...
clang: error: unsupported option '-fopenmp'
...

Maybe related with
ref: ImageMagick/ImageMagick#1073

To resolve this problem on Mac, we might need to build ImageMagick from source.

@exekutive
Copy link

did you ever resolve this issue?
I get the same clang error compiling IM from source on my mac.

@hangingman
Copy link
Collaborator Author

No, I'll take a look

@hangingman
Copy link
Collaborator Author

When using homebrew imagemajick, $MAGICKCONF --cppflags always contains -fopenmp

MAGICK_INCLUDES=`$MAGICKCONF --cppflags`

I would like to build imagemagick --disable-openmp
ImageMagick/ImageMagick#5559

@exekutive
Copy link

ok not my case. I have a 38-core CPU, so I definitely want multiprocessing.

@hangingman
Copy link
Collaborator Author

hangingman commented Apr 13, 2024

OK, I see. So perhaps we should just install openmp on macos and do install jmagick again.
We might need to setup CC or CXX variable before start building jmagick.
ref: https://gist.github.com/ijleesw/4f863543a50294e3ba54acf588a4a421

@hangingman
Copy link
Collaborator Author

Build is passed, but I don't know it works fine.

$ brew install imagemagick openjdk@11
$ brew install llvm libomp

$ touch NEWS AUTHORS ChangeLog
$ autoreconf --force --install && automake --add-missing


$ PATH="/usr/local/Cellar/llvm/17.0.6_1/bin:$PATH" \
LDFLAGS="-I/usr/local/Cellar/libomp/18.1.3/include -L/usr/local/Cellar/llvm/17.0.6_1/lib" \
CPPFLAGS="-L/usr/local/Cellar/libomp/18.1.3/lib -I/usr/local/Cellar/llvm/17.0.6_1/include" \
CXX=/usr/local/Cellar/llvm/17.0.6_1/bin/clang++ \
CC=/usr/local/Cellar/llvm/17.0.6_1/bin/clang \
./configure \
--with-java-home=/usr/local/Cellar/openjdk@11/11.0.22 \
--with-java-includes=/usr/local/Cellar/openjdk@11/11.0.22/include

$ make

$ ls -1 lib/
jmagick-7.0.4.jar
jmagick.jar
libJMagick-7.0.4.la
libJMagick.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants