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

Apple M1 fixes #1698

Merged
merged 1 commit into from
Dec 29, 2021
Merged

Apple M1 fixes #1698

merged 1 commit into from
Dec 29, 2021

Conversation

dlech
Copy link
Contributor

@dlech dlech commented Dec 1, 2021

These fixes (along with Homebrew/homebrew-core#90205) are required to get gazebo11 running on Apple M1 hardware as used by the https://github.com/PX4/PX4-Autopilot project.

@osrf-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@osrf-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

scpeters added a commit that referenced this pull request Dec 3, 2021
scpeters added a commit that referenced this pull request Dec 3, 2021
* Set CMAKE_INSTALL_RPATH Part of #1698.

Signed-off-by: Steve Peters <[email protected]>
Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for identifying these fixes!

@@ -25,6 +25,7 @@ class IgnitionCommon3 < Formula
def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=Off"
cmake_args << "-DIGN_PROFILER_REMOTERY=Off"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a build problem with the Remotery profiler on M1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not a build problem but rather a crash at runtime. As explained in the commit message, it causes a crash because of

symbol not found in flat namespace '_rmtMetal_usGetTime'

I didn't dig deeper, but I have a feeling that this has to do with clang adding a _ prefix to C function names. The "missing" function is a C function that is called from ObjC code. I didn't dig any deeper than that. I was hoping that the profiler wasn't something important and we could just go with the easy fix. But if that is not the case, we will have to troubleshoot farther.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, if it only occurs on the M1 hardware, then can you make this line conditional on the architecture? The following line has some logic you may consider using:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the requested change.

Copy link

@Desartstudio Desartstudio Feb 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same problem in Mac OS12.1 intel I9 not M1
dyld[59989]: symbol not found in flat namespace '_rmtMetal_usGetTime'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest starting a new issue with more details on how exactly to reproduce the problem.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks

This fixes a crash on Apple M1 hardware:

    Process:               gzclient-11.9.0 [67541]
    Path:                  /opt/homebrew/*/gzclient-11.9.0
    Identifier:            gzclient-11.9.0
    Version:               ???
    Code Type:             ARM-64 (Native)
    Parent Process:        bash [67524]
    Responsible:           Terminal [454]
    User ID:               501

    Date/Time:             2021-11-30 19:04:18.1615 -0600
    OS Version:            macOS 12.1 (21C5031d)
    Report Version:        12
    Anonymous UUID:        F0C578BB-512A-6F9D-1529-7029F51BFF95

    Sleep/Wake UUID:       797377D2-E404-4080-B6D2-2CA63D5EF198

    Time Awake Since Boot: 34000 seconds
    Time Since Wake:       3697 seconds

    System Integrity Protection: enabled

    Crashed Thread:        0

    Exception Type:        EXC_CRASH (SIGABRT)
    Exception Codes:       0x0000000000000000, 0x0000000000000000
    Exception Note:        EXC_CORPSE_NOTIFY

    Termination Reason:    Namespace DYLD, Code 9
    symbol not found in flat namespace '_rmtMetal_usGetTime'

    Application Specific Information:
    symbol not found in flat namespace '_rmtMetal_usGetTime'

    Thread 0 Crashed:
    0   dyld                          	       0x10095b4dc __abort_with_payload + 8
    1   dyld                          	       0x1009624dc abort_with_payload_wrapper_internal + 104
    2   dyld                          	       0x100962510 abort_with_payload + 16
    3   dyld                          	       0x10091a8e4 dyld4::halt(char const*) + 328
    4   dyld                          	       0x100915fd4 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3568
    5   dyld                          	       0x1009150d4 start + 488
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

Successfully merging this pull request may close these issues.

4 participants