LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-06-2012, 02:45 AM   #1
amitk.gupta09
Member
 
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/libbfd.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

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

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

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

Thanks,
Amit

Last edited by amitk.gupta09; 08-06-2012 at 03:09 AM.
 
Old 08-07-2012, 06:22 PM   #2
theNbomr
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.

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


Reply


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 09:52 AM
Using oprofile on Centos Linux Unable to complete dump of oprofile data Frank36 Linux - Newbie 0 04-26-2011 12:42 PM
cross compilation shaiva Linux - Newbie 2 10-06-2009 04:43 AM
all about cross compilation swift2008 Programming 3 08-27-2008 06:49 AM
cross compilation NeoMagic Programming 5 12-13-2006 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:19 PM.

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