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

[bug] Abseil build fails on Apple silicon #17142

Open
andrea-cassioli-maersk opened this issue Oct 9, 2024 · 2 comments
Open

[bug] Abseil build fails on Apple silicon #17142

andrea-cassioli-maersk opened this issue Oct 9, 2024 · 2 comments
Assignees

Comments

@andrea-cassioli-maersk
Copy link

Describe the bug

I have bumped the protobuf version to the latest (5.27.0) and this seems to trigger a dependency on abseil/20240116.2, forcing a build from source.

The build however fails with the message:

clang++: error: unsupported option '-msse4.1' for target 'arm64-apple-darwin23.6.0'
make[2]: *** [absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o] Error 1
make[1]: *** [absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

In my understanding '-msse4.1' is an intel specific option that hsould not be used running on Apple silicon and building on clang.

Some more from the logs

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=14
os=Macos

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=14
os=Macos


======== Computing dependency graph ========
Graph root
    conanfile.py: /Users/XXXXXXXX/workspace/DST-Network-Design/conanfile.py
Requirements
    abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache
    protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806 - Cache


======== Computing necessary packages ========
abseil/20240116.2: Forced build from source
protobuf/5.27.0: Forced build from source
Requirements
    abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:c8791fc52b59bf6c9813a10e89216b6956010ac6 - Build
    
protobuf/5.27.0#ccce9aa25886556c6d66c77b2be4d806:fc002b7f4063b4c1e456597347cce63f955b604b - Build
    
Build requirements

======== Installing packages ========

-------- Installing package abseil/20240116.2 (1 of 19) --------
abseil/20240116.2: Building from source
abseil/20240116.2: Package abseil/20240116.2:c8791fc52b59bf6c9813a10e89216b6956010ac6
abseil/20240116.2: Copying sources to build folder
abseil/20240116.2: Building your package in /Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b
abseil/20240116.2: Calling generate()
abseil/20240116.2: Generators folder: /Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b/build/Release/generators
abseil/20240116.2: CMakeToolchain generated: conan_toolchain.cmake
abseil/20240116.2: CMakeToolchain generated: /Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b/build/Release/generators/CMakePresets.json
abseil/20240116.2: CMakeToolchain generated: /Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b/src/CMakeUserPresets.json
abseil/20240116.2: Generating aggregated env files
abseil/20240116.2: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
abseil/20240116.2: Calling build()
abseil/20240116.2: Apply patch (portability): link libm to absl string
abseil/20240116.2: Apply patch (portability): Fix GCC 7 including <filesystem> in C++17 mode when it is not available (until GCC 8)
abseil/20240116.2: Apply patch (portability): Do not build test_allocator target when tests are disabled
abseil/20240116.2: Running CMake.configure()
abseil/20240116.2: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/p" -DCMAKE_POLICY_DEFAULT_CMP0067="NEW" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b/src"
-- Using Conan toolchain: /Users/XXXXXXXX/.conan2/p/b/absei2819cfdae8a7f/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Defining libcxx as C++ flags: -stdlib=libc++
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is Clang 18.1.8
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/opt/llvm@18/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Success
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20 - Failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test USE_STD_STRING_VIEW
-- Performing Test USE_STD_STRING_VIEW - Success
-- Performing Test USE_STD_ANY
-- Performing Test USE_STD_ANY - Success
-- Performing Test USE_STD_OPTIONAL
-- Performing Test USE_STD_OPTIONAL - Success
-- Performing Test USE_STD_VARIANT
-- Performing Test USE_STD_VARIANT - Success

How to reproduce it

No response

@memsharded memsharded self-assigned this Oct 9, 2024
@memsharded
Copy link
Member

Hi @andrea-cassioli-maersk

Thanks for reporting.
This is a bit unexpected, we do builds with Apple armv8 architecture in ConanCenter, not sure what would be the issue, or how it passed.

I don't have a Mac to test, I am going to ask for help to @franramirez688.

@andrea-cassioli-maersk
Copy link
Author

@memsharded let me know if you need more information. Btw, could it help if protobuf were to depend on the latest abseil?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants