View Single Post
  #28   Spotlight this post!  
Unread 22-09-2014, 22:10
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: GCC 4.9 arm-nilrt-linux-gnueabi toolchain

Quote:
Originally Posted by byteit101 View Post
FYI following the instructions on the rust wiki worked flawlessly (after changing the triplet) for me, though my compiler command is obscene:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/patrick/code/frc-rust/lib bin/rustc --target=arm-unknown-linux-gnueabi -C linker=arm-frc-linux-gnueabi-g++ test.rs

I did go to the WPI ACM's language lab and ran all the rust code on the RoboRIO. Haven't encountered any errors so far...
Yea the acts of god were all caused by the external build system of the libuv component. It uses gyp, which doesn't play very nicely when your host compiler is clang and target compiler is GNU. It starts mixing up the flags in different areas.

EDIT: Also for some reason the cross compiler envirionment varibales weren't getting passed correctly to GYP. https://github.com/rust-lang/rust/pull/17449

EDIT 2: You need not have multiple rustc installations for all your toolchains, just build one with all your targets, then pass --target at runtime when not building for your host. So you can install frc-rust as just rustc under /usr/local if you want.
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0

Last edited by CodeYeti : 22-09-2014 at 22:14. Reason: formatting