LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-20-2011, 12:59 PM   #1
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
/usr/bin/ld: cannot find -lxenctrl


Hi group,

Not sure if this is the right spot?

Trying to build kexec, I get this error:
gcc -lxenctrl -lz --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/x86_64/entry64-32.o purgatory/arch/x86_64/entry64.o purgatory/arch/x86_64/setup-x86_64.o purgatory/arch/x86_64/stack.o purgatory/arch/x86_64/purgatory-x86_64.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/crashdump_backup.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/sha256.o
Live child 0x00f88730 (purgatory/purgatory.ro) PID 7319
/usr/bin/ld: cannot find -lxenctrl
libxenctrl is there:
ls -lrat /usr/lib*/libxenctrl*
-rwxr-xr-x 1 root root 98176 2010-06-20 10:08 /usr/lib/libxenctrl.so.3.4.0
-rwxr-xr-x 1 root root 89584 2010-06-20 10:09 /usr/lib64/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib64/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 28 2011-02-20 10:22 /usr/lib/libxenctrl.so -> /usr/lib/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 17 2011-02-20 10:36 /usr/lib64/libxenctrl.so -> libxenctrl.so.3.4

echo $LD_LIBRARY_PATH
.:/lib:/usr/lib:/usr/lib64

Any ideas??
 
Old 02-20-2011, 01:17 PM   #2
z1p
Member
 
Registered: Jan 2011
Location: the right coast of the US
Distribution: Ubuntu 10.04
Posts: 80

Rep: Reputation: 23
Quote:
Originally Posted by MrUmunhum View Post
Hi group,

Not sure if this is the right spot?

Trying to build kexec, I get this error:
gcc -lxenctrl -lz --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/x86_64/entry64-32.o purgatory/arch/x86_64/entry64.o purgatory/arch/x86_64/setup-x86_64.o purgatory/arch/x86_64/stack.o purgatory/arch/x86_64/purgatory-x86_64.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/crashdump_backup.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/sha256.o
Live child 0x00f88730 (purgatory/purgatory.ro) PID 7319
/usr/bin/ld: cannot find -lxenctrl
libxenctrl is there:
ls -lrat /usr/lib*/libxenctrl*
-rwxr-xr-x 1 root root 98176 2010-06-20 10:08 /usr/lib/libxenctrl.so.3.4.0
-rwxr-xr-x 1 root root 89584 2010-06-20 10:09 /usr/lib64/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib64/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 28 2011-02-20 10:22 /usr/lib/libxenctrl.so -> /usr/lib/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 17 2011-02-20 10:36 /usr/lib64/libxenctrl.so -> libxenctrl.so.3.4

echo $LD_LIBRARY_PATH
.:/lib:/usr/lib:/usr/lib64

Any ideas??
I highlighted the problem above. Your LD_LIBRARY_PATH includes /usr/lib64, which contains a symbolic link for libxenctrl.so that points to libxenctrl.so.3.4. However the name of the .so file is really libxenctrl.so.3.4.0, so it is not found. You need to fix your symbolic link. As they say 'The devil is in the details.'

Good Luck
-z1p
 
Old 02-21-2011, 03:06 PM   #3
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by z1p View Post
I highlighted the problem above. Your LD_LIBRARY_PATH includes /usr/lib64, which contains a symbolic link for libxenctrl.so that points to libxenctrl.so.3.4. However the name of the .so file is really libxenctrl.so.3.4.0, so it is not found. You need to fix your symbolic link. As they say 'The devil is in the details.'

Good Luck
-z1p
Thanks for the response. I think I made a copy/paste error and truncated the '.0' off the end of the line.
Here is the right list:
ls -lrat /usr/lib*/libxenctrl*
-rwxr-xr-x 1 root root 98176 2010-06-20 10:08 /usr/lib/libxenctrl.so.3.4.0
-rwxr-xr-x 1 root root 89584 2010-06-20 10:09 /usr/lib64/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 19 2011-02-20 10:18 /usr/lib64/libxenctrl.so.3.4 -> libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 28 2011-02-20 10:22 /usr/lib/libxenctrl.so -> /usr/lib/libxenctrl.so.3.4.0
lrwxrwxrwx 1 root root 30 2011-02-21 12:46 /usr/lib64/libxenctrl.so -> /usr/lib64/libxenctrl.so.3.4.0
I think the problem is the level of libxenctrl?? Is there a way to get the compiler to display what version of the libs it wants??
 
Old 02-21-2011, 10:25 PM   #4
z1p
Member
 
Registered: Jan 2011
Location: the right coast of the US
Distribution: Ubuntu 10.04
Posts: 80

Rep: Reputation: 23
The -lxenctrl option tells the linker to looks for libxenctrl.so with no version number. So, /usr/lib64/libxenctrl.so should satisfy the linker.

So you're still getting the same error with the current symbolic links?

Its looking right to me.

Have you tried explicitly looking in /usr/lib64 with "-L/usr/lib64" on the compile line?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/ld: cannot find -lm ahmed amine Linux - Software 5 07-23-2010 12:26 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:52 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