Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Compilation of app_uart fails on strip rust_begin_unwind #186

Closed
kristofferkoch opened this issue Oct 9, 2014 · 7 comments
Closed

Compilation of app_uart fails on strip rust_begin_unwind #186

kristofferkoch opened this issue Oct 9, 2014 · 7 comments
Assignees

Comments

@kristofferkoch
Copy link

kristofferkoch commented Oct 9, 2014

Thanks for making zinc! I find the platform and ideas really exciting, and I'm working on trying to understand how zinc is put together and how to make nice things.

However, when compiling with rake PLATFORM=lpc17xx build_all, compilation fails at app_uart with:

rustc --opt-level 2 -Z no-landing-pads -g --cfg cfg_mcu_has_spi --cfg mcu_lpc17xx --cfg arch_cortex_m3 --target thumbv7m-linux-eabi -Ctarget-cpu=cortex-m3 -C relocation_model=static  -C lto  --emit obj  -L /home/kko/projects/zinc/build  -o /home/kko/projects/zinc/build/intermediate/uart/app_uart.o  /home/kko/projects/zinc/apps/app_uart.rs 
arm-none-eabi-strip -N rust_stack_exhausted -N rust_begin_unwind -N rust_eh_personality /home/kko/projects/zinc/build/intermediate/uart/app_uart.o
arm-none-eabi-strip: not stripping symbol `rust_begin_unwind' because it is named in a relocation

I'm running on debian/unstable with latest rust.

@farcaller
Copy link
Member

libcore/failure.rs is too heavyweight and pulls in fmt.

@farcaller
Copy link
Member

(it happens in UART as this is apparently the only demo with array range checks and division, that can fail in runtime)

@farcaller
Copy link
Member

Seems that it's not something we can fix, filed rust-lang/rust#17886.

@farcaller farcaller added rustc bug and removed bug labels Oct 9, 2014
@farcaller
Copy link
Member

For the reference, this is where things go wrong: https://gist.github.com/farcaller/282860631f1757e2a17d#file-main-c-L328

@kristofferkoch
Copy link
Author

Thank you for your analysis, farcaller!

@farcaller
Copy link
Member

I've submitted 05c8f3c as a temporary workaround.

@mcoffin
Copy link
Contributor

mcoffin commented Nov 29, 2016

This isn't really a thing anymore as fail was changed to panic upstream and some of how the lang items work was changed. Upstream bug was closed.

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

No branches or pull requests

3 participants