Bug 222998 - graphics/ImageMagick: failed to build 6.9.9-15 on 11.1 with error cannot find -lstdc++
Summary: graphics/ImageMagick: failed to build 6.9.9-15 on 11.1 with error cannot find...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-14 08:59 UTC by guyyur
Modified: 2018-02-12 12:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kwm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description guyyur 2017-10-14 08:59:11 UTC
I am trying to build graphics/ImageMagick 6.9.9-15 on 11.1-RELEASE-p1 and I get the following error:

/usr/bin/ld: cannot find -lstdc++
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:5557: Magick++/lib/libMagick++-6.la] Error 1


From configure output it looks like it assumes gcc:
checking for gcc... cc
...
checking whether we are using the GNU C++ compiler... yes


If I add compiler:gcc-c++11-lib to USES it builds successfully.
Comment 1 iron.udjin 2017-10-18 04:57:18 UTC
I have the same error.

System: 11.1-STABLE r324638
Clang: 5.0.0
Comment 2 Koop Mast freebsd_committer freebsd_triage 2017-10-18 10:46:41 UTC
I need more information. IM should build fine with clang on 11.1-R. So we need to find out where the -lstdc++ comes from. Something that ImageMagick is linking against had C++ code that is linked to the -lstdc++.

Can you list the options your using for ImageMagick (make showconfig) and the output of "pkg info -r gcc6"?
Comment 3 guyyur 2017-10-18 17:20:50 UTC
I was building all my ports in a chroot from scratch.
Just a script that does "cd portdir && make install clean" for a list of ports.

no gcc6 (or any gcc port) was installed when ImageMagick was being built.

graphics/ImageMagick was being built as a dependency of graphics/inkscape.
When it failed I tried building by make clean, make install in ImageMagick dir with same result.


make showconfig

===> The following configuration options are available for ImageMagick-nox11-6.9.9.15,1:
     16BIT_PIXEL=on: 16bit pixel support
     BZIP2=on: bzip2 compression support
     DJVU=off: DJVU format support (needs THREADS)
     DOCS=off: Build and/or install documentation
     FFTW=off: Discrete Fourier Transform support
     FONTCONFIG=on: X11 font configuration support
     FPX=off: FlashPix image format support
     FREETYPE=off: TrueType font rendering support
     GRAPHVIZ=off: Graphviz graph drawing support
     GSLIB=off: libgs (Postscript SHLIB) support
     HDRI=off: High dynamic range images support
     JBIG=on: JBIG image format support
     JPEG=on: JPEG image format support
     JPEG2000=on: OpenJPEG 2000 support via openjpeg
     LCMS2=on: Little CMS 2.x support
     LQR=on: Liquid Rescale support
     LZMA=on: LZMA compression support
     MODULES=off: Modules support
     OPENEXR=off: HDR image format support via OpenEXR
     OPENMP=off: Parallel processing support via OpenMP
     PANGO=off: Pango rendering library support
     PDF=off: PDF document support
     PERL=on: Perl scripting language support
     PNG=on: PNG image format support
     RAW=on: RAW format support
     SVG=off: SVG vector image format support (via librsvg)
     TESTS=off: Run bundled self-tests after build
     THREADS=off: Threading support
     TIFF=on: TIFF image format support
     WEBP=on: WebP image format support
     WMF=off: Windows Metafile image format support
     X11=off: X11 (graphics) support
===> Use 'make config' to modify these settings
Comment 4 guyyur 2017-10-18 18:46:32 UTC
The problem happens if the MODULES option is off and RAW option is on.
When MODULES is on, the port builds fine.

With it off, MAGICK_DEP_LIBS includes RAW_R_LIBS and
RAW_R_LIBS=-L/usr/local/lib -lraw_r -lstdc++ -llcms2
Comment 5 guyyur 2017-10-18 19:01:16 UTC
The problem is in libraw not in ImageMagick.
libraw_r.pc and libraw.pc contain -lstdc++

You can close the bug.
Thanks for pointing me in the right direction.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-02-12 12:51:06 UTC
See comment5. I close here.