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

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

Closed
Yadunund opened this issue Jan 24, 2023 · 1 comment · Fixed by #944
Closed

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

Yadunund opened this issue Jan 24, 2023 · 1 comment · Fixed by #944
Labels

Comments

@Yadunund
Copy link
Member

Yadunund commented Jan 24, 2023

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!

@CursedRock17
Copy link
Contributor

Was Error 3 the extent of the errors on your build? I also ran into this issue, solved it with the files you had changed, then subsequently ran into issue #952, then tried solving with their arch linux solution, but no luck. I ended up with the error:

patching file 'CMake/Utils/PrecompiledHeader.cmake'
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to 'CMake/Utils/PrecompiledHeader.cmake.rej'

This error occurs for all of the diffs in the pragma-patch.diff file. I figured this was a general thread for OSX Ventura issues, so not trying to hijack the thread.

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

Successfully merging a pull request may close this issue.

3 participants