conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
960 stars 1.77k forks source link

[boost] boost/1.71: bootstrap fails on Raspberry pi4 #1316

Open sujankota opened 4 years ago

sujankota commented 4 years ago

Package and Environment Details

Steps to reproduce

Unable to build boost 1.71.0

Logs (Include/Attach if Applicable)

Click to expand log ``` Configuration: [settings] arch=armv7 arch_build=armv7 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=8 os=Linux os_build=Linux [options] [build_requires] [env] CC=/usr/bin/gcc CXX=/usr/bin/g++ boost/1.71.0@conan/stable: WARN: Package is corrupted, removing folder: /root/.conan/data/boost/1.71.0/conan/stable/package/af93f5e37d7722d76f2eb13cb49dcfc894ab239f Installing package: boost/1.71.0@conan/stable Requirements boost/1.71.0@conan/stable from 'conan-center' - Cache bzip2/1.0.8@conan/stable from 'conan-center' - Cache zlib/1.2.11@conan/stable from 'conan-center' - Cache Packages boost/1.71.0@conan/stable:af93f5e37d7722d76f2eb13cb49dcfc894ab239f - Build bzip2/1.0.8@conan/stable:9389a4c2c70b5b37c341b3cae252e60bdd643714 - Cache zlib/1.2.11@conan/stable:d458f0ad17daab8c37a59b910c7b82677fd9d3c0 - Cache Installing (downloading, building) binaries... bzip2/1.0.8@conan/stable: Already installed! zlib/1.2.11@conan/stable: Already installed! boost/1.71.0@conan/stable: WARN: Build folder is dirty, removing it: /root/.conan/data/boost/1.71.0/conan/stable/build/af93f5e37d7722d76f2eb13cb49dcfc894ab239f boost/1.71.0@conan/stable: Building your package in /root/.conan/data/boost/1.71.0/conan/stable/build/af93f5e37d7722d76f2eb13cb49dcfc894ab239f boost/1.71.0@conan/stable: Generator txt created conanbuildinfo.txt boost/1.71.0@conan/stable: Calling build() boost/1.71.0@conan/stable: ./bootstrap.sh -with-toolset=gcc Bootstrapping the build engine with toolset gcc... Bootstrapping is done. To build and install, run: ./b2 install --prefix= boost/1.71.0@conan/stable: WARN: Patching user-config.jam boost/1.71.0@conan/stable: WARN: using zlib : 1.2.11 : /root/.conan/data/zlib/1.2.11/conan/stable/package/d458f0ad17daab8c37a59b910c7b82677fd9d3c0/include /root/.conan/data/zlib/1.2.11/conan/stable/package/d458f0ad17daab8c37a59b910c7b82677fd9d3c0/lib z ; using bzip2 : 1.0.8 : /root/.conan/data/bzip2/1.0.8/conan/stable/package/9389a4c2c70b5b37c341b3cae252e60bdd643714/include /root/.conan/data/bzip2/1.0.8/conan/stable/package/9389a4c2c70b5b37c341b3cae252e60bdd643714/lib bz2 ; using "gcc" : "8" : /usr/bin/g++ : ; boost/1.71.0@conan/stable: WARN: /root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/build/b2 target-os=linux architecture=arm address-model=32 binary-format=elf abi=aapcs --layout=system -sBOOST_BUILD_PATH=/root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/build -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 threading=multi link=static variant=release --without-python toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 cxxflags="-fPIC" boost.locale.icu=off -j6 --abbreviate-paths -d2 --debug-configuration --build-dir="/root/.conan/data/boost/1.71.0/conan/stable/build/af93f5e37d7722d76f2eb13cb49dcfc894ab239f" Unable to load Boost.Build: could not find "boost-build.jam" --------------------------------------------------------------- BOOST_ROOT must be set, either in the environment, or on the command-line with -sBOOST_ROOT=..., to the root of the boost installation. Attempted search from /root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0 up to the root at /root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/share/boost-build and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/build. Please consult the documentation at 'http://www.boost.org'. boost/1.71.0@conan/stable: boost/1.71.0@conan/stable: ERROR: Package 'af93f5e37d7722d76f2eb13cb49dcfc894ab239f' build failed boost/1.71.0@conan/stable: WARN: Build folder /root/.conan/data/boost/1.71.0/conan/stable/build/af93f5e37d7722d76f2eb13cb49dcfc894ab239f ERROR: boost/1.71.0@conan/stable: Error in build() method, line 439 self.run(full_command, run_environment=True) ConanException: Error 1 while executing /root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/build/b2 target-os=linux architecture=arm address-model=32 binary-format=elf abi=aapcs --layout=system -sBOOST_BUILD_PATH=/root/.conan/data/boost/1.71.0/conan/stable/source/boost_1_71_0/tools/build -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 threading=multi link=static variant=release --without-python toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 cxxflags="-fPIC" boost.locale.icu=off -j6 --abbreviate-paths -d2 --debug-configuration --build-dir="/root/.conan/data/boost/1.71.0/conan/stable/build/af93f5e37d7722d76f2eb13cb49dcfc894ab239f" ```
Minimonium commented 4 years ago

A similar error for b2

b2/4.2.0: Calling build()
 ###
 ###
 ### Using 'gcc' toolset.
 ###
 ###
 > g++ --version
 g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
 Copyright (C) 2018 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 ###
 ###
 > g++ -x c++ -std=c++11 -O2 -s -DNDEBUG builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp filesys.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam.cpp jambase.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp object.cpp option.cpp output.cpp parse.cpp pathsys.cpp regexp.cpp rules.cpp scan.cpp search.cpp jam_strings.cpp subst.cpp sysinfo.cpp timestamp.cpp variable.cpp w32_getreg.cpp modules/order.cpp modules/path.cpp modules/property-set.cpp modules/regex.cpp modules/sequence.cpp modules/set.cpp execunix.cpp fileunix.cpp pathunix.cpp -o b2
 > cp b2 bjam
 Unable to load B2: could not find "boost-build.jam"
 ---------------------------------------------------------------
 BOOST_ROOT must be set, either in the environment, or 
 on the command-line with -sBOOST_ROOT=..., to the root
 of the boost installation.
 Attempted search from /root/.conan/data/b2/4.2.0/_/_/build/bdd8d8eb19974ec9ac5c3378330655053c990b8a/source up to the root
 at /root/.conan/data/b2/4.2.0/_/_/build/bdd8d8eb19974ec9ac5c3378330655053c990b8a/source/src/share/boost-build
 and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /usr/share/boost-build.
 Please consult the documentation at 'http://www.boost.org'.
Minimonium commented 4 years ago

@sujankota Do you use qemu by any chance? After investigating the root of the problem seems to be the https://sourceware.org/bugzilla/show_bug.cgi?id=23960

madebr commented 4 years ago

@sujankota Current boost recipes use b2 from a (pre-built) b2 package. So your problem should be fixed.

codewithpassion commented 3 years ago

I've got the same error as @Minimonium and @sujankota. BOOST_ROOT must be set

@madebr There are no pre-built packages available for ARM based linux.

Minimonium commented 3 years ago

@codewithpassion Do you build on the native Raspberry Pi4 system? My issue was related to the compatibility breakage in the glibc which was fixed in the new version of Qemu.

codewithpassion commented 3 years ago

@Minimonium No, I'm building inside a Docker environment using Qemu. Good to hear that it's fixed in a newer version. I will give this a try and let you know the result.

codewithpassion commented 3 years ago

@Minimonium I've updated to qemu-arm-static version 5.2 and b2 is still failing to find "boost-build.jam. This is a docker build environment for a ARM based debian image for a Raspberry Pi

Minimonium commented 3 years ago

The original issue is that if you have a x64 host with a x32 guest - you'll get an overflow on some system calls, because Qemu propagates them through to the host system. In Boost case in particular it breaks build script globbing, but it'd be an issue on literally any project. It's interesting that the latest version doesn't solve the problem, was not aware of that. I suggest to try an old workaround with installing the qemu-user-static:i386, it's correctly propagate system calls.

On Mon, 25 Jan 2021, 04:39 Dominik Fretz, notifications@github.com wrote:

@Minimonium https://github.com/Minimonium I've updated to qemu-arm-static version 5.2 and b2 is still failing to find "boost-build.jam. This is a docker build environment for a ARM based debian image for a Raspberry Pi

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/conan-io/conan-center-index/issues/1316#issuecomment-766486303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECJ7DMRKRTLDEAWRIZBNDDS3TDWZANCNFSM4MD7ZYPA .

madebr commented 3 years ago

Using the following profile, I was able to build boost 1.75.0 on a raspberry pi 3:

$ conan profile show default
Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=armv7
arch_build=armv7
compiler=gcc
compiler.version=6
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
*: cmake/3.19.2
[env]
CONAN_CPU_COUNT=1