You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a similar issue : #7146
and I added the linux os here:
elif is_apple_os(self):
self.options.i18n_backend_iconv = "libiconv" elif self.settings.os == "Linux":
self.options.i18n_backend_iconv = "libiconv"
I also installed the libiconv, and run the cmd again: conan create . --profile:host=aarch64_fsl_gcc9.3 --profile:build=linux -o *:soc=s32g -o *:shared=True
it still failed; the full log refer to the attachment.
Thanks
damonChenzf07
changed the title
[boost] fix libiconv detection (needed by boost locale) for cross compile arm64
[boost] libiconv detection failed while cross compile for arm64
Sep 5, 2023
Description
HI :
I'm cross compiling the boost version 1.74.0 for an arm target;
and I got a build error:
boost/1.74.0:
boost/1.74.0: ERROR: Package '369b954d400112e32f1decde86c96c1a797ef894' build failed
boost/1.74.0: WARN: Build folder /root/.conan/data/boost/1.74.0///build/369b954d400112e32f1decde86c96c1a797ef894/build-release
ERROR: boost/1.74.0: Error in build() method, line 894
self.run(full_command)
ConanException: Error 1 while executing b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/root/.conan/data/boost/1.74.0///source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libiconv threading=multi visibility=hidden link=shared variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/root/.conan/data/libbacktrace/cci.20210118///package/b968ff1f623f0500b893493c3a34b4450f3bac57 -sICONV_PATH=/root/.conan/data/libiconv/1.17///package/b968ff1f623f0500b893493c3a34b4450f3bac57 linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan/data/boost/1.74.0///package/369b954d400112e32f1decde86c96c1a797ef894 -j20 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan/data/boost/1.74.0//_/build/369b954d400112e32f1decde86c96c1a797ef894/build-release"
root@c630a1ba4523:/home/root/workspace/S32G/OpenProject/boost#
I found a similar issue : #7146
and I added the linux os here:
elif is_apple_os(self):
self.options.i18n_backend_iconv = "libiconv"
elif self.settings.os == "Linux":
self.options.i18n_backend_iconv = "libiconv"
I also installed the libiconv, and run the cmd again: conan create . --profile:host=aarch64_fsl_gcc9.3 --profile:build=linux -o *:soc=s32g -o *:shared=True
it still failed; the full log refer to the attachment.
Thanks
Package and Environment Details
Conan profile
toolchain=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux
target_sysroot=/opt/fsl-auto/32.0/sysroots/cortexa53-crypto-fsl-linux
target_host=aarch64-fsl-linux
cc_compiler=gcc
cxx_compiler=g++
[buildenv]
CHOST=$target_host
AR=$target_host-ar
AS=$target_host-as
[env]
CONAN_CMAKE_FIND_ROOT_PATH=$toolchain
CHOST=$target_host
CC=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-$cc_compiler
CXX=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-$cxx_compiler
STRIP=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-strip
CXXFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=$target_sysroot "
CFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=$target_sysroot "
[buildenv]
CHOST=$target_host
AR=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-ar
AS=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-as
RANLIB=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-ranlib
CC=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-$cc_compiler
CXX=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-$cxx_compiler
LD=$toolchain/usr/bin/aarch64-fsl-linux/$target_host-ld
CXXFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=$target_sysroot "
CFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=$target_sysroot "
[settings]
os=Linux
arch=armv8
compiler=gcc
compiler.version=9.3
compiler.libcxx=libstdc++11
compiler.distro=fsl
build_type=Release
Steps to reproduce
cd boost
conan create . --profile:host=aarch64_fsl_gcc9.3 --profile:build=linux -o *:soc=s32g -o *:shared=True
Logs
Click to expand log
root@c630a1ba4523:/home/root/workspace/S32G/OpenProject/boost# conan create . --profile:host=aarch64_fsl_gcc9.3 --profile:build=linux -o *:soc=s32g -o *:shared=True
Exporting package recipe
boost/1.74.0 exports: File 'conandata.yml' found. Exporting it...
boost/1.74.0 exports: Copied 1 '.yml' file: conandata.yml
boost/1.74.0: Calling export()
boost/1.74.0: Copied 1 '.yml' file: dependencies-1.74.0.yml
boost/1.74.0: Calling export_sources()
boost/1.74.0: The stored package has not changed
boost/1.74.0: Using the exported files summary hash as the recipe revision: a8866fa7136079b6f69d8edc134f7ad4
boost/1.74.0: Exported revision: a8866fa7136079b6f69d8edc134f7ad4
Configuration (profile_host):
[settings]
arch=armv8
build_type=Release
compiler=gcc
compiler.distro=fsl
compiler.libcxx=libstdc++11
compiler.version=9.3
os=Linux
[options]
*:shared=True
*:soc=s32g
[build_requires]
[env]
CC=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-gcc
CFLAGS= -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=/opt/fsl-auto/32.0/sysroots/cortexa53-crypto-fsl-linux
CHOST=aarch64-fsl-linux
CONAN_CMAKE_FIND_ROOT_PATH=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux
CXX=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++
CXXFLAGS= -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=/opt/fsl-auto/32.0/sysroots/cortexa53-crypto-fsl-linux
STRIP=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-strip
[buildenv]
CHOST=aarch64-fsl-linux
AR=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ar
AS=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-as
RANLIB=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ranlib
CC=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-gcc
CXX=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++
LD=/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ld
CXXFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=/opt/fsl-auto/32.0/sysroots/cortexa53-crypto-fsl-linux "
CFLAGS=" -mcpu=cortex-a53 -march=armv8-a+crc+crypto --sysroot=/opt/fsl-auto/32.0/sysroots/cortexa53-crypto-fsl-linux "
Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=5.4
os=Linux
[options]
[build_requires]
[env]
=============i18n_backend_iconv: libiconv
=============i18n_backend: deprecated
=============without_locale: False
boost/1.74.0: Forced build from source
Installing package: boost/1.74.0
Requirements
boost/1.74.0 from local cache - Cache
bzip2/1.0.8 from local cache - Cache
libbacktrace/cci.20210118 from local cache - Cache
libiconv/1.17 from local cache - Cache
zlib/1.2.13 from local cache - Cache
Packages
boost/1.74.0:369b954d400112e32f1decde86c96c1a797ef894 - Build
bzip2/1.0.8:389efd4b37e7fb1bebe9450afa41eaafd7bcda49 - Cache
libbacktrace/cci.20210118:b968ff1f623f0500b893493c3a34b4450f3bac57 - Cache
libiconv/1.17:b968ff1f623f0500b893493c3a34b4450f3bac57 - Cache
zlib/1.2.13:b968ff1f623f0500b893493c3a34b4450f3bac57 - Cache
Build requirements
b2/4.9.6 from local cache - Cache
Build requirements packages
b2/4.9.6:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache
Cross-build from 'Linux:x86_64' to 'Linux:armv8'
Installing (downloading, building) binaries...
b2/4.9.6: Already installed!
bzip2/1.0.8: Already installed!
libbacktrace/cci.20210118: Already installed!
libiconv/1.17: Already installed!
zlib/1.2.13: Already installed!
boost/1.74.0: Applying build-requirement: b2/4.9.6
boost/1.74.0: WARN: Build folder is dirty, removing it: /root/.conan/data/boost/1.74.0///build/369b954d400112e32f1decde86c96c1a797ef894
boost/1.74.0: Building your package in /root/.conan/data/boost/1.74.0///build/369b954d400112e32f1decde86c96c1a797ef894
boost/1.74.0: Generator txt created conanbuildinfo.txt
boost/1.74.0: Calling generate()
boost/1.74.0: Aggregating env generators
boost/1.74.0: Calling build()
boost/1.74.0: WARN: replace_in_file didn't find pattern '/* thread_local /' in '/root/.conan/data/boost/1.74.0///source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.74.0: WARN: replace_in_file didn't find pattern '/ static __thread */' in '/root/.conan/data/boost/1.74.0///source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.74.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/root/.conan/data/boost/1.74.0///source/src/tools/build/src/tools/gcc.jam' file.
boost/1.74.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/root/.conan/data/boost/1.74.0///source/src/tools/build/src/tools/gcc.jam' file.
boost/1.74.0: WARN: replace_in_file didn't find pattern ' @numa' in '/root/.conan/data/boost/1.74.0///source/src/libs/fiber/build/Jamfile.v2' file.
boost/1.74.0: WARN: Patching user-config.jam
boost/1.74.0: WARN:
using zlib : 1.2.13 : "/root/.conan/data/zlib/1.2.13///package/b968ff1f623f0500b893493c3a34b4450f3bac57/include" "/root/.conan/data/zlib/1.2.13///package/b968ff1f623f0500b893493c3a34b4450f3bac57/lib" z ;
using bzip2 : 1.0.8 : "/root/.conan/data/bzip2/1.0.8///package/389efd4b37e7fb1bebe9450afa41eaafd7bcda49/include" "/root/.conan/data/bzip2/1.0.8///package/389efd4b37e7fb1bebe9450afa41eaafd7bcda49/lib" bz2 ;
using "gcc" : : "/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++" :
"/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ar" "/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ranlib" "-I/root/.conan/data/libbacktrace/cci.20210118///package/b968ff1f623f0500b893493c3a34b4450f3bac57/include" "-L/root/.conan/data/libbacktrace/cci.20210118///package/b968ff1f623f0500b893493c3a34b4450f3bac57/lib" ;
boost/1.74.0: Cross building, detecting compiler...
boost/1.74.0: Cross building flags: []
boost/1.74.0: WARN: b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/root/.conan/data/boost/1.74.0///source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libiconv threading=multi visibility=hidden link=shared variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/root/.conan/data/libbacktrace/cci.20210118///package/b968ff1f623f0500b893493c3a34b4450f3bac57 -sICONV_PATH=/root/.conan/data/libiconv/1.17///package/b968ff1f623f0500b893493c3a34b4450f3bac57 linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan/data/boost/1.74.0///package/369b954d400112e32f1decde86c96c1a797ef894 -j20 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan/data/boost/1.74.0///build/369b954d400112e32f1decde86c96c1a797ef894/build-release"
notice: found boost-build.jam at /root/.conan/data/boost/1.74.0///source/src/boost-build.jam
notice: loading B2 from /root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel/bootstrap.jam
notice: Searching '/etc' '/root' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/util' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/build' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/tools' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/contrib' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/root' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/kernel' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/util' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/build' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/tools' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/contrib' '/root/.conan/data/b2/4.9.6///package/4db1be536558d833e52e862fd84d64d75c2b3656/bin/.b2/.'.
notice: Loading explicitly specified user configuration file:
/root/.conan/data/boost/1.74.0///source/src/tools/build/user-config.jam
notice: Searching '/root/.conan/data/boost/1.74.0///source/src/tools/build' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/root/.conan/data/boost/1.74.0///source/src/tools/build'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: will use '/opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++' for gcc, condition gcc-9
notice: using gcc libraries :: gcc-9 :: /opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/bin /opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/lib /opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/lib32 /opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/lib64
notice: using gcc archiver :: gcc-9 :: /opt/fsl-auto/32.0/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ar
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /root/.conan/data/boost/1.74.0//_/source/src/tools/build/user-config.jam:5
notice: using rc compiler :: gcc-9 :: as
notice: [zlib] zlib is already configured
notice: [bzip2] bzip is already configured
notice: iostreams: not using lzma compression
notice: iostreams: not using zstd compression
notice: [python-cfg] Configuring python...
notice: [python-cfg] Checking interpreter command "python"...
notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command: "python"
notice: [python-cfg] include path: "/usr/include/python3.8"
notice: [python-cfg] library path: "/usr/lib/python3.8/config" "/usr/lib"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy disabled. Reason:
notice: [python-cfg] python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())" aborted with
notice: [python-cfg] Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'numpy'
Performing configuration checks
boost/1.74.0:
boost/1.74.0: ERROR: Package '369b954d400112e32f1decde86c96c1a797ef894' build failed
boost/1.74.0: WARN: Build folder /root/.conan/data/boost/1.74.0///build/369b954d400112e32f1decde86c96c1a797ef894/build-release
ERROR: boost/1.74.0: Error in build() method, line 894
self.run(full_command)
ConanException: Error 1 while executing b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/root/.conan/data/boost/1.74.0///source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libiconv threading=multi visibility=hidden link=shared variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/root/.conan/data/libbacktrace/cci.20210118///package/b968ff1f623f0500b893493c3a34b4450f3bac57 -sICONV_PATH=/root/.conan/data/libiconv/1.17///package/b968ff1f623f0500b893493c3a34b4450f3bac57 linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan/data/boost/1.74.0///package/369b954d400112e32f1decde86c96c1a797ef894 -j20 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan/data/boost/1.74.0//_/build/369b954d400112e32f1decde86c96c1a797ef894/build-release"
root@c630a1ba4523:/home/root/workspace/S32G/OpenProject/boost#
The text was updated successfully, but these errors were encountered: