View Single Post
  #20   Spotlight this post!  
Unread 06-11-2012, 14:08
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: Alternate GCC Toolchain

Quote:
Originally Posted by agartner01 View Post
Robot code build completes but gives this error:
Code:
alex@alex-U46SV:~/robot$ make
[100%] Built target FRC_UserProgram
alex@alex-U46SV:~/robot$ make clean
alex@alex-U46SV:~/robot$ make
[100%] Building CXX object CMakeFiles/FRC_UserProgram.dir/src/MyRobot.cpp.obj
Linking CXX executable bin/FRC_UserProgram.out
powerpc-wrs-vxworks-nm: '/usr/local/lib/gcc/powerpc-wrs-vxworks/4.7.2/libgcc.a': No such file
[100%] Built target FRC_UserProgram
When I deploy, I get nothing but "relocation value does not fit in 24 bits"
Ok after looking over your post again, I found the issue. You've installed gcc with the prefix `/usr`, whereas the toolchain file for cmake is expecting you to have installed to /usr/local. Personally, I would reinstall gcc to /usr/local because that's where you're supposed to put things that you've installed from source, but you could also fix the problem by making the following edits to the `vxworks_toolchain.cmake` file.

Code:
-set(TOOLCHAIN_PREFIX "/usr/local/powerpc-wrs-vxworks")
+set(TOOLCHAIN_PREFIX "/usr/powerpc-wrs-vxworks")
Code:
-set(VXWORKS_LIBGCC "/usr/local/lib/gcc/powerpc-wrs-vxworks/${GCC_VERSION}/libgcc.a")
+set(VXWORKS_LIBGCC "${TOOLCHAIN_PREFIX}/../${GCC_VERSION}/libgcc.a")
At least from what I've read of your problem, that should do the trick.