Building with clang++ --stdlib=libc++

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
DanKegel
Posts: 11
Joined: 2013-06-06T11:04:20-07:00
Authentication code: 6789

Building with clang++ --stdlib=libc++

Post by DanKegel »

mageMagick's build complains

"Undefined symbols for architecture i386:
"std::__1::basic_string...".

This means most things were built with "clang++ -std=c++11 -stdlib=libc++", but the linker isn't linking to libc++ for some reason.

Two workarounds were required:

1) Using a libtool that has been built with commit c0c49f289f22ae670066657c60905986da3b555f (cherrypicking it works fine), run "libtoolize -f" to give ImageMagick a newer libtool.

2) When configuring ImageMagick, have CXXLD="clang++ -stdlib=libc++" in the environment.

Presumably #1 will be fixed by libtool-2.4.3 someday. ImageMagick's maintainer might consider using a fixed libtool sooner than that.

Dunno if #2 is a bug or not... maybe that's the way it's supposed to work.

I also had to use --disable-opencl because clparser isn't available in newer MacOSX.
Post Reply