LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

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


hi to all,

i have got some error while trying to use /usr/lib/libpthread.so.0 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,
shakthi
 
Old 06-21-2011, 03:07 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,606

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
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, 04:45 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
/usr/lib/libpthread.so.0 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 04:53 PM.
 
  


Reply

Tags
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 10:37 AM
using gcc built for arm for building a .c file raphtor Linux - Software 3 11-11-2009 05:51 PM
Trouble with gcc compiler on arm platform meda75 Linux - Newbie 6 03-14-2009 11:51 AM
gcc compiler RPM for Fedora Core 2 system thiagarn Linux - Newbie 19 02-13-2008 01:37 AM
linux system based on a non-GCC compiler? dschobel Linux - General 1 06-21-2004 06:19 PM


All times are GMT -5. The time now is 10:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration