Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-21-2011, 06:23 AM   #1
LQ Newbie
Registered: May 2011
Posts: 11

Rep: Reputation: 0
how to use file for my target system compiler arm-none..-gcc

hi to all,

i have got some error while trying to use /usr/lib/ file for my c program where as am using cross compiler and my target compiler is arm-none-linux-gnueabi-gcc .. while trying to use that file, i got the error file not correct format and i know the library file will support only if we use intel processor. so how to convert that file which should support the arm processor i.e. arm-none-linux-gnueabi-gcc.. i heard strip may resolve this problem but the problem , lot of options are there in strip, in which options we ve to use?? if you ve any other solutions please help me as soon as possible..

thanks in advance,
Old 06-21-2011, 04:07 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,853

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
strip will not convert a binary to a different architecture.
You need to download the library source and cross-compile it for arm architecture.
Old 06-21-2011, 05:45 PM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,755

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
/usr/lib/ is not an "arm file". No files in /usr/lib/ can be used.

'libpthread' should be part of the libc, that comes with your "arm tool chain".
( Glibc, elibc, ulibc, etc.)

A tool chain is e.g. : Binutils, libc, arm-gcc, which you probably have already.

At compile time you will have to point to "arm libraries" only.
Example : export LD_LIBRARY_PATH=/opt/arm/lib && <other-command>
(Like :
export LD_LIBRARY_PATH=/opt/arm/lib && arm-gcc myprog.c -o myprog -lpthread ).


Last edited by knudfl; 06-21-2011 at 05:53 PM.


arm, ld, libc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc arm compiler sujith4u87 Programming 2 04-09-2010 11:37 AM
using gcc built for arm for building a .c file raphtor Linux - Software 3 11-11-2009 06:51 PM
Trouble with gcc compiler on arm platform meda75 Linux - Newbie 6 03-14-2009 12:51 PM
gcc compiler RPM for Fedora Core 2 system thiagarn Linux - Newbie 19 02-13-2008 02:37 AM
linux system based on a non-GCC compiler? dschobel Linux - General 1 06-21-2004 07:19 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:08 AM.

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