LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to use libpthread.so.0 file for my target system compiler arm-none..-gcc (https://www.linuxquestions.org/questions/linux-software-2/how-to-use-libpthread-so-0-file-for-my-target-system-compiler-arm-none-gcc-887501/)

shakthi 06-21-2011 05:23 AM

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

smallpond 06-21-2011 03:07 PM

strip will not convert a binary to a different architecture.
You need to download the library source and cross-compile it for arm architecture.

knudfl 06-21-2011 04:45 PM

/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 ).

..


All times are GMT -5. The time now is 06:34 PM.