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

[abseil] build failure using x64-osx triplet in Apple Sillicon #17436

Closed
david-antiteum opened this issue Apr 22, 2021 · 7 comments
Closed

[abseil] build failure using x64-osx triplet in Apple Sillicon #17436

david-antiteum opened this issue Apr 22, 2021 · 7 comments
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@david-antiteum
Copy link
Contributor

Host Environment

  • OS: Big Sur in a M1 machine
  • Compiler: Apple clang version 12.0.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install abseil --triplet x64-osx

Failure logs

[50/172] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean -fPIC -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -std=gnu++11 -MD -MT absl/flags/CMakeFiles/flags_program_name.dir/internal/program_name.cc.o -MF absl/flags/CMakeFiles/flags_program_name.dir/internal/program_name.cc.o.d -o absl/flags/CMakeFiles/flags_program_name.dir/internal/program_name.cc.o -c /Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean/absl/flags/internal/program_name.cc
[51/172] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean -fPIC -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -std=gnu++11 -MD -MT absl/hash/CMakeFiles/city.dir/internal/city.cc.o -MF absl/hash/CMakeFiles/city.dir/internal/city.cc.o.d -o absl/hash/CMakeFiles/city.dir/internal/city.cc.o -c /Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean/absl/hash/internal/city.cc
[52/172] : && /Users/Shared/vcpkg/downloads/tools/cmake-3.19.2-osx/cmake-3.19.2-macos-universal/CMake.app/Contents/bin/cmake -E rm -f absl/hash/libabsl_city.a && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar qc absl/hash/libabsl_city.a  absl/hash/CMakeFiles/city.dir/internal/city.cc.o && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib absl/hash/libabsl_city.a && /Users/Shared/vcpkg/downloads/tools/cmake-3.19.2-osx/cmake-3.19.2-macos-universal/CMake.app/Contents/bin/cmake -E touch absl/hash/libabsl_city.a && :
[53/172] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean -fPIC -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -march=armv8-a+crypto -std=gnu++11 -MD -MT absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o -MF absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o.d -o absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o -c /Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean/absl/random/internal/randen_hwaes.cc
FAILED: absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean -fPIC -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -march=armv8-a+crypto -std=gnu++11 -MD -MT absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o -MF absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o.d -o absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o -c /Users/Shared/vcpkg/buildtrees/abseil/src/ca9688e9f6-e4cda1d679.clean/absl/random/internal/randen_hwaes.cc
error: unknown target CPU 'armv8-a+crypto'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, icelake-server, tigerlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, x86-64

Additional context
ARM64 version compiles just fine:
vcpkg install abseil --triplet arm64-osx

The x64-osx version is required in the M1 because gRPC defines "host": true.

@autoantwort
Copy link
Contributor

Maybe do #17344 as a workaround

@JackBoosY
Copy link
Contributor

Does your mac use arm architecture?

@david-antiteum
Copy link
Contributor Author

Yes, I did the compilation in a Mac with a M1. The trick by @autoantwort from case #17344 works.

BTW, after doing the installation of gRPC, plugins are under x64-osx and, when compiling for arm64-osx they are not found ( find_program( GRPC_CPP_PLUGIN grpc_cpp_plugin ) ).

I did a symlink x64-osx/tools/grpc -> arm64-osx/tools/grpc to bypass the problem.

@JackBoosY
Copy link
Contributor

@strega-nil We have discussed this issue, and I think we should change the code to automatically determine the default triplet in response to changes in the mac architecture.

@autoantwort
Copy link
Contributor

@strega-nil We have discussed this issue, and I think we should change the code to automatically determine the default triplet in response to changes in the mac architecture.

Already done in microsoft/vcpkg-tool#23. But not yet released in a new version

@NancyLi1013
Copy link
Contributor

The changes in microsoft/vcpkg-tool#23 have been released to new version in vcpkg master branch now.

@david-antiteum Could you please update to the latest vcpkg via git pull and run .\bootstrap-vcpkg.sh to try again?

@Adela0814
Copy link
Contributor

The fix has been released. please get the latest version and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests

5 participants