В письме от среда, 14 октября 2026 г. 07:05:03 MSK пользователь Frédéric via Boost написал:
Hi,
I'm trying to build boost 1.92 on linux targetting arm64-apple-darwin21.4 but it fails on boost.locale because it cannot compile has_external_iconv. iconv is correctly build with libraries for the right architecture. I'm able to run the iconv binary on a mac without any issue.
I found why has_external_iconv fails to build but do not know what to do to change the automatic settings to make it works.
To compile has_external_iconv and confirm that I have the library in the path I provided, boost.build adds the following flags that make the compilation fail:
-m64 --target=arm64-apple-darwin
What makes it work is to remove -m64 and have --target=arm64-apple-darwin21.4
How can I have that?
Clang toolset recently was updated to have a <triple> option. The option allows suppressing and overriding clang's target triple guessing. So, you should be able to use <triple>arm64-apple-darwin21.4 as an option. I don't think there's a way to make the toolset to not add -m64 flag. But it looks like this shouldn't create problems for clang compiler. Also, a suggestion: rather then adding <cxxflags>"-std=c++14" to clang-darwin options add cxxstd=14 to the build request. In order to simplify your command you can add that property to a custom variant defined in your configuration file, e.g. variant myrelease : release : <cxxstd>14 ;