LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2009, 05:37 AM   #1
hofa
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Rep: Reputation: 0
Installing oprofile on SLES


Hi,

I am trying to ./configure xenoprofile (basically a patched oprofile) on SLES 11 but it keeps giving me the following error

Code:
checking libiberty.h usability... no
checking libiberty.h presence... no
checking for libiberty.h... no
checking for cplus_demangle in -liberty... no
configure: error: liberty library not found
Although libiberty.h exists on my system:

Code:
zwarte-sm:~/oprofile-0.9.3 # ls -l /usr/src/debug/binutils-2.19/include/
total 196
drwxr-xr-x 2 root root  4096 Apr 20 16:27 aout
-rw-r--r-- 1 root root 29396 Aug 17  2008 bfdlink.h
drwxr-xr-x 2 root root  4096 Apr 20 16:27 coff
-rw-r--r-- 1 root root 23493 Jan 27  2008 demangle.h
-rw-r--r-- 1 root root 16047 Jul  7  2008 dis-asm.h
drwxr-xr-x 2 root root  4096 Apr 20 16:27 elf
-rw-r--r-- 1 root root  5658 Nov  8  2007 floatformat.h
-rw-r--r-- 1 root root  5057 May 10  2005 getopt.h
-rw-r--r-- 1 root root  7264 Jul  1  2005 hashtab.h
-rw-r--r-- 1 root root  4970 May 10  2005 ieee.h
-rwxrwxrwx 1  644 root 23698 Jun 24  2008 libiberty.h
-rw-r--r-- 1 root root  5172 Mar 25  2008 md5.h
-rw-r--r-- 1 root root  3960 May 10  2005 objalloc.h
-rw-r--r-- 1 root root 20881 May 10  2005 obstack.h
drwxr-xr-x 2 root root  4096 Apr 20 16:27 opcode
-rw-r--r-- 1 root root  5643 Jul  7  2008 safe-ctype.h
-rw-r--r-- 1 root root  4692 Mar 25  2008 sha1.h
This is my ./configure line:

Code:
./configure --with-binutils=/usr/src/debug/binutils-2.19 --with-kernel-support
I really need to get this thing working so if you have any idea what the problem could be, I'd be really thankful.
 
Old 05-07-2009, 01:44 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
checking for libiberty.h... no
.....
liberty library not found
: Missing 'binutils-devel'

# zypper in binutils-devel
will provide the files.
.....
 
Old 05-08-2009, 12:58 AM   #3
hofa
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
What I heard, was that the problem exists with the new glibc library (2.9) and some headers that moved (?)

But I'll try your suggestion today, I'll let you know if it works...
 
Old 05-08-2009, 05:09 AM   #4
hofa
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
ok, binutils-devel did the trick, but now I get the following:

Code:
checking for bfd_openr in -lbfd... no
configure: error: bfd library not found
BUT

Code:
SLES11-xen:~/oprofile-0.9.3 # ls -1 /usr/lib/*bfd*
/usr/lib/libbfd.a
/usr/lib/libbfd.la
I also tried the patch on http://www.nabble.com/-PATCH--Workar...d23317997.html but I can't seem to get the patch for binutils.m4 to work...

Code:
SLES11-xen:~/oprofile-0.9.3 # patch -p1 < ../oprofile_sles11_binutils.m4.patch 
patching file m4/binutils.m4
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file m4/binutils.m4.rej
And this is the contents of binutils.m4.rej

Code:
*************** AC_CHECK_FUNCS(xmemdup)
*** 10,19 ****
  AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"; DL_LIB="-ldl", DL_LIB="")
  AC_CHECK_LIB(intl, main, LIBS="$LIBS -lintl"; INTL_LIB="-lintl", INTL_LIB="")
  
- AC_CHECK_LIB(bfd, bfd_openr,,
   [AC_CHECK_LIB(z, compress,
  dnl Use a different bfd function here so as not to use cached result from above
-  [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS",
   [AC_MSG_ERROR([bfd library not found])], -lz)
   ],
   [AC_MSG_ERROR([libz library not found; required by libbfd])]) 
--- 10,19 ----
  AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"; DL_LIB="-ldl", DL_LIB="")
  AC_CHECK_LIB(intl, main, LIBS="$LIBS -lintl"; INTL_LIB="-lintl", INTL_LIB="")
  
+ AC_CHECK_LIB(bfd, bfd_openr, LIBS="-lbfd $LIBS"; Z_LIB="",
   [AC_CHECK_LIB(z, compress,
  dnl Use a different bfd function here so as not to use cached result from above
+  [AC_CHECK_LIB(bfd, bfd_fdopenr, LIBS="-lbfd -lz $LIBS"; Z_LIB="-lz",
   [AC_MSG_ERROR([bfd library not found])], -lz)
   ],
   [AC_MSG_ERROR([libz library not found; required by libbfd])])
 
Old 05-08-2009, 01:45 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
ls /usr/lib/ | grep libbfd
libbfd-2.18.50.20080409-11.1.so

rpm -ql /usr/lib/libbfd-2.18.50.20080409-11.1.so
binutils-2.18.50.20080409-11.1

cd /usr/lib/
# ln -s libbfd-2.18.50.20080409-11.1.so libbfd.so

But it seems that SLES is different from OpenSuse 11.0 ?
No libbfd.a on my Suse 11.0 ( Suse 11.1 has libbfd-2.19.so )

Suggest : compile binutils-2.18.50 > > cd build-binutils
../binutils-2.18/configure --enable-shared
and find libbfd.so in the hidden directory
build-binutils/bfd/.libs and copy to /usr/local/lib/.

Example package with libbfd....
http://rpm.pbone.net/index.php
http://rpm.pbone.net/index.php3?stat...1-6.7.i586.rpm
> > libbfd-2_18-2.18.50.20080409_11.1-6.7.i586.rpm
Provides /usr/lib/libbfd-2.18.50.20080409_11.1.so only.

There is a 'source' file too :
' libbfd-2_18-2.18.50.20080409_11.1-6.7.src.rpm '

http://rpm.pbone.net/index.php3?stat....1-6.7.src.rpm
To be processed with # rpmbuild -bb libbfd_2_18_50.spec
.....

Last edited by knudfl; 05-08-2009 at 01:49 PM.
 
Old 05-10-2009, 08:42 AM   #6
hofa
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for all your help, but apparantly I looked over /usr/lib64/libbfd-2.19.so

So I just symlinked /usr/lib64/libbfd.so to that file.

I know symlinking libraries isn't a good practice, but it's mainly for testing purposes and it won't be running on live servers, so it's no big deal if they break.
 
  


Reply



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
Using oprofile learn2bperfect Linux - Newbie 0 04-10-2009 05:12 AM
how to load sles in redhat platform using sles image created in nfs server AshishNsearch Red Hat 0 03-28-2008 12:12 AM
Problem Installing SLES nimbus1mh Linux - Newbie 2 02-19-2008 03:51 PM
Re-Installing SLES 10 Greywolf_WI Linux - Server 3 09-11-2006 07:24 AM
oprofile & kernel phoenix7 Linux - Software 0 08-07-2005 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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