Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-06-2012, 01:45 AM   #1
Registered: Aug 2011
Location: pune
Posts: 37

Rep: Reputation: Disabled
Cross Compilation of oprofile

I am trying to cross compile the oprofile.Detail related to cross compile is mentioned below :
Cross-Compiler -- arm-eglibc-linux-gnueabi-gcc
Build_cpu -- i686
Build_os -- linux-gnu
Host_cpu -- arm
Host_os -- linux-gnueabi
Oprofile Package Version -- oprofile-0.9.6

and i am executing below mentioned command --
$./configure --prefix=${INSTALL_PATH} --host=${TOOLCHAIN_PREFIX} --with-kernel-support --with-extra-libs=${ARM_TOOLCHAIN_PATH}/lib --with-extra-includes=${ROOTFS}/include CXX=arm-eglibc-linux-gnueabi-g++

Configuration successfully happened but when i am giving below mentioned command

$ make

i got this linking error message --
/usr/lib/ could not read symbols: File in wrong format
collect2: ld returned 1 exit status

I do not know why linker not getting the even though linker getting the other libraries from same directory,in which is also present. is softlink to library.

Instead of going into my cross-compile tool-chain directory is going into my system /usr/lib/ directory which contain simple compiled library..

Since i am newbie in linux... please help me


Last edited by amitk.gupta09; 08-06-2012 at 02:09 AM.
Old 08-07-2012, 05:22 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
libbfd is not familiar to me. Is it created along with your cross toolchain? If not, I don't think the compiler will look for it in it's sysroot directory tree (and it does sound like your toolchain was built with a sysroot). You can try setting environment variables like CC, CFLAGS, LDFLAGS, etc to specify where the compiler & linker should look for headers, libraries, etc. These can also be specified on the commandline, or you can edit the Makefile to do this.

LDFLAGS='-L /some/special/library/location' make
##  or...
make LDFLAGS+='-L /some/special/library/location'
--- rod.


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
Cross-compile oprofile user tools issues asifiqbalrs Linux - Embedded & Single-board computer 0 06-12-2012 08:52 AM
Using oprofile on Centos Linux Unable to complete dump of oprofile data Frank36 Linux - Newbie 0 04-26-2011 11:42 AM
cross compilation shaiva Linux - Newbie 2 10-06-2009 03:43 AM
all about cross compilation swift2008 Programming 3 08-27-2008 05:49 AM
cross compilation NeoMagic Programming 5 12-13-2006 02:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 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
Open Source Consulting | Domain Registration