← Back to team overview

desktop-packages team mailing list archive

[Bug 1002565] Re: Libtool fails to handle library interdependencies

 

I have the same problem. On old version of Ubuntu our own and other
projects from the web properly compile, link *and* run. The same is true
using all other systems we have tested, openSUSE up to 13.1, different
Red Hats, Fedoras, Angstroem, Debian (RaspberryPi).

But with Ubuntu 14.04.2 LTS it doesn't work any more.

When I install the original libtool 2.4.2 from the GNU sources on Ubuntu
14.04.2 LTS everything is fine and back to normal. Just setting
link_all_deplibs to yes didn't help too much. Linking wasn't a problem,
but we had unresolved externals when trying to run binaries, and ldd
didn't show the dependencies as well, allthough libtool linked the
appropriate libs, probably missing some rpath statements (?).

Changing all autotool files of all our projects, or as a maintainer in
the sources from the web is quite some work. And the manual maintenance
of the nested dependencies in other libs or executables is not very
efficient and redundant work.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libtool in Ubuntu.
https://bugs.launchpad.net/bugs/1002565

Title:
  Libtool fails to handle library interdependencies

Status in libtool package in Ubuntu:
  New

Bug description:
  Libtool fails to handle library interdependencies.

  The interdependency is specified on the command line, and is recorded
  correctly by libtool, however, since there is no dependency from the
  point of view of the binary library files, and since libtool no longer
  adds all dependency libraries on the command line, compiling of the
  final application fails.

  I suppose the problem is that libtool has been changed to set
  link_all_deplibs=no on my platform, but I'm not sure.

  Here is an example that illustrates the problem:

  
  ### create test files:
  cat >alpha.hpp <<EOI
  void alpha();
  EOI
  cat >alpha.cpp <<EOI
  #include "alpha.hpp"
  void alpha() {}
  EOI
  cat >beta.hpp <<EOI
  #include "alpha.hpp"
  void beta1();
  inline void beta2() { alpha(); }
  EOI
  cat >beta.cpp <<EOI
  #include "beta.hpp"
  void beta1() {}
  EOI
  cat >app.cpp <<EOI
  #include "beta.hpp"
  int main()
  {
    beta2();
    return 0;
  }
  EOI

  ### build 'libalpha':
  libtool --tag=CXX --mode=compile g++ -c alpha.cpp
  libtool --tag=CXX --mode=link g++ alpha.lo -o libalpha.la -rpath /tmp

  ### build 'libbeta':
  libtool --tag=CXX --mode=compile g++ -c beta.cpp
  libtool --tag=CXX --mode=link g++ beta.lo libalpha.la -o libbeta.la -rpath /tmp # Depends on 'libalpha'

  ### build app:
  libtool --tag=CXX --mode=link g++ app.cpp libbeta.la -o app

  ### error:
  # In function `beta2()':
  # app.cpp: undefined reference to `alpha()'

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: libtool 2.4.2-1ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
  Uname: Linux 3.2.0-24-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0.1-0ubuntu7
  Architecture: amd64
  Date: Tue May 22 00:37:22 2012
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
  ProcEnviron:
   LANGUAGE=en_US:en
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: libtool
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libtool/+bug/1002565/+subscriptions