Installing newer version of gcc

I'm trying to get a RoboPeak USB display to work with my Yun. One way I'm trying to do that is to compile the "usermode SDK" on the Yun. In order to do that, I think I need gcc 4.8, as the SDK's readme says. opkg install yun-gcc only installs version 4.6.2-2. How can I install version 4.8?

Here's the error I get:

# make
g++ -c -o demo/src/main.o --std c++11 -Iinfra/include -Ideps-wraps/libusbx_wrap/include -Irpusbdisp-drv/include demo/src/main.cc
g++: error: c++11: No such file or directory
g++: error: unrecognized option '--std'
make: *** [demo/src/main.o] Error 1

aswine:
::::SNIP::::

How can I install version 4.8?

Here’s the error I get:

# make

g++ -c -o demo/src/main.o --std c++11 -Iinfra/include -Ideps-wraps/libusbx_wrap/include -Irpusbdisp-drv/include demo/src/main.cc
g++: error: c++11: No such file or directory
g++: error: unrecognized option ‘–std’
make: *** [demo/src/main.o] Error 1

@aswine,
from your error, it certainly seems like it is a compiler error. Given that, If you have not considered cross-compiling, this might be the time. You could recompile the compiler on the target platform, but that seems painful. To be clear, I’m saying compile your software package on your PC, not the Yun. If you are already compiling on a PC, upgrade or install and VM to work under.

If you are not aware of it, Yun is based on OpenWrt. Here is the Howto page:
Cross Compile
http://wiki.openwrt.org/doc/devel/crosscompile

Oh, and if you do, please post what notes you can to assist others.

Jesse

arduino_markup.png

Cross-compiling YunOS:

YunOS is based on OpenWrt Attitude Adjustment

( ) gcc 4.6.2                                      
( ) gcc 4.7.0                                      
( ) gcc 4.5.x with Linaro enhancements             
(X) gcc 4.6.x with Linaro enhancements             
( ) gcc 4.7.x with Linaro enhancements

You need version 4.8, upgrade to trunk is only way to go.

FYI:

Bleeding Edge(trunk):
Chaos Calmer ( some time this year?)

Stable:
Barrier Breaker 14.07 (2014 October)
Attitude Adjustment 12.09 (2013 April)

sonnyyu:
::::SNIP::::
FYI:

Bleeding Edge(trunk):
Chaos Calmer

::::SNIP::::

@aswine,

OUCH! Seriously consider another package. If in the end you decide to go with this same package, we’ll do our best to support you.
NOTE: sonnyyu is very good at getting in the dirt. Think about his response carefully. :smiley:

Jesse

jessemonroy650: @aswine, from your error, it certainly seems like it is a compiler error. Given that, If you have not considered cross-compiling, this might be the time. You could recompile the compiler on the target platform, but that seems painful. To be clear, I'm saying compile your software package on your PC, not the Yun. If you are already compiling on a PC, upgrade or install and VM to work under.

If you are not aware of it, Yun is based on OpenWrt. Here is the Howto page: Cross Compile http://wiki.openwrt.org/doc/devel/crosscompile

Oh, and if you do, please post what notes you can to assist others.

Jesse

Jesse, you seem lack knowledge of cross compile, YunOS is based on OpenWrt Attitude Adjustment, the maximum cross compile GCC is 4.7.x. But OP need 4.8.

sonnyyu: You need version 4.8, upgrade to trunk is only way to go.

Sonnyyu, I'm not very experienced in this area. Are you suggesting that I download the source and compile all of Linino myself? Or is there a way to use opkg or something to upgrade?

I'm currently compiling the code from https://github.com/arduino/linino.git , with some gcc code from git://git.openwrt.org/openwrt.git. I really don't know if that'll work, but I don't know much about building from source.

Jessemonroy650, I think I got that error because my version of gcc doesn't know what "--std" is. I'll look into cross compiling. If I could just compile the kernel module that I need and use the normal Linino distribution, that'd be great. Thanks for the link.

sonnyyu: Jesse, you seem lack knowledge of cross compile, YunOS is based on OpenWrt Attitude Adjustment, the maximum cross compile GCC is 4.7.x. But OP need 4.8.

@sonnyyu I know cross compile, but got information late about what OpenWRT can do. Op can still cross compile, but much more work. You know he can do.

Jesse

aswine: ::::SNIP:::: Jessemonroy650, I think I got that error because my version of gcc doesn't know what "--std" is. I'll look into cross compiling. If I could just compile the kernel module that I need and use the normal Linino distribution, that'd be great. Thanks for the link.

@aswine, Yes, I was aware you were missing "--std" flag from your compiler. I don't normally compile modules. I don't like "bleeding edge". SonnyYu is much better at this. Hence, why I'm saying listen to SonnyYu. He correctly pointed out that going from your 4.x to 4.8 compiler was going to have issues - mostly because it is not in a menu.

As for SonnyYun's comments, I believe he can help you get your module. He generally knows how. He is much better than I on this. I tend to document solutions, not make solutions.

Also, that certain library might need an extra library (or upgraded library). So my comment stands, Consider SonnyYu's suggestion, because personally I would abandon that library and look for another solution. HOWEVER, I don't know what your final end goal is - So i can only wish you luck and encouragement. :D

Lastly, for clarity, when I say sonnyyu is very good at getting in the dirt, I mean he is willing to do work that other often avoid - including myself. So, it is a complement to SonnyYu's ability. I think he is very good.

Jesse