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

Trouble compiling on macOS #151

Open
peacememories opened this issue Sep 23, 2019 · 2 comments
Open

Trouble compiling on macOS #151

peacememories opened this issue Sep 23, 2019 · 2 comments

Comments

@peacememories
Copy link

I recently pulled the latest version of rust-avr and tried to compile it again, but ran into the following problem:
https://gist.github.com/ab49f1171d442728d61a93398d0b046e
Short version:

...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...

I'm running macOS 10.14.6 with xCode 11 (which I recently updated, so that could also be part of the problem)

@Gaelan
Copy link

Gaelan commented Apr 23, 2020

A little more investigation, since I ran into this as well: this message shows up in the logs.

note: ld: warning: ignoring file /var/folders/9b/sq7l7grn1_q_bm74x5x67z8r0000gn/T/rustcZOI6jz/librustc_llvm-e87e1352d21cfdff.rlib, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x53 0x59 0x4D 0x36 0x34 0x2F 0x20 )

Those hex bytes work out to !<arch>\n/SYM64/ in ASCII; some googling suggests that this indicates some sort of 64-bit ar format, for archives larger than 4 GB. Maybe macOS's linker doesn't support that format? On that theory, I'm currently testing to see if a no-debug-symbol (which presumably produces substantially smaller binaries). I'll report back once that finishes.

@Gaelan
Copy link

Gaelan commented Apr 23, 2020

Yep, a non-debug build works.

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

2 participants