|
Boost : |
From: René Ferdinand Rivera Morell (grafikrobot_at_[hidden])
Date: 2022-04-26 12:19:35
On Fri, Apr 22, 2022 at 8:37 AM Ian Emmons via Boost <boost_at_[hidden]>
wrote:
> I am trying to build Boost 1.79.0 shared libraries on an x86-based Mac
> running the latest MacOS (Monterey, 12.3.1) using the latest Xcode (13.3.1,
> with Appleâs clang 13.1.6). Everything works great for building shared
> libraries that run on an x86-based Mac.
>
> My ideal would be to build a single set of universal (a.k.a. âfatâ)
> binaries that include both x86 and ARM code, but Boost.Build does not seem
> to contain an option to do that. (Such options existed in the past for
> Intel/PowerPC combinations and then later for 64-bit/32-bit Intel
> combinations.)
>
I just put back support for doing that in this change <
https://github.com/bfgroup/b2/commit/0db9a736ba169e70dc29b9bf108495fee7243f8e>.
So on the next B2 release you'll be able to use that.
> Second best is to build two sets of binaries, one for x86 and another for
> ARM. I tried to do this using the option architecture=x86,arm on the b2
> command line, and it does in fact build two sets of binaries with the
> expected file names. For instance, for filesystem it builds these two:
>
> libboost_filesystem-clang-darwin13-mt-a64-1_79.dylib
> libboost_filesystem-clang-darwin13-mt-x64-1_79.dylib
>
> But when I use the âfileâ command to inspect the types of these files,
> they both are reported as "Mach-O 64-bit dynamically linked shared library
> x86_64â.
>
> Am I doing something wrong, here? Or is there a bug in Boost.Build
> regarding cross-compiling?
>
Cross compiling using the Apple clang compiler, i.e. Xcode, is challenging
in the number of flags that need to get passed in. This issue is reported
in the B2 project with a workaround <
https://github.com/bfgroup/b2/issues/105#issuecomment-996124460>.
-- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supone Nada -- Robot Dreams - http://robot-dreams.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk