Arria10 SoC, Angstrom,gcc Erorrs!

Hello ,
I’m running linux angstrom on Arria 10 SoC, i need to compile a program on the arm architecture but there is a lot of issues, to make it short here is the error :anguished:

#gcc test.cpp -o test
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot open crtbegin.o: No such file or directory
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot open crtend.o: No such file or directory
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc_s
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc
/usr/lib/gcc/arm-angstrom-linux-gnueabi/5.2.1/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld: error: cannot find -lgcc_s
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to ‘std::cout’
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to ‘std::cout’
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to 'std::basic_ostream<char, std::char_traits >& std::operator<< <std::char_traits '
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to ‘std::basic_ostream<char, std::char_traits >& std::endl<char, std::char_traits >’
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to ‘std::basic_ostream<char, std::char_traits >& std::endl<char, std::char_traits >’
/tmp/ccX9XvAK.o:test.cpp:function main: error: undefined reference to ‘std::ostream::operator<<(std::ostream& (*)(std::ostream&))’
/tmp/ccX9XvAK.o:test.cpp:function __static_initialization_and_destruction_0(int, int): error: undefined reference to ‘std::ios_base::Init::Init()’
/tmp/ccX9XvAK.o:test.cpp:function __static_initialization_and_destruction_0(int, int): error: undefined reference to ‘__dso_handle’
/tmp/ccX9XvAK.o:test.cpp:function __static_initialization_and_destruction_0(int, int): error: undefined reference to ‘__dso_handle’
/tmp/ccX9XvAK.o:test.cpp:function __static_initialization_and_destruction_0(int, int): error: undefined reference to ‘std::ios_base::Init::~Init()’
/tmp/ccX9XvAK.o:test.cpp:function __static_initialization_and_destruction_0(int, int): error: undefined reference to ‘std::ios_base::Init::~Init()’
/tmp/ccX9XvAK.o(.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1’
collect2: error: ld returned 1 exit status

Anyone please, i you need any more information please ask
thank you

I have solved the problem , thank you

Hi Ifarhat,

I’m encountering the same problem on the arria 10 board using the GRSD example. Can I ask you how you got rid of this error?

Best regards,
Lch

Hi Lch,

Ok , you have to install the package build essential,
#opkg update
#opkg install packagegroup-core-buildessential
#opkg install packagegroup-core-buildessential-dev

if this dose not work , try
#opkg install --force-downgrade packagegroup-core-buildessential
#opkg install --force-downgrade packagegroup-core-buildessential-dev

advices ,
you may find problems with DNS server use the command # udhcpc , to fix it
use # opkg list |grep '… ’ to find the needed package names

Thank you, it’s working now, I had to use the force-downgrade to remove all the libgcc1 for linaro.