Boost C++ Libraries: Ticket #8928: Build failed boost 1.54 on Mac with zlib source (-sZLIB_SOURCE) with clang and c++11 https://svn.boost.org/trac10/ticket/8928 <p> build fail where compile zlib source in build.v2/standalone/zlib. It is because cxxflags are provided even if compile c source code by clang++ -x c. </p> <pre class="wiki"> "clang++" -x c -O3 -fPIC -std=c++11 -stdlib=libc++ -O3 -finline-functions -Wno-inline -Wall -DNDEBUG -I"/opt/work/zlib-1.2.8" -c -o "bin.v2/standalone/zlib/clang-darwin-4.2.1/release/link-static/threading-multi/adler32.o" "/opt/work/zlib-1.2.8/adler32.c" error: invalid argument '-std=c++11' not allowed with 'C/ObjC' </pre><pre class="wiki">./b2 -d2 -sZLIB_SOURCE=/opt/work/zlib-1.2.8 link=shared,static toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ cxxflags=-fPIC cxxflags="-arch x86_64" linkflags=-stdlib=libc++ linkflags=-headerpad_max_install_names linkflags="-arch x86_64" </pre><pre class="wiki">Mac OS X 10.8.4 % clang --version Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin12.4.0 Thread model: posix </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8928 Trac 1.4.3 Tetsuya Hayashi <tetsu.h@…> Thu, 25 Jul 2013 15:22:33 GMT attachment set https://svn.boost.org/trac10/ticket/8928 https://svn.boost.org/trac10/ticket/8928 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">clang-darwin-cxxflags.patch</span> </li> </ul> Ticket Tetsuya Hayashi <tetsu.h@…> Thu, 25 Jul 2013 15:25:17 GMT <link>https://svn.boost.org/trac10/ticket/8928#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8928#comment:1</guid> <description> <p> atached patch clang-darwin-cxxflags.patch to fix this issue. </p> </description> <category>Ticket</category> </item> </channel> </rss>