Page 1 of 1

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

Posted: 2013-10-28T19:24:09-07:00
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.