Opened 5 years ago
Closed 5 years ago
#59610 closed defect (fixed)
imagemagick: building 6.9.9-40_7 on Lion misses gomp library
Reported by: | lemzwerg (Werner Lemberg) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | lion | Cc: | iEFdev |
Port: | ImageMagick |
Description
[macports-ports 5b077ee8b9d70a99c49a5757fde272efdee36dba]
I get the following error:
:info:build ld: library not found for -lgomp :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[1]: *** [coders/dng.la] Error 1
Full log file is attached.
Attachments (3)
Change History (28)
Changed 5 years ago by lemzwerg (Werner Lemberg)
Attachment: | main.log.xz added |
---|
comment:1 Changed 5 years ago by lemzwerg (Werner Lemberg)
comment:2 Changed 5 years ago by kencu (Ken)
this is likely to be the same busted gomp thing with imagemagick I reported to Ryan some months ago. there are open tickets and a few closed prs about it.
basically, omp support is broken, and this is the error you see. it can be turned off with a conf arg.
comment:3 Changed 5 years ago by iEFdev
Cc: | iEFdev added |
---|
comment:4 Changed 5 years ago by iEFdev
After some upgrades yesterday (gimp2 and stuff), this was broken and wanted a rev-upgrade.
I got the exact same output from -d rev-upgrade
.
comment:5 Changed 5 years ago by mf2k (Frank Schima)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Port: | ImageMagick added; imagemagick removed |
Status: | new → assigned |
comment:6 Changed 5 years ago by lemzwerg (Werner Lemberg)
Just reporting the current status: I see that ImageMagick's Portfile
now contains --disable-openmp
. However, linking still fails with
:info:build libtool: link: /usr/bin/clang \ -o coders/.libs/dng.so \ -bundle \ coders/.libs/dng_la-dng.o -L/opt/local/lib \ magick/.libs/libMagickCore-6.Q16.dylib \ /opt/local/lib/libfftw3.dylib \ /opt/local/lib/libxml2.dylib \ /opt/local/lib/libfontconfig.dylib \ /opt/local/lib/libfreetype.dylib \ /opt/local/lib/libXext.dylib \ /opt/local/lib/libSM.dylib \ /opt/local/lib/libICE.dylib \ /opt/local/lib/libX11.dylib \ /opt/local/lib/libXt.dylib \ /opt/local/lib/liblzma.dylib \ -lbz2 \ -lz \ /opt/local/lib/libltdl.dylib \ -lm \ /opt/local/lib/libraw_r.dylib \ -lstdc++ \ /opt/local/lib/liblcms2.dylib \ -Os \ -arch x86_64 \ -mtune=penryn \ -pthread \ -Wl,-headerpad_max_install_names \ -arch x86_64 \ -fopenmp \ -pthread \ -fopenmp \ -Wl,-exported_symbols_list,coders/.libs/dng-symbols.expsym :info:build clang: warning: argument unused during compilation: '-pthread' :info:build clang: warning: argument unused during compilation: '-pthread' :info:build ld: warning: directory not found for option '-L/opt/local/lib/ImageMagick-6.9.10' :info:build ld: library not found for -lgomp
comment:7 Changed 5 years ago by kencu (Ken)
strange, isn't it?
-fopenmp \ -pthread \ -fopenmp \
Have to dig in on an actual build to see where it's still picking up -fopenmp
if --disable-openmp
is set ....
comment:8 Changed 5 years ago by kencu (Ken)
So, Werner, my build of ImageMagick on 10.7.5 proceeds without errors, and there is no -fopenmp
or -lgomp
to mess things up.
Assuming you're all up-to-date in the portfiles, and have no overrides or custom repos messing you up, then you must be pulling those flags in from some other *.pc file somewhere I would think.
go into ${prefix}/lib/ and do a search for lgomp
. I do this with "the_silver_searcher".
Ken
comment:9 Changed 5 years ago by lemzwerg (Werner Lemberg)
I did
cd /opt/local/lib find . -type f | xargs grep lgomp
and get the following result.
./gcc8/gcc/x86_64-apple-darwin11/8.3.0/plugin/include/config/darwin.h: %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \ ./gcc8/gcc/x86_64-apple-darwin11/8.3.0/plugin/include/config/darwin.h: %{static|static-libgcc|static-libstdc++|static-libgfortran:%:replace-outfile(-lgomp libgomp.a%s)}\ ./gcc8/libgomp.spec:*link_gomp: -lgomp %{static: -ldl }
My installation also contains package libomp @9.0.0_0+universal (active)
in case this is of importance.
Hmm. I see in the log that /usr/bin/clang
gets used for compilation. Repeating the above command in /usr/lib
gives
Binary file ./libclang.dylib matches
Attaching the current main.log
file.
comment:10 Changed 5 years ago by kencu (Ken)
perhaps try uninstalling (or deactivating) your older version of ImageMagick first...if you have one.
comment:11 Changed 5 years ago by kencu (Ken)
you're trying to see where this is coming in:
:info:build ld: warning: directory not found for option '-L/opt/local/lib/ImageMagick-6.9.10' :info:build ld: library not found for -lgomp
comment:12 Changed 5 years ago by kencu (Ken)
mine (succeeds):
libtool: link: /usr/bin/clang -o coders/.libs/dng.so -bundle coders/.libs/dng_la-dng.o -L/opt/local/lib magick/.libs/libMagickCore-6.Q16.dylib /opt/local/lib/libfftw3.dylib /opt/local/lib/libxml2.dylib /opt/local/lib/libfontconfig.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libXext.dylib /opt/local/lib/libSM.dylib /opt/local/lib/libICE.dylib /opt/local/lib/libX11.dylib /opt/local/lib/libXt.dylib /opt/local/lib/liblzma.dylib -lbz2 -lz /opt/local/lib/libltdl.dylib -lm /opt/local/lib/libraw_r.dylib -lstdc++ /opt/local/lib/liblcms2.dylib -Os -arch x86_64 -mtune=corei7 -pthread -Wl,-headerpad_max_install_names -arch x86_64 -pthread -Wl,-exported_symbols_list,coders/.libs/dng-symbols.expsym
yours (fails)
libtool: link: /usr/bin/clang -o coders/.libs/dng.so -bundle coders/.libs/dng_la-dng.o -L/opt/local/lib magick/.libs/libMagickCore-6.Q16.dylib /opt/local/lib/libfftw3.dylib /opt/local/lib/libxml2.dylib /opt/local/lib/libfontconfig.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libXext.dylib /opt/local/lib/libSM.dylib /opt/local/lib/libICE.dylib /opt/local/lib/libX11.dylib /opt/local/lib/libXt.dylib /opt/local/lib/liblzma.dylib -lbz2 -lz /opt/local/lib/libltdl.dylib -lm /opt/local/lib/libraw_r.dylib -lstdc++ /opt/local/lib/liblcms2.dylib -Os -arch x86_64 -mtune=penryn -pthread -Wl,-headerpad_max_install_names -arch x86_64 -fopenmp -pthread -fopenmp -Wl,-exported_symbols_list,coders/.libs/dng-symbols.expsym
comment:13 follow-up: 14 Changed 5 years ago by kencu (Ken)
try this:
cd /opt/local/lib/pkgconfig
search in there for a file containing fopenmp
.
comment:14 Changed 5 years ago by iEFdev
Replying to kencu:
try this:
cd /opt/local/lib/pkgconfigsearch in there for a file containing
fopenmp
.
Here's my output:
$ find . -type f | xargs grep fopenmp ./ImageMagick++-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./ImageMagick++.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./ImageMagick-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./ImageMagick.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./libraw.pc:Libs: -L${libdir} -lraw -lstdc++ -fopenmp ./libraw_r.pc:Libs: -L${libdir} -lraw_r -lstdc++ -fopenmp ./Magick++-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./Magick++.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./MagickCore-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./MagickCore.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./MagickWand-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./MagickWand.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./Wand-6.Q16.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ./Wand.pc:Cflags: -I${includearchdir} -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
comment:15 follow-up: 18 Changed 5 years ago by kencu (Ken)
So I think you have to get rid of all those, (ie uninstall the broken ImageMagick with all the -fopenmp
flags), and then your install should go OK. Hopefully.
comment:16 Changed 5 years ago by kencu (Ken)
Hmm. libraw
is not right either -- it should not have fopenmp
and should not have lstdc++
. We'll need to work on that one too, I see.
comment:17 Changed 5 years ago by kencu (Ken)
Well, I just had the same situation as you, and ImageMagick
on 10.5 Leopard built right on through, ignoring all the -fopenmp
flags in the pkgconfig
directory ( and replacing most of them with the non-fopenmp versions). So that might not fix it either. I'm sorry I'm not appearing to hit right on the fix you need.
comment:18 Changed 5 years ago by iEFdev
Replying to kencu:
So I think you have to get rid of all those, (ie uninstall the broken ImageMagick with all the
-fopenmp
flags), and then your install should go OK. Hopefully.
Ok, I'll try that. Thanks.
Did you want the output from lgomp to? I had a little more than the 3 lines above (a few pc files and more gcc-versions).
comment:19 Changed 5 years ago by iEFdev
Didn't see comment:17 when I wrote. Guess it's best to wait a little longer then.
comment:20 Changed 5 years ago by lemzwerg (Werner Lemberg)
I'm now rather sure that the problem (at least on my Lion box) is libraw.pc
. Its Libs
value containing -fopenmp
gets added to the libtool invocation, causing the failure.
comment:21 Changed 5 years ago by kencu (Ken)
I was prepared to say the same, until mine upgraded despite that. But easy for you to check, just edit those out...
comment:22 Changed 5 years ago by iEFdev
No it still gives the error from the ticket description with library not found for -lgomp
.
Adding my output for lgomp
Changed 5 years ago by iEFdev
Attachment: | lgomp_lines.txt added |
---|
comment:23 follow-up: 24 Changed 5 years ago by lemzwerg (Werner Lemberg)
Well, uninstalling and installing the libraw
package removed the -fopenmp
in libraw.pc
(the -lstdc++
is still there, though, which deserves a fix, I think), and compilation of ImageMagick succeeded!
comment:24 Changed 5 years ago by iEFdev
Replying to lemzwerg:
Well, uninstalling and installing the
libraw
package removed the-fopenmp
inlibraw.pc
(the-lstdc++
is still there, though, which deserves a fix, I think), and compilation of ImageMagick succeeded!
Thank you! Werner. :+1: That solved it for me as well.
After un/re-installing libraw
, I said no to rev-upgrade
, and then ran a normal upgrade (to get the new one).
comment:25 Changed 5 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I just notice that in
main.log
there is no information what version and variants have been requested – for me it's going to installImageMagick @6.9.9-40_7+x11
. Wouldn't it make sense to makeport
add this information to the very top ofmain.log
? This would also help identify variousmake.log
files more easily.