On Tue, Oct 2, 2012 at 8:56 PM, John Pye <713...@bugs.launchpad.net> 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/713811

Title:
  ggcov can't open exisiting shared libs

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to