LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-20-2011, 10:17 PM   #1
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 42

Rep: Reputation: 18
slackware64-current libtool using path to old version of GCC


Hi folks-

In a nutshell, libtool is providing paths to a library that are relative to a no longer present version of gcc (4.5.1). The error can be circumvented by editing /usr/bin/libtool and replacing all instances of 4.5.1 with the current gcc version.

It feels rather odd to be editing such a file by hand, so I figured I'd post here and see if there's actually a more appropriate solution that I'm not aware of.

Here's the longer version:
I've been building the msp430 development tools and needed to build a tool called srecord, a tool for working with EPROMS.

The tool needs to be linked against crti.o, crtbeginS.o, crtendS.o, and crtn.o. These files live in /usr/lib64/ but libtool produces paths such as /usr/lib64/gcc/x86_64-slackware-linux/4.5.1/../../../../lib64/ which ultimately boils down to the correct path, IF the 4.5.1 directory existed.

As far as I can tell, there's no configure option or environment variable that can be set to affect libtool's path. This conclusion is supported by the fact that in /usr/bin/libtool the numbers are all hard coded into the paths, not set by a variable.

Could this be the result of something that I've done? Did I miss an update or something? I mentioned the fix above, but is there a better one?

Thanks all,
--Chad
 
Old 11-21-2011, 12:22 AM   #2
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 212Reputation: 212Reputation: 212
Fresh install of current results in
Code:
sys_lib_search_path_spec="/usr/lib64/gcc/x86_64-slackware-linux/4.5.1 /usr/lib64 /lib64 /usr/x86_64-slackware-linux/lib
libtool should be rebuilt after each gcc upgrade, as it has hard coded paths toward GCC's libraries.

Looking at the change logs, libtool was last built on Sun Nov 14 23:58:42 UTC 2010, which was before 13.37 upgraded to gcc 4.5.2. It's the reason for the 4.5.1 path in libtool.
 
Old 11-21-2011, 03:14 PM   #3
mats_b_tegner
Member
 
Registered: Nov 2009
Location: Gothenburg, Sweden
Distribution: Slackware64
Posts: 136

Rep: Reputation: 46
Why don't you download the SlackBuild-script and rebuild libtool yourself? The latest stable libtool is version 2.4.2.
Grab the SlackBuild-script here and the other files exept the libtool 2.4 source:
http://slackware.osuosl.org/slackwar...rce/d/libtool/

Latest libtool source:
http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.xz
http://ftpmirror.gnu.org/libtool/lib...4.2.tar.xz.sig

Last edited by mats_b_tegner; 11-21-2011 at 04:02 PM.
 
Old 11-21-2011, 04:03 PM   #4
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,775
Blog Entries: 15

Rep: Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727
The version of GCC you are using...

Did you install it from a Slackware Update, did it come with the system, or did you build it from source?
 
0 members found this post helpful.
Old 11-21-2011, 10:04 PM   #5
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 42

Original Poster
Rep: Reputation: 18
@disturbed1: Thanks, now I know I'm not crazy!

I use slackpkg to stay updated with slackware64-current, so, my version of GCC 4.5.3.

Perhaps building a new version of libtool would be a better solution than just hacking the existing version. That's a good suggestion.

I am somewhat curious about the reasoning behind hard-coding the version number of GCC into libtool. But I suppose that's a question for a different forum!

Anyway, since I was able to fix it, much of the purpose of my post was to inform anyone else that might run into the problem.
 
Old 11-21-2011, 10:40 PM   #6
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by JazzItSelf View Post
I am somewhat curious about the reasoning behind hard-coding the version number of GCC into libtool. But I suppose that's a question for a different forum!
I recalled a blurb about needing to rebuild libtool after GCC upgrades from Gentoo.
http://www.gentoo.org/doc/en/gcc-upgrading.xml

I do not recall too much info about GCC and libtool during my LFS builds. IIRC, most software should use it's own libtool script, and not use the hosts?? But that's far beyond my scope. Personally I have not ran into any linking issues (that I'm aware of ) with Slackware not updating libtool with each GCC upgrade.
 
Old 11-21-2011, 11:35 PM   #7
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,775
Blog Entries: 15

Rep: Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727
Yes, you need to rebuild libtool if you update GCC. Easiest way to do this is grab the sources and the SlackBuild Patrick provides in the /src folder of the -current tree and rebuild it, and then uninstall the old one and install the updated version you just built.

Once it's rebuilt you should be okay.
 
  


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
Updating from Slackware64-current to Slackware64 13. glore2002 Slackware 4 08-28-2009 06:50 PM
slackware64-current : pulseaudio compilation fails, wrong version of libtool pokipoki08 Slackware 2 07-31-2009 11:59 PM
Installing automake,libtool and gcc on Mandrake 9.2 Mizar81 Mandriva 1 11-10-2008 01:47 AM
installing older version of gcc and and adding path variables jaind Linux - Desktop 3 11-26-2006 06:18 AM
Can't YUM update because LIBTOOL wants older GCC rvicker Linux - General 2 02-27-2006 06:58 PM


All times are GMT -5. The time now is 04:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration