Boost C++ Libraries: Ticket #12573: b2 ignores <archiver> <ranlib> and other flags selecting toolchain https://svn.boost.org/trac10/ticket/12573 <p> Building boost from sources git tag 1.62.0 (4f2bdeb93a4be13ba0dc5e9f44920a2bf67191fc) I want to crossbuild it, on linux (ubuntu) host, for Mac OS X target. </p> <p> Goal: crossbuild the lib boost, with boost-locale </p> <p> Result: boost calls my crossbuilder clang++, but calls incorrect (native system) ar, ranlib, etc. As result the produced .a files contain .o objects for Mach-O, but are packed it seems in some incorrect way, they fail when trying to actually use them in crossbuild of a hello world that uses them. </p> <p> Expected result: b2 build should call provided -ar and -ranlib tools, e.g. /home/ubuntu/build/osxcross/target/bin/x86_64-apple-darwin15-ar </p> <p> Reproduce: </p> <p> I write the configuration file: </p> <p> $ cat ~/user-config.jam </p> <pre class="wiki">using clang : : /home/ubuntu/build/osxcross/target/bin/x86_64-apple-darwin15-clang++ : &lt;archiver&gt;"/home/ubuntu/build/osxcross/target/bin/x86_64-apple-darwin15-ar-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" &lt;striper&gt;"/home/ubuntu/build/osxcross/target/bin/x86_64-apple-darwin15-strip" &lt;ranlib&gt;"/home/ubuntu/build/osxcross/target/bin/x86_64-apple-darwin15-ranlib" : ; </pre><p> Mac OSX SDK is provided in e.g. /home/ubuntu/build/macsdk/MacOSX10.11.sdk </p> <p> Then I call boost build as: </p> <pre class="wiki">export WITH_ICONV="/home/ubuntu/build/macsdk/MacOSX10.11.sdk/usr/" &amp;&amp; git clean -xdf ; git submodule foreach git clean -xdf; ./bootstrap.sh --without-icu &amp;&amp; ./b2 headers &amp;&amp; export OSX_CPU_ARCH="core2" &amp;&amp; export OSX_VERSION_MIN="10.8" &amp;&amp; time strace -fffff -s 2000 -e trace=process ./b2 --toolset=clang --build-type=complete "--with-filesystem" "--with-system" "--with-program_options" "--with-thread" "--with-locale" cxxflags=-mmacosx-version-min=${OSX_VERSION_MIN} cxxflags=-march=${OSX_CPU_ARCH} target-os=darwin architecture=x86 address-model=64 --layout=tagged link=static runtime-link=static -sNO_BZIP2=1 --sNO_ZLIB=1 --prefix=/home/ubuntu/build/boost/build-osx/ threading=multi -sICONV_PATH="$WITH_ICONV" --prefix="/home/ubuntu/build/boost/build-osx/" --user-config=/home/ubuntu/user-config.jam install &amp;&gt; ~/strace </pre><p> You can also remove the strace part "strace -fffff -s 2000 -e trace=process" and the end redirection. </p> <p> Then I see in ~/strace that normal systems ar and ranlib are used. Also, providing not-existing ar program "-AAAAAAAAAAAAA" should cause build error, but it does not. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12573 Trac 1.4.3 edaskel@… Tue, 08 Nov 2016 22:33:00 GMT component changed https://svn.boost.org/trac10/ticket/12573#comment:1 https://svn.boost.org/trac10/ticket/12573#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Building Boost</span> </li> </ul> Ticket anonymous Wed, 15 Mar 2017 21:40:12 GMT <link>https://svn.boost.org/trac10/ticket/12573#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12573#comment:2</guid> <description> <p> This is a big problem for building boost for Android, on Mac OS. We need to specify the ar/ranlib from the Android toolchain - the system default one does not work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 15 Mar 2017 21:40:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12573#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12573#comment:2</guid> <description> <p> This is a big problem for building boost for Android, on Mac OS. We need to specify the ar/ranlib from the Android toolchain - the system default one does not work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 15 Mar 2017 21:40:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12573#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12573#comment:2</guid> <description> <p> This is a big problem for building boost for Android, on Mac OS. We need to specify the ar/ranlib from the Android toolchain - the system default one does not work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 15 Mar 2017 21:40:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12573#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12573#comment:2</guid> <description> <p> This is a big problem for building boost for Android, on Mac OS. We need to specify the ar/ranlib from the Android toolchain - the system default one does not work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 15 Mar 2017 21:40:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12573#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12573#comment:2</guid> <description> <p> This is a big problem for building boost for Android, on Mac OS. We need to specify the ar/ranlib from the Android toolchain - the system default one does not work. </p> </description> <category>Ticket</category> </item> </channel> </rss>