Skip to content

standalone_gtest_setup example fails to build on mac #2889

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

Open
scpeters opened this issue Apr 28, 2025 · 1 comment
Open

standalone_gtest_setup example fails to build on mac #2889

scpeters opened this issue Apr 28, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@scpeters
Copy link
Member

Environment

  • OS Version: macos 13.6.3-x86_64
  • Source or binary build? source of gz-sim9 since 3bdadad

Description

  • Expected behavior: the standalone_gtest_setup example should build on macOS, as it builds successfully on Ubuntu was building successfully on macOS until recently. Since there were no related changes in the first build in which it began to fail, I looked for additional differences in the console log, and the most relevant difference is that cmake updated from 3.31.6 to 4.0.0 when the test started failing
  • Actual behavior: the example fails to build with a cmake error in gtest_discover_tests_impl

Steps to reproduce

  1. Install gz-sim9 on macOS
  2. Attempt to build standalone_gtest_setup example

Output

135: [ 41%] Building CXX object CMakeFiles/command_TEST.dir/command_TEST.cc.o
135: [ 50%] Linking CXX executable command_TEST
135: dyld[22146]: Symbol not found: __ZN2gz3sim2v910components7Factory8InstanceEv
135:   Referenced from: <0854A3DC-E052-3C00-91F5-8D9FCC53E1B2> /private/var/folders/ng/v8gtqrqs1sj3dzz5pvh558mh0000gp/T/gz/temp_dirlCZu4K/command_TEST
135:   Expected in:     <no uuid> unknown
135: CMake Error at /usr/local/share/cmake/Modules/GoogleTestAddTests.cmake:132 (message):
135:   Error running test executable.
135: 
135:     Path: '/private/var/folders/ng/v8gtqrqs1sj3dzz5pvh558mh0000gp/T/gz/temp_dirlCZu4K/command_TEST'
135:     Working directory: '/private/var/folders/ng/v8gtqrqs1sj3dzz5pvh558mh0000gp/T/gz/temp_dirlCZu4K'
135:     Result: Subprocess aborted
135:     Output:
135:       
135: 
135: Call Stack (most recent call first):
135:   /usr/local/share/cmake/Modules/GoogleTestAddTests.cmake:275 (gtest_discover_tests_impl)
135: 
135: 
135: make[3]: *** [command_TEST] Error 1
135: make[3]: *** Deleting file `command_TEST'
135: make[2]: *** [CMakeFiles/command_TEST.dir/all] Error 2
135: make[1]: *** [all] Error 2
135: /Users/jenkins/jenkins-agent/workspace/gz_sim-ci-gz-sim9-homebrew-amd64/gz-sim/test/integration/examples_build.cc:114: Failure
135: Expected equality of these values:
135:   system("make")
135:     Which is: 512
135:   0
135: [  FAILED  ] Plugins/ExamplesBuild.Build/standalone_gtest_setup, where GetParam() = [standalone, gtest_setup] (16837 ms)
@scpeters scpeters added the bug Something isn't working label Apr 28, 2025
@scpeters scpeters changed the title standalone_gtest_setup example fails to build with cmake 4.0 standalone_gtest_setup example fails to build on mac May 12, 2025
@scpeters
Copy link
Member Author

The test failure may not be related to cmake 4.0; see discussion in #2892

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
Status: Inbox
Development

No branches or pull requests

1 participant