Ticket #27528 (reopened defect)
ImageMagick: expected '#pragma omp' clause before 'omp_throttle'
| Reported by: | michael.himmelsbach@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | neverpanic@…, raimue@…, luis.beca@… | |
| Port: | ImageMagick |
Description
ImageMagick fails to compile with an error in magic/composite.c:2757 on Snow Leopard 10.6.5 using Apples GCC 4.2.1: "error: expected '#pragma omp' clause before 'omp_throttle'". Please see attached log.
Attachments
Change History
Changed 2 years ago by michael.himmelsbach@…
- Attachment im-err.log added
comment:1 Changed 2 years ago by jmr@…
- Owner changed from macports-tickets@… to ryandesign@…
- Keywords Compile error removed
- Port changed from Image Magick to ImageMagick
Please remember to cc the maintainer.
comment:2 Changed 2 years ago by ryandesign@…
- Summary changed from ImageMagick fails to build on 10.6.5 to ImageMagick: expected '#pragma omp' clause before 'omp_throttle'
Hmm, it builds fine for me on Snow Leopard. "omp" here refers to OpenMP but I'm not sure what to do with this.
comment:3 Changed 2 years ago by ryandesign@…
If you attach your config.log I could compare it with mine, see what's different.
comment:4 Changed 2 years ago by michael.himmelsbach@…
I did not find a config.log, but in my macports.conf I found that I had recently enabled the use of ccache (ie, it contained "configureccache yes"). Setting "configureccache no" and doing a "port clean/configure/build/install imagemagick" then worked for me. I am up to date now, which also means that I will never use ccache again. Or is this a MacPorts-only ccache problem?
comment:6 Changed 2 years ago by michael.himmelsbach@…
neverpanic, have you tried disabling ccache for MacPorts? This worked for me, and as I can see from your config.log in line 12929 (CC= ccache /usr/bin/gcc-4.2 -std=gnu99 -std=gnu99), you also have ccache enabled for building ImageMagick.
comment:7 Changed 2 years ago by neverpanic@…
Yes I have and it did work, but maybe we can still get to the bottom of this or at least add a message that building ImageMagick with ccache will fail.
comment:8 follow-up: ↓ 9 Changed 2 years ago by michael.himmelsbach@…
Just a note: Building ImageMagick with ccache will probably only fail if another version of it was build with ccache before. If I find some time I will clear my ccache cache and see if it works then.
comment:9 in reply to: ↑ 8 Changed 2 years ago by nigel.stanger@…
Same problem here too. "sudo ccache -C" followed by "port clean/upgrade imagemagick" failed with the same error. Disabling ccache completely followed by "port clean/upgrade imagemagick" worked fine.
comment:10 Changed 2 years ago by ryandesign@…
Hmm. I had never used ccache before, but I've now installed it and configured MacPorts to use it, and ImageMagick still built fine for me.
comment:12 Changed 2 years ago by raimue@…
First it failed in the same way for me as described above. It looks like the omp_throttle(1) macro was not pre-processed and was not expanded. Therefore the compiler chokes on the unknown directive.
But it works now with a clean ccache. My guess is that ccache was unable to detect changes for whatever reason and used old pre-processed input (old headers?) from the cache.
comment:13 Changed 2 years ago by ryandesign@…
- Cc luis.beca@… added
- Status changed from new to assigned
Has duplicate #27873. I guess I should disable ccache for ImageMagick.
comment:14 Changed 2 years ago by ryandesign@…
- Status changed from assigned to closed
- Resolution set to fixed
comment:15 in reply to: ↑ description Changed 16 months ago by dhruvahuja@…
- Status changed from closed to reopened
- Resolution fixed deleted
Replying to michael.himmelsbach@…:
ImageMagick fails to compile with an error in magic/composite.c:2757 on Snow Leopard 10.6.5 using Apples GCC 4.2.1: "error: expected '#pragma omp' clause before 'omp_throttle'". Please see attached log.
Setting the CCACHE_CPP2 environment variable changes the preprocessing behaviour making it compatible with ImageMagick. Not all ccache performance is lost. More information on usage at: http://workin.gs/compiling-imagemagick-ccache and on the explanation of the behaviour at: http://ccache.samba.org/manual.html#_environment_variables . I tested this on SLES 11.1 x86_64 , though.


MacPorts error log for "port upgrade imagemagick"