Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] <boost>/<1.77.0>: Conan's cached binary seems wrong #13168

Closed
thejohnfreeman opened this issue Sep 27, 2022 · 1 comment
Closed

[package] <boost>/<1.77.0>: Conan's cached binary seems wrong #13168

thejohnfreeman opened this issue Sep 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@thejohnfreeman
Copy link
Contributor

Description

I have a project that depends on Boost. When I run conan install, it downloads a binary from Conan Center. When I try to link, I get this error:

/usr/bin/ld.gold: error: /home/jfreeman/.conan/data/boost/1.77.0/_/_/package/dc8aedd23a0f0a773a5fcdcfe1ae3e89c4205978/lib/libboost_container.a(alloc_lib.o): requires unsupported dynamic reloc 11; recompile with -fPIC

When I reinstall dependencies with --build boost, I can link successfully.

The project is rippled, branch conan. It uses the default value True for the boost package option fPIC.

Package and Environment Details

  • Package Name/Version: boost/1.77.0
  • Operating System+version: Linux Ubuntu 22.04
  • Compiler+version: GCC 11
  • Conan version: conan 1.52.0
  • Python version: Python 3.9.13

Conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

conan install .. --build missing
cmake ..
cmake --build .

Logs

Click to expand log
/usr/bin/ld.gold: error: /home/jfreeman/.conan/data/boost/1.77.0/_/_/package/dc8aedd23a0f0a773a5fcdcfe1ae3e89c4205978/lib/libboost_container.a(alloc_lib.o): requires unsupported dynamic reloc 11; recompile with -fPIC
@thejohnfreeman thejohnfreeman added the bug Something isn't working label Sep 27, 2022
@MorganBergen
Copy link

ConanException: build process for the Boost library failed during the execution of the b2

I may have a congruent issue, however I'm not sure.

workflow

❯ 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
❯ conan profile update settings.compiler.cppstd=20 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

problem

❯ 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"

system's hardware and software configuration

OS: macOS 13.4 22F66 arm64
Host: MacBookPro18,3
Kernel: 22.5.0
Uptime: 20 hours, 55 mins
Packages: 56 (brew)
Shell: zsh 5.9
Terminal: iTerm2
Terminal Font: MesloLGS-NF-Regular 13
CPU: Apple M1 Pro
Memory: 2026MiB / 16384MiB

tools on system

❯ gcc --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
❯ g++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
❯ clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
❯ clang++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
❯ cmake --version
cmake version 3.26.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants