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

MacOS x86_64 fail with Section not found error, seems setting custom section name is broken #396

Open
ptitSeb opened this issue Feb 1, 2023 · 4 comments
Labels

Comments

@ptitSeb
Copy link
Contributor

ptitSeb commented Feb 1, 2023

Describe the Bug

We use inkwell on the wasmer project. After an update from the 0.1.0-beta4 to latest 0.1.0, the build on macOS x86_64 is failing.
Wasmer create a custom section named __TEXT,wasmer_function and it seems this section is not found durring the link.

This is probably due to this commit 3917e32

It should be noted that only the x86_64 macOS platform is impacted. All other platform are fine, including ARM64 macOS.

To Reproduce
No easy way to reproduce. The log can be found here: https://github.com/wasmerio/wasmer/actions/runs/4053796572/jobs/6993591076 but it's quite a big log.

@TheDan64
Copy link
Owner

TheDan64 commented Feb 5, 2023

Any idea what'd be the correct fix? I don't have access to a macOS machine, so I have no way to test

@TheDan64 TheDan64 added the bug label Feb 5, 2023
@ptitSeb
Copy link
Contributor Author

ptitSeb commented Feb 5, 2023

I would limit the new code of the commit to only macos aarch64 (instead of just macos), as the old code was working fine on macos x86_64.

@TheDan64
Copy link
Owner

TheDan64 commented Feb 5, 2023

Ok, you're welcome to make that change and test it out if you'd like

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Feb 6, 2023

Mmmm, I retested and in fact, it break Wasmer both on x86_64 and aarch64. I think the issue is that, in the case of Wasmer, we have __TEXT,wasmer_function, so a section name that already contains a ,, and in that case it should not be added to the name.
I'll work on a solution that test if the section name already have a , in it or not

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

No branches or pull requests

2 participants