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?
Here is my user-config.jam:
using clang-darwin : : arm64-apple-darwin21.4-clang++ :
<archiver>arm64-apple-darwin21.4-ar
<ranlib>arm64-apple-darwin21.4-ranlib <cxxflags
>"-I/softs/arm64-clang-22.1.8/release/iconv/include" <cxxflags>"-I/softs/arm64-clang-22.1.8/release/gettext/include" <cxxflags>"-I/softs/ar
m64-clang-22.1.8/release/bzip2/include"
<cxxflags>"-I/softs/arm64-clang-22.1.8/release/zlib/include"
<cxxflags>"-I/softs/arm64-clang-22.1.8
/release/jpeg-turbo/include"
<cxxflags>"-I/softs/arm64-clang-22.1.8/release/xz/include"
<cxxflags>"-I/softs/arm64-clang-22.1.8/release/tiff
/include" <cxxflags>"-I/softs/arm64-clang-22.1.8/release/png/include"
<cxxflags>"--target=arm64-apple-darwin21.4" <cxxflags>"-std=c++14" <c
xxflags>"-mmacosx-version-min=12.3" <cxxflags>"-O2"
<cxxflags>"-DNDEBUG" <linkflags>"-mmacosx-version-min=12.3"
<linkflags>"-L/softs/arm64-
clang-22.1.8/release/iconv/lib"
<linkflags>"-L/softs/arm64-clang-22.1.8/release/gettext/lib"
<linkflags>"-L/softs/arm64-clang-22.1.8/releas
e/bzip2/lib" <linkflags>"-L/softs/arm64-clang-22.1.8/release/zlib/lib"
<linkflags>"-L/softs/arm64-clang-22.1.8/release/jpeg-turbo/lib" <lin
kflags>"-L/softs/arm64-clang-22.1.8/release/xz/lib"
<linkflags>"-L/softs/arm64-clang-22.1.8/release/tiff/lib"
<linkflags>"-L/softs/arm64-cl
ang-22.1.8/release/png/lib" ;
Here is my b2 command:
CC="arm64-apple-darwin21.4-clang" CFLAGS="-O2 -DNDEBUG
--target=arm64-apple-darwin21.4 -mmacosx-version-min=12.3"
CXX="arm64-apple-darwin21
.4-clang++" CXXFLAGS="-O2 -DNDEBUG --target=arm64-apple-darwin21.4
-std=c++14 -mmacosx-version-min=12.3" OBJCXXFLAGS="-O2 -DNDEBUG
--target
=arm64-apple-darwin21.4 -std=c++14 -mmacosx-version-min=12.3"
CPPFLAGS="-I/softs/arm64-clang-22.1.8/release/iconv/include
-I/softs/arm64-cl
ang-22.1.8/release/gettext/include
-I/softs/arm64-clang-22.1.8/release/bzip2/include
-I/softs/arm64-clang-22.1.8/release/zlib/include -I/so
fts/arm64-clang-22.1.8/release/jpeg-turbo/include
-I/softs/arm64-clang-22.1.8/release/xz/include
-I/softs/arm64-clang-22.1.8/release/tiff/i
nclude -I/softs/arm64-clang-22.1.8/release/png/include"
LDFLAGS="-mmacosx-version-min=12.3
-L/softs/arm64-clang-22.1.8/release/iconv/lib -L
/softs/arm64-clang-22.1.8/release/gettext/lib
-L/softs/arm64-clang-22.1.8/release/bzip2/lib
-L/softs/arm64-clang-22.1.8/release/zlib/lib -L
/softs/arm64-clang-22.1.8/release/jpeg-turbo/lib
-L/softs/arm64-clang-22.1.8/release/xz/lib
-L/softs/arm64-clang-22.1.8/release/tiff/lib -L
/softs/arm64-clang-22.1.8/release/png/lib"
AR="arm64-apple-darwin21.4-ar" AS="arm64-apple-darwin21.4-as"
RANLIB="arm64-apple-darwin21.4-ran
lib" BUILD_MACHINE="x86_64-unknown-linux-gnu"
HOST_MACHINE="arm64-apple-darwin21.4" ./b2 -d2 -j16
boost.locale.iconv=on boost.locale.icu=of
f boost.locale.std=off
-sICONV_PATH=/softs/arm64-clang-22.1.8/release/iconv
-sBZIP2_INCLUDE=/softs/arm64-clang-22.1.8/release/bzip2/include
-sBZIP2_LIBPATH=/softs/arm64-clang-22.1.8/release/bzip2/lib
-sZLIB_INCLUDE=/softs/arm64-clang-22.1.8/release/zlib/include
-sZLIB_LIBPATH=/
softs/arm64-clang-22.1.8/release/zlib/lib --layout=system
--user-config=user-config.jam --without-mpi --without-python
--without-context --
without-coroutine link=static threading=multi runtime-link=shared
target-os=darwin architecture=arm binary-format=mach-o
threadapi=pthread
define=BOOST_FILESYSTEM_NO_DEPRECATED
define=BOOST_LOG_WITHOUT_EVENT_LOG variant=release install
Thanks for help,
F