LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2012, 02:00 PM   #1
[loki]
LQ Newbie
 
Registered: Mar 2006
Location: Québec
Distribution: Slackware 14.0
Posts: 7

Rep: Reputation: 1
Question Libtool's .la files


I would like to know why Slackware dev team chooses to ship certain packages (GConf for example) without the .la files? Is there a way to circumvent the .la files while building?

I am trying to build a Slackbuild (gnome-python-desktop) that links against GConf, but fails because the file cannot be found:
Code:
grep: /usr/lib64/libgconf-2.la: No such file or directory
/usr/bin/sed: can't read /usr/lib64/libgconf-2.la: No such file or directory
libtool: link: `/usr/lib64/libgconf-2.la' is not a valid libtool archive
 
Old 10-01-2012, 02:21 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Maybe the problem is in the slackbuilds you are using: I just tried to build it on slackware64-14.0 (all the dependencies too), using the script that you can find in slackbuilds.org's git repository and all went fine.
 
Old 10-02-2012, 07:20 AM   #3
[loki]
LQ Newbie
 
Registered: Mar 2006
Location: Québec
Distribution: Slackware 14.0
Posts: 7

Original Poster
Rep: Reputation: 1
It is this slackbuild I am using, and it doesn't work. It requires the .la file from GConf. I want to understand why it is looking for the .la file instead of using pkgconfig. I used to have Gnome Slackbuild installed, which did not remove the .la files from the packages. I removed GSB, but I compiled many packages against it that are still on my system. I may have "corrupted" my system in this way?
 
Old 10-02-2012, 07:58 AM   #4
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
This is the libgconf-2.la, version 2.28.1.

Should be easy to edit to your version, if different.
It's just a small text file.
You can also write .la files from scratch easily.
Getting files.la : Debian -dev packages :
http://packages.debian.org/squeeze/libgconf2-dev
.
Attached Files
File Type: txt libgconf-2.la.txt (943 Bytes, 252 views)
 
Old 10-02-2012, 01:05 PM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
I ran in to a similar problem. The .la files are not included in the Slackware package. They are removed in the build script.

Code:
# Don't ship .la files:
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
Only Pat or someone from the development team will be able to tell us why.

It an easy fix, simply comment out the line in the build script and recompile. That what I did. Worked for me.
 
Old 10-02-2012, 04:23 PM   #6
[loki]
LQ Newbie
 
Registered: Mar 2006
Location: Québec
Distribution: Slackware 14.0
Posts: 7

Original Poster
Rep: Reputation: 1
I understand that removing this line works appropriately and may be a solution. But for the sake of it, there must be a reason why Pat & the team shun the .la files. I would like to know why, and what would be the correct, or at least the most elegant, solution.
 
1 members found this post helpful.
Old 10-02-2012, 06:12 PM   #7
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by [loki] View Post
I understand that removing this line works appropriately and may be a solution. But for the sake of it, there must be a reason why Pat & the team shun the .la files. I would like to know why, and what would be the correct, or at least the most elegant, solution.
Most distributions are removing these now, where possible. It's basically another failed dependency system. In some cases, the .la files can absorb references to specific versions of other libraries, and when those are upgraded it causes breakage until everything else is rebuilt. Basically, the exact opposite of how shared libraries are supposed to work. The .la files have caused problems in Slackware in the past as well. There was one of the X revisions that would have been absolutely impossible to build without first removing all of the .la files because after the first library (libX11) was updated, nothing else would build.

There are a (very) few cases where the .la files are needed, generally in cases where they are used alongside plugins rather than shared libraries. But if a program seems to require .la files in order to compile, the odds are that the program is wrong, not the lack of .la files.

In the case of gnome-python-desktop, I can verify that it builds fine without the GConf .la files on a stock Slackware 14.0 system. What this tells me is that very likely GConf was installed previously from some other source (with the .la files). The reference to GConf's .la files then proceeded to infect the .la files of something else that was compiled and installed on the machine, and when GConf was updated to Slackware 14.0's version (without .la files), it created a broken reference that's now breaking some of the compiles on the machine. You might be able to find where the problem is by grepping the .la files on the machine for libgconf-2.la. If you find some, try moving them somewhere else to see if getting them out of the way fixes the compile. Of course... other .la files may reference the ones that reference libgconf-2.la. Which is the exact mess we're trying to avoid by shipping as few .la files as possible (and hopefully someday none at all).

Here's a link to some articles that might shed a bit more light on the subject:

http://blog.flameeyes.eu/tag/lafiles
 
8 members found this post helpful.
Old 10-03-2012, 01:12 PM   #8
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Thanks for the insight and ray of light toward this subject Pat; and to Loki for not accepting the easy way out.
 
Old 10-04-2012, 11:23 PM   #9
[loki]
LQ Newbie
 
Registered: Mar 2006
Location: Québec
Distribution: Slackware 14.0
Posts: 7

Original Poster
Rep: Reputation: 1
Indeed, thanks to Pat for the explanation. It was exactly what I was looking for.

For the record, I grep'ed the .la files in the /usr/lib64 repertory, looking for references to libgconf-2.la. I moved the files containing mentions of it to a backup repertory, and gnome-python-desktop compiled!
 
  


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
libtool error linuxdoniv Programming 1 02-05-2009 12:51 PM
Libtool errors jrdioko Linux - Software 0 09-11-2006 01:22 AM
Do one need in libtool? Ygrex Programming 1 11-01-2005 06:31 AM
i think i broke my libtool xushi Slackware 3 03-15-2005 01:55 PM
degrading libtool yonderstar Linux - Software 0 04-15-2004 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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