Skip to content

[rolling] build failures on macOS + Apple Silicon #943

@Yadunund

Description

@Yadunund

Setup

Hardware: Macbook Pro M1
OS: MacOS Ventura 13.1
Apple clang version: 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.2.0
Thread model: posix
XCode version: 14.2

Commit: latest rolling

I encountered a series of errors when building specifically with rviz_ogre_vendor.

Error 1: malformed patch

patching file 'PlugIns/OctreeZone/CMakeLists.txt'
patch: **** malformed patch at line 1817: 
make[2]: *** [ogre-v1.12.10-prefix/src/ogre-v1.12.10-stamp/ogre-v1.12.10-patch] Error 2
make[1]: *** [CMakeFiles/ogre-v1.12.10.dir/all] Error 2
make: *** [all] Error 2
---
--- stderr: rviz_ogre_vendor
patch: **** malformed patch at line 1817: 
make[2]: *** [ogre-v1.12.10-prefix/src/ogre-v1.12.10-stamp/ogre-v1.12.10-patch] Error 2
make[1]: *** [CMakeFiles/ogre-v1.12.10.dir/all] Error 2
make: *** [all] Error 2

This error was reported here #925 and a viable fix is offered here #938 (although targeting humble). Once resolved, I encountered another error.

Error 2: Objective-C

--- stderr: rviz_ogre_vendor
error: Objective-C was disabled in PCH file but is currently enabled
1 error generated.
make[5]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OSX/macUtils.mm.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ogre-v1.12.10-prefix/src/ogre-v1.12.10-stamp/ogre-v1.12.10-build] Error 2
make[1]: *** [CMakeFiles/ogre-v1.12.10.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 11 jobserver tokens available; should be 10!

It is caused by a target_precompile_headers() cmake call.

The final error after resolving the above is due to the arm64 architecture of Apple Silicon devices.

Error 3: Linker

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [lib/macosx/Codec_Assimp.1.12.10.dylib] Error 1
make[4]: *** [PlugIns/Assimp/CMakeFiles/Codec_Assimp.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all] Error 2
make[2]: *** [ogre-v1.12.10-prefix/src/ogre-v1.12.10-stamp/ogre-v1.12.10-build] Error 2
make[1]: *** [CMakeFiles/ogre-v1.12.10.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 11 jobserver tokens available; should be 10!

I'll open a PR that address all these issues but would appreciate help with further testing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions