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

LLVM ERROR with __wasm_bindgen_unstable #545

Closed
chinedufn opened this issue Jul 25, 2018 · 1 comment · Fixed by #548
Closed

LLVM ERROR with __wasm_bindgen_unstable #545

chinedufn opened this issue Jul 25, 2018 · 1 comment · Fixed by #548

Comments

@chinedufn
Copy link
Contributor

chinedufn commented Jul 25, 2018

Hey!

wasm-bindgen has been working great for me so far - thanks!

I'm in the middle of publishing the first version of a crate and got some build errors during cargo publish (that I didn't get during weeks of cargo build) so updated to the latest nightly tried again.

Now for build / publish attempts I get the following error after running cargo build -p virtual-dom-rs in my cargo workspace.

LLVM ERROR: Global variable '_ZN14virtual_dom_rs7webapis41__WASM_BINDGEN_GENERATED_fa4110c820b3561817h4afda009a1e7c776E' has an invalid section specifier '__wasm_bindgen_unstable': mach-o section specifier requires a segment whose length is between 1 and 16 characters.
error: Could not compile `virtual-dom-rs`.

Anywho.. the bit that sticks out is:

has an invalid section specifier '__wasm_bindgen_unstable': mach-o section specifier requires a segment whose length is between 1 and 16 characters

The string __wasm_bindgen_unstable is 23 characters long. Is it possible that we need to shorten that in order for builds to work on macOS? Or is there something else going on here?

macOS High Sierra Version 10.13.3

$ rustc -V
rustc 1.29.0-nightly (6a1c0637c 2018-07-23)

$ cargo -V
cargo 1.29.0-nightly (506eea76e 2018-07-17)

wasm-bindgen = "0.2.13"

Here's some source code, in case anything sticks out - https://gist.github.com/chinedufn/17b2306b5366ea78157b9f2bd599202f

Feel free to let me know if I can provide any other info!

@chinedufn
Copy link
Contributor Author

Alright so I suspect that this is a mac issue, but that's surprising since I figured at least a few other people are using wasm-bindgen with macOS? Also not sure why this started happening after I attempted to cargo publish.

Anyways.. I changed the 2 instances of __wasm_bindgen_unstable to __wasm_bindngen,unstable and my code built.

Note that the comma was added because without it I was getting a new error:

LLVM ERROR: Global variable '_ZN13percy_webapis41__WASM_BINDGEN_GENERATED_f9fd3881c38380a217hefaad0f29ad9dcd8E' has an invalid section specifier '__wb_unstable': mach-o section specifier requires a segment and section separated by a comma.

This issue suggests that we might need different specifiers for different targets.. but I'm not sure.. so I'm going to PR a fix and see if CI passes then go from there...

chinedufn added a commit to chinedufn/wasm-bindgen that referenced this issue Jul 25, 2018
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 a pull request may close this issue.

1 participant