I am trying to cross-compile some code to run on an ARM Cortex A8 (the AR.Drone 2.0, if it makes a difference).
I installed Ubuntu 12.04 LTS 32-bit on my Virtualbox (with Windows 7 64-bit host), and my cross-compiled code works perfectly fine.
On another computer, I installed the same version of Ubuntu (without Virtualbox), but I'm encountering weird errors. The smallest code snippet I've gotten that demonstrates the problem is a "hello world" program (I can show the code here if necessary):
- I've executed: sudo apt-get install g++ gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
- When I run arm-linux-gnueabi-g++ hello.cpp, the cross-compiled code (a.out) works fine on the ARM.
- When I run arm-linux-gnueabi-g++ -o hello hello.cpp, I get a segfault when executing hello on the ARM.
- I've compared the outputs of file hello and read-elf -A hello when compiled with Virtualbox and without, and they look identical.
- I don't have gdb on the ARM, so I can't gdb it to find out where the segfault is coming from.
Any ideas/solutions would be greatly appreciated. I did not have to set up anything special on my Virtualbox, so I'm quite confused why the PC without Virtualbox cannot cross-compile correctly.