LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mageia
User Name
Password
Mageia This forum is for the discussion of Mageia Linux.

Notices


Reply
  Search this Thread
Old 09-06-2016, 08:25 AM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
Cross-compiler to ARMv7


How can I cross compile program to ARMv7 prosessor on Mageia 5? Where is no (like in Ubuntu) gcc-arm-linux-gnueabihf in Mageia repo. Can I port something from other source?
 
Old 09-06-2016, 12:37 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
What package manager does Mageia have? You can't search in a repository for the gnueabi tools? Another option is to build the gnueabi tools from source and install them on your machine. I don't know if one of the Linux download links here is the source tarball for the toolchain https://launchpad.net/gcc-arm-embedded, but it's worth a look.

For what it's worth, if you have room on your target, try to build on the target. I've used cross compilers before, but usually a company has to set them up for me, meaning I've purchased it, and had their experts set up a framework to cross compile and deploy. Every time I try to install a tool chain to cross compile, I can get it to work, but eventually something breaks the situation, like needing a special library and not having had the library path properly set up, etc.
 
Old 09-10-2016, 09:00 AM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Yep, You are right. I decided to create native environment for compilation of programs on ARMv7 platform. I have a router Asus RT-AC68R based on ARMv7, with TomatoUSB software installed on it. I plugged into a USB port, 32GB pen and I mounted it to /opt. Then I have uploaded entware (not optware), several applications form entware and the GCC compiler + all dependings on what opkg considered for use together with gcc.
I have a strange situation. I'm trying to compile the simplest possible programs for testing:

Code:
 #include <stdio.h>

int main ()
{
    printf ( "Hello World");
}
I do this by using the command - gcc -o test test.c - where test.c is the program above.
then I try to run this program and I get the following message:

Code:
 root @ asus: /opt/FTDI # ./test
-sh: ./test: not found
root @ asus: /opt/FTDI # ls -la test
-rwxr-xr-x 1 root root 5580 Sep 10 9:33 test
shell tells me that there is no such program, although as you can see there is any, and is executable for all.

I have no idea what it might be caused. Can someone help me?
Here are a few additional information straight from Asus:

Code:
root@asus:/opt/FTDI# echo $PATH
/opt/bin:/opt/sbin:/opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/home/root:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:
root@asus:/opt/FTDI# echo $LD_LIBRARY_PATH
/lib:/usr/lib:/usr/local/lib:/opt/lib:/opt/usr/lib:/opt/include
root@asus:/opt/FTDI# opkg list-installed|grep gcc
gcc - 5.4.0-1
libgcc - 5.4.0-5
root@asus:/opt/FTDI# uname -a
Linux asus 2.6.36.4brcmarm #5 SMP PREEMPT Tue Aug 16 22:49:47 CEST 2016 armv7l GNU/Linux
Any idea whats going wrong?
 
  


Reply

Tags
arm7, crosscompile, mageia



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross Compiling from x86_64 to ARMv7 markcgriffiths Linux - Software 2 04-16-2014 08:13 AM
My c compiler doesn't work after the cross-compiler installed heracles.cn Linux - Newbie 1 06-05-2007 03:55 AM
Cross compiler !!! hiteshmaisheri Linux - Laptop and Netbook 3 03-05-2005 09:51 AM
cross compiler leonora Programming 2 01-08-2005 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mageia

All times are GMT -5. The time now is 11:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration