LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2004, 12:47 PM   #1
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
libtool 'dependency_libs' oddity


Hoping someone knows whats going on here, because I haven't been able to track this one down.

Recently (within the past few weeks) I've been learning automake, autoconf, libtool, and the works. Great set of tools. Anyway, I've got libtool setup to create some plugin objects.

The following is the '.la' file it generates, and installs in complement to the .so plugin. The problem does not seem to be causing any problems itself, but, it's something that's been bothering me and I'd like to fix it for good.

I've underlined the problem in the 'code' below.

Code:
# server.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5.6 (1.1220.2.94 2004/04/10 16:27:27)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='server.so'

# Names of this library.
library_names='server.so server.so server.so'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=' -ldl -lresolv -lpthread /opt/lib/./libstdc++.la -L/root/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src -L/root/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -L/root/src/gcc-build/gcc'

# Version information for server.
current=0
age=0
revision=0

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/opt/lib/fmail'
and...

Code:
[root@alpha common]# ls -l /root/src/gcc-build/ 
ls: /root/src/gcc-build/: No such file or directory
As you can see above, for some reason, the source directory for gcc is entered in as a dependency! However, it does not exist, nor as it existed for quite some time. In fact, I installed libtool (latest versions, of course) after having removed that source directory...so, my guess it's getting that path from somewhere else. I tried investigating the 'libtool' file itself (did you know it's a script, not a binary?) without much luck. It isn't exactly organized for understanding....

Of course, as I said, this isn't causing any problems with linking, or library issues like it might seem. It's merely a search path, only it has to be coming from somewhere and I'd like to find out where and remove it.

Thanks,
 
Old 07-25-2004, 04:35 PM   #2
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
I was hoping someone would respond, but I knew when I made my post that it was probably too specific for anyone to have a solution.

Either way, I've solved the problem. It all boils down to libstdc++.la. Notice the .la extension, meaning it's a libtool library archive file.

In the file, there's a particular line:

dependency_libs=' -L/root/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src -L/root/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm -lm -lm -L/root/src/gcc-build/gcc -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s'

I don't know why it's all so messy, but, cleaning it up:

dependency_libs=' -lm -lgcc_s -lc '

Fixes the problem. Yay.
 
  


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
Do one need in libtool? Ygrex Programming 1 11-01-2005 06:31 AM
libtool and pango kernelhacker Linux - Software 4 05-21-2005 01:48 AM
degrading libtool yonderstar Linux - Software 0 04-15-2004 02:24 PM
how do I uninstall libtool? dcardena Linux - Newbie 3 07-10-2003 12:21 PM
how do I uninstall libtool? dcardena *BSD 0 07-10-2003 12:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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