XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.52k stars 1.46k forks source link

ConanException: build process for the Boost library filed during the execution of b2 #4581

Closed MorganBergen closed 1 year ago

MorganBergen commented 1 year ago

Issue Description

Runtime Error from Thrown Exception via calling, conan install .. --output-folder . --build missing --settings build_type=Release. ConanException: build process for the Boost library failed during the execution of the b2

Steps to Reproduce

❯ conan profile new default --detect
Found apple-clang 14.0
apple-clang>=13, using the major as version
Profile created with detected settings: /Users/mbergen/.conan/profiles/default
❯ conan profile update settings.compiler.cppstd=20 default
❯ l
total 640
drwxr-xr-x  23 mbergen  staff   736B Jun 14 16:03 .
drwxr-xr-x  10 mbergen  staff   320B Jun 12 15:40 ..
-rw-r--r--   1 mbergen  staff   2.5K Jun  6 15:45 .clang-format
-rw-r--r--   1 mbergen  staff    45B Jun  6 15:45 .codecov.yml
drwxr-xr-x  12 mbergen  staff   384B Jun 14 16:06 .git
-rw-r--r--   1 mbergen  staff   171B Jun  6 15:45 .git-blame-ignore-revs
-rw-r--r--   1 mbergen  staff   285B Jun  6 15:45 .gitattributes
drwxr-xr-x   5 mbergen  staff   160B Jun  9 09:16 .github
-rw-r--r--   1 mbergen  staff   1.5K Jun  9 09:16 .gitignore
-rw-r--r--   1 mbergen  staff    16K Jun 14 15:09 BUILD.md
drwxr-xr-x  11 mbergen  staff   352B Jun  9 09:16 Builds
-rw-r--r--   1 mbergen  staff   3.4K Jun 14 10:37 CMakeLists.txt
-rw-r--r--   1 mbergen  staff   7.2K Jun  6 15:45 CONTRIBUTING.md
-rw-r--r--   1 mbergen  staff   902B Jun  6 15:45 LICENSE.md
-rw-r--r--   1 mbergen  staff   6.1K Jun 12 14:40 README.md
-rw-r--r--   1 mbergen  staff   237K Jun  6 15:45 RELEASENOTES.md
-rw-r--r--   1 mbergen  staff   9.9K Jun  9 09:16 SECURITY.md
drwxr-xr-x  16 mbergen  staff   512B Jun  6 15:45 bin
drwxr-xr-x   6 mbergen  staff   192B Jun  9 09:16 cfg
-rw-r--r--   1 mbergen  staff   4.6K Jun 13 09:58 conanfile.py
drwxr-xr-x  16 mbergen  staff   512B Jun  9 09:16 docs
drwxr-xr-x   3 mbergen  staff    96B Jun  9 09:16 external
drwxr-xr-x   7 mbergen  staff   224B Jun  6 15:45 src
❯ conan export external/snappy snappy/1.1.9@
Exporting package recipe
snappy/1.1.9 exports: File 'conandata.yml' found. Exporting it...
snappy/1.1.9 exports: Copied 1 '.yml' file: conandata.yml
snappy/1.1.9: Calling export_sources()
snappy/1.1.9: A new conanfile.py version was exported
snappy/1.1.9: Folder: /Users/mbergen/.conan/data/snappy/1.1.9/_/_/export
snappy/1.1.9: Exported revision: d64c117aaa6d3a61064ba8cec8212db6
❯ mkdir .build
❯ cd .build

Expected Result

conan install .. --output-folder . --build missing --settings build_type="Release"

Configuration:
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=14
os=Macos
os_build=Macos
[options]
boost:extra_b2_flags=define=BOOST_ASIO_HAS_STD_INVOKE_RESULT
[build_requires]
[env]
CC=/usr/bin/gcc
CFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1
CXX=/usr/bin/g++
CXXFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1
[conf]
tools.build:compiler_executables={'c': '/usr/bin/gcc', 'cpp': '/usr/bin/g++'}
...
soci/4.0.3 package(): Packaged 1 '.txt' file: LICENSE_1_0.txt
soci/4.0.3 package(): Packaged 49 '.h' files
soci/4.0.3 package(): Packaged 2 '.a' files: libsoci_sqlite3.a, libsoci_core.a
soci/4.0.3: Package '92bf3150b7bf55000cc57d7621955101b2fb594e' created
soci/4.0.3: Created package revision dfa718277f4f9c88e33e67290d4fcac7
conanfile.py (xrpl/1.11.0): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
conanfile.py (xrpl/1.11.0): Generator 'CMakeDeps' calling 'generate()'
conanfile.py (xrpl/1.11.0): Generator txt created conanbuildinfo.txt
conanfile.py (xrpl/1.11.0): Calling generate()
conanfile.py (xrpl/1.11.0): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
conanfile.py (xrpl/1.11.0): Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release'
conanfile.py (xrpl/1.11.0): If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/mbergen/Documents/Github/rippled/.build/build/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
conanfile.py (xrpl/1.11.0): Aggregating env generators
conanfile.py (xrpl/1.11.0): Generated conaninfo.txt
conanfile.py (xrpl/1.11.0): Generated graphinfo

Actual Result

❯ conan install .. --output-folder . --build missing --settings build_type=Release
Configuration:
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=14
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

boost/1.77.0: Not found in local cache, looking in remotes...
......

35 warnings and 1 error generated.
...failed updating 2 targets...
boost/1.77.0:
boost/1.77.0: ERROR: Package '12a0259a3874809e8c87bd0624bf06329b6d5b82' build failed
boost/1.77.0: WARN: Build folder /Users/mbergen/.conan/data/boost/1.77.0/_/_/build/12a0259a3874809e8c87bd0624bf06329b6d5b82/build-release
ERROR: boost/1.77.0: Error in build() method, line 887
    self.run(full_command)
    ConanException: Error 1 while executing b2 -q numa=on target-os=darwin architecture=arm address-model=64 binary-format=mach-o abi=aapcs --layout=system --user-config=/Users/mbergen/.conan/data/boost/1.77.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=global link=static 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-json --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=clang-darwin cxxflags=-std=c++20 pch=on -sLIBBACKTRACE_PATH=/Users/mbergen/.conan/data/libbacktrace/cci.20210118/_/_/package/240c2182163325b213ca6886a7614c8ed2bf1738 -sICONV_PATH=/Users/mbergen/.conan/data/libiconv/1.17/_/_/package/240c2182163325b213ca6886a7614c8ed2bf1738 linkflags="-stdlib=libc++" cxxflags="-fPIC -stdlib=libc++ -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/Users/mbergen/.conan/data/boost/1.77.0/_/_/package/12a0259a3874809e8c87bd0624bf06329b6d5b82 -j8 --abbreviate-paths -d0 --debug-configuration --build-dir="/Users/mbergen/.conan/data/boost/1.77.0/_/_/build/12a0259a3874809e8c87bd0624bf06329b6d5b82/build-release"

Environment

Supporting Files

potential duplicate issues

4580 issues

dangell7 commented 1 year ago

Hey Morgan,

I'm guessing you just updated your software version? Thats what did me in I suspect.

Run this command and let me know if your conan profile is similar to mine.

conan profile show default

Here is my profile that is working

[settings]
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=14
compiler.libcxx=libc++
build_type=Release
compiler.cppstd=20
[options]
boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"
[conf]
tools.build:cflags=['-DBOOST_ASIO_HAS_STD_INVOKE_RESULT']
tools.build:cxxflags=['-DBOOST_ASIO_HAS_STD_INVOKE_RESULT']
[build_requires]
[env]
CC=clang
CFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT
CXX=clang++
CXXFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT

If its not then update it and then run rm -rf ~/.conan/data to clear out all the old cache.

MorganBergen commented 1 year ago

Yes, I made this issue in relation to a PR I made here

❯ cat default
[settings]
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=14
compiler.libcxx=libc++
build_type=Release
compiler.cppstd=20
[options]
boost:extra_b2_flags=define=BOOST_ASIO_HAS_STD_INVOKE_RESULT
[build_requires]
[env]
CC=/usr/bin/gcc
CFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1
CXXFLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1
cxx=/usr/bin/g++
[conf]
tools.build:compiler_executables={'c': '/usr/bin/gcc', 'cpp': '/usr/bin/g++'}

~/.conan/profiles