apple M1 chip Mac build failed because of */libgtest.a does not contain the arm64 architecture.
- Dominant language
- C++
- Stars
- 39.6k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Include a clear and concise description of what the problem is, including what
you expected to happen, and what actually happened.
Showing All Issues
Ignoring file /Users/walle.fu/.conan/data/googletest/1.8.1/mthor/stable/package/105876dec92f9a83153bf5fcecc0fc2571d7ba2f/lib/libgtest.a, file is universal (x86_64) but does not contain the arm64 architecture: /Users/walle.fu/.conan/data/googletest/1.8.1/mthor/stable/package/105876dec92f9a83153bf5fcecc0fc2571d7ba2f/lib/libgtest.a
Undefined symbol: testing::InitGoogleTest(int*, char**)
Undefined symbol: testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
Undefined symbol: testing::AssertionFailure()
Undefined symbol: testing::AssertionSuccess()
Undefined symbol: testing::Test::Test()
Undefined symbol: testing::Test::~Test()
Undefined symbol: testing::Message::Message()
Undefined symbol: testing::UnitTest::GetInstance()
Undefined symbol: testing::UnitTest::AddEnvironment(testing::Environment*)
Undefined symbol: testing::UnitTest::Run()
Undefined symbol: testing::internal::CmpHelperEQ(char const*, char const*, long long, long long)
Undefined symbol: testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)
Undefined symbol: testing::internal::AssertHelper::~AssertHelper()
Undefined symbol: testing::internal::PrintStringTo(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_ostream >*)
Undefined symbol: testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)
Undefined symbol: testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&, char const*, char const*, char const*)
Undefined symbol: testing::internal::IsTrue(bool)
Undefined symbol: testing::internal::EqFailure(char const*, char const*, std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&, bool)
Undefined symbol: testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::__1::basic_ostream >*)
Undefined symbol: testing::Message::GetString() const
Undefined symbol: testing::internal::AssertHelper::operator=(testing::Message const&) const
Undefined symbol: typeinfo for testing::Test
**Steps to reproduce the bug**
It's important that we are able to reproduce the problem that you are
experiencing. Please provide all code and relevant steps to reproduce the
problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links
to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the
problem are also helpful.
**Does the bug persist in the most recent commit?**
We recommend using the latest commit in the master branch in your projects.
**What operating system and version are you using?**
MAC pro 2021
If you are using a Linux distribution please include the name and version of the
distribution as well.
**What compiler and version are you using?**
Clang 13
Xcode 13.3.1
Please include the output of `gcc -v` or `clang -v`, or the equivalent for your
compiler.
**What build system are you using?**
Mac OS 12.3.1
Please include the output of `bazel --version` or `cmake --version`, or the
equivalent for your build system.
**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start by reproducing the link failure on the reported Mac, compiler, Xcode, and macOS versions, then inspect the Conan googletest package at the reported lib/libgtest.a path. Confirm whether the archive lacks arm64 support and trace how the build selects it. Done means the test build links successfully for arm64 without the reported undefined symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- build-system, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100