ggcov can't open exisiting shared libs

Bug #713811 reported by keith gallagher on 2011-02-05
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ggcov (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: ggcov

when I typed
>ggcov
ggcov: error while loading shared libraries: libbfd-2.20.1.20100303.so: cannot open shared object file: No such file or directory

I expected the tool to work...

> locate libbfd-
/usr/lib/libbfd-2.20.1-system.20100303.so

Ubuntu 10.04 LTS - the Lucid Lynx -

>apt-cache policy ggcov
ggcov:
  Installed: 0.8.1-1ubuntu1
  Candidate: 0.8.1-1ubuntu1
  Version table:
 *** 0.8.1-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

Related branches

Greg Banks (gnb-3) wrote :

Hi,

This problem should have been fixed by commit

http://ggcov.git.sourceforge.net/git/gitweb.cgi?p=ggcov/ggcov;a=commitdiff;h=6544b1e896b09438234359142e310650a27dac45

which was released in 0.8.3.

John Pye (jdpipe) wrote :

I had a look at the 0.8.3 version that's currently in Ubuntu 12.04, but it didn't work for me with my program that uses shared libraries.

But the latest 0.8.4 version *does* work fine. Let's upgrade!

On Tue, Oct 2, 2012 at 8:56 PM, John Pye <email address hidden> wrote:
> I had a look at the 0.8.3 version that's currently in Ubuntu 12.04, but
> it didn't work for me with my program that uses shared libraries.
>
> But the latest 0.8.4 version *does* work fine. Let's upgrade!
>

It's not that simple. The problem with libbfd is due to a bug in the
Ubuntu packaging of binutils. The binutils package provides a libbfd
shared library whose DSO name contains the binutils version number;
this is bizarre and in my experience unique to this one library in
this one package on this one distribution. For example

gnb@enki 582> ls -l /usr/lib/libX11*.so*
lrwxrwxrwx 1 root root 15 2009-07-12 03:53 /usr/lib/libX11.so ->
libX11.so.6.2.0
lrwxrwxrwx 1 root root 15 2009-06-18 18:45 /usr/lib/libX11.so.6 ->
libX11.so.6.2.0
-rw-r--r-- 1 root root 971436 2009-02-03 03:41 /usr/lib/libX11.so.6.2.0

gnb@enki 583> ls -l /usr/lib/libbfd*.so*
-rw-r--r-- 1 root root 948232 2009-02-11 03:13 /usr/lib/libbfd-2.19.1.so
lrwxrwxrwx 1 root root 16 2010-01-21 16:18 /usr/lib/libbfd.so ->
libbfd-2.19.1.so

The upshot is that everything works fine just after the ggcov package
has been built, but after the next time binutils is upgraded the ggcov
executable can no longer start. Upgrading to ggcov 0.8.4 will appear
to fix the problem, but only because the package has been freshly
compiled against the current binutils. Actually the problem will
re-appear when binutils is upgraded again.

The true solution is to link against libbfd in a way which survives
binutils being upgraded. To achieve that I would recommend upgrading
to the ggcov 0.8.4 release plus these two commits:

http://ggcov.git.sourceforge.net/git/gitweb.cgi?p=ggcov/ggcov;a=commitdiff;h=aa80fb7f94d40225e18932674d911b126bea1234
http://ggcov.git.sourceforge.net/git/gitweb.cgi?p=ggcov/ggcov;a=commitdiff;h=d44654466b8b2967e9f659d01545cde757d53dd4

and John will want this commit too

http://ggcov.git.sourceforge.net/git/gitweb.cgi?p=ggcov/ggcov;a=commitdiff;h=a3d89646b37deae1d30e74ff38a285e762fce831

and you will want a deb packaging equivalent of

http://ggcov.git.sourceforge.net/git/gitweb.cgi?p=ggcov/ggcov;a=commitdiff;h=1b10d86e1d5e7646383b7a17adb99b7198e53942

--
Greg.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ggcov (Ubuntu):
status: New → Confirmed
Greg Banks (greg-n-banks) wrote :

I've made a new upstream release which works around this Ubuntu bug. I've also attached updated debian packaging information. If someone with the appropriate permissions could check that in, I'd be very grateful.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ggcov - 0.9-4

---------------
ggcov (0.9-4) unstable; urgency=medium

  * Minor patch for PATH_MAX needed for Hurd.

 -- Alastair McKinstry <email address hidden> Tue, 08 Apr 2014 15:29:59 +0100

Changed in ggcov (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers