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

Problem with m1 Mac #20

Open
Fricodelco opened this issue Jan 7, 2021 · 5 comments
Open

Problem with m1 Mac #20

Fricodelco opened this issue Jan 7, 2021 · 5 comments

Comments

@Fricodelco
Copy link

I tried to compile ros2 on apple silicon Mac, and get several errors with mimics.
--- stderr: mimick_vendor
Cloning into 'mimick-ext'...
Note: switching to '99a35f3d2067708931945c64ac9caee80a0ef50e'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 99a35f3 Update cmake minimum version to 2.8.12 (#15)
Undefined symbols for architecture arm64:
"_mmk_trampoline", referenced from:
_create_trampoline in libmimick.a(trampoline.c.o)
"_mmk_trampoline_end", referenced from:
_create_trampoline in libmimick.a(trampoline.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [sample/strdup/strdup_test] Error 1
make[4]: *** [sample/strdup/CMakeFiles/strdup_test.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [mimick-ext-prefix/src/mimick-ext-stamp/mimick-ext-build] Error 2
make[1]: *** [CMakeFiles/mimick-ext.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 9 jobserver tokens available; should be 8!

Failed <<< mimick_vendor [6.73s, exited with code 2]
Aborted <<< console_bridge_vendor [2.48s]
Aborted <<< qt_gui [1.40s]
Aborted <<< resource_retriever [2.64s]
Aborted <<< rosidl_runtime_cpp [5.30s]
Aborted <<< zstd_vendor [41.8s]
Aborted <<< foonathan_memory_vendor [48.2s]
Aborted <<< rviz_ogre_vendor [50.5s]

Summary: 103 packages finished [1min 1s]
1 package failed: mimick_vendor
7 packages aborted: console_bridge_vendor foonathan_memory_vendor qt_gui resource_retriever rosidl_runtime_cpp rviz_ogre_vendor zstd_vendor
15 packages had stderr output: ament_index_cpp fastcdr foonathan_memory_vendor mimick_vendor orocos_kdl resource_retriever rosidl_runtime_cpp rosidl_typesupport_interface rviz_ogre_vendor shared_queues_vendor test_osrf_testing_tools_cpp tlsf uncrustify_vendor yaml_cpp_vendor zstd_vendor
198 packages not processed

I think issue in the mimick_vendor/mimick-ext-prefix/src/mimick-ext/src/asm/trampoline-aarch64.S

@YVbakker
Copy link

YVbakker commented Feb 1, 2021

Same issue here, in libmimick.a there is a trampoline-aarch64.S.o object, however the code calls
"_mmk_trampoline", referenced from: _create_trampoline in libmimick.a(trampoline.c.o) "_mmk_trampoline_end", referenced from: _create_trampoline in libmimick.a(trampoline.c.o)
from trampoline.c.o instead of the the correct aarch64 one? Not sure how to fix this though, I don't know enough about assembly, but I'm not sure whether this is an assembly issue or not. To me it looks like a non-updated static reference somewhere, most likely due to the new architecture on mac.

Another thing I noticed is that
Undefined symbols for architecture arm64:

Says arm64, while the architecture is usually identified by aarch64. Not sure if this is correct behaviour and just a way for the linker to reference to the architecture internally. It's a linker issue for sure, regardless of the exact cause.

@YVbakker
Copy link

YVbakker commented Feb 1, 2021

Nevermind, this issue is not related to mimick at all, as downloading the sources directly from github and just compiling mimick (using the supplied cmake configuration) on an m1 mac works just fine. It must be a configuration error within the build process for ros2, or software using mimick as a dependency. I believe this issue can be closed.

@homalozoa
Copy link

Hey, @YVbakker . Check this commit, please. Hope it helps.

@YVbakker
Copy link

YVbakker commented Oct 2, 2021

Hey, @YVbakker . Check this commit, please. Hope it helps.

Thanks @homalozoa - which commit?

@homalozoa
Copy link

Sorry for missed copied message… here is the link : ros2/mimick_vendor@8c73819 @YVbakker

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

No branches or pull requests

3 participants