Cross Compiling in OpenWRT. Cannot Execute binary file. Ideas?
Hello! I'm trying to compile a simple script for a ar71xx (bleeding edge /from snapshots) Openwrt router.
I have previously compiled scripts for Kamikaze 8.09. I just copied the gcc file inside the SDK dir and used it without problems. Now I tried doing the same for http://downloads.openwrt.org/snapshots/trunk/ar71xx/ But every time I try to execute it: Code:
[root@centos]# ./gcc src/hello.c -o hello So how can I compile them? Has anyone given a try? thank you |
Hello,
Please, could you post the output of the following command: Code:
file ./gcc Oliv' |
Quote:
From the nature of your question (compile a simple script), it sounds like you don't fully understand the whole cross-development scheme. If I may read between the lines a little, it sounds like you have previously used a compiler for some other host. You are trying to run it on a different host, but not on one for which it was built. If this is the case, it may be time for you to start learning about embedded development and cross toolchains. Perhaps provide a bunch more detail about the origins of all of the component parts. --- rod. |
aztroboy -
TheNBomr is right - it sounds like you're trying to run a copy of "gcc" that wasn't built for your host. All you need to verify this, one way or the other, is run the command Oliv' suggested: Quote:
|
Thank you for your answers. I have previously worked with cross compiling with Kamikaze. What I did was to download the OpenWRT SDK, untar and copy a gcc file that came inside the buildroot folders.
You were right: I was using a gcc version that was not meant to run in my CentOS machine. What I needed was the i686 version that I downloaded from the Kamikaze distribution download page. Thank you very much. |
All times are GMT -5. The time now is 08:28 PM. |