[pulseaudio-discuss] [PATCH] Explicitly link against pulse libraries

Colin Guthrie gmane at colin.guthr.ie
Fri Oct 15 00:58:31 PDT 2010


'Twas brillig, and Luke Yelavich at 15/10/10 04:31 did gyre and gimble:
> From: Luke Yelavich <luke.yelavich at canonical.com>
> 
> When building pulseaudio master using gcc 4.5.2 and binutils
> 2.20.51 plus latest snapshot from 2010-10-14, ld complained about missing
> symbols. This patch explicitly links more pulseaudio libraries to satisfy
> the linker.

When you say snapshot do you mean master or stable-queue?

I'm a bit puzzled by this as I don't seem to have the problem here (I'm
a point behind on the gcc tho' which could explain it).

As PA already has an internal circular dep you cannot use --no-undefined
or --as-needed so it's already fairly overlinked internally hence why
these issues don't always crop up so commonly.


Indeed doing ldd on a paplay (built as part of pulseaudio and without
no-undefined or as-needed) vs. a normal pulseaudio client e.g. mplayer
(which is compiled with no-undefined and as-needed) you see an
interesting story:

[colin at jimmy ~]$ ldd `which paplay` | grep pulse
	libpulse.so.0 => /usr/lib64/libpulse.so.0 (0x00007fdf72d8c000)
	libpulsecommon-0.9.21.so => /usr/lib64/libpulsecommon-0.9.21.so
(0x00007fdf72b3b000)
[colin at jimmy ~]$ ldd `which mplayer` | grep pulse
	libpulse.so.0 => /usr/lib64/libpulse.so.0 (0x00007f5f55c44000)
	libpulsecommon-0.9.21.so => /usr/lib64/libpulsecommon-0.9.21.so
(0x00007f5f4f94f000)


Both appear to be quite similar right? But compare them to this:

[colin at jimmy ~]$ objdump -p `which paplay` | grep pulse
  NEEDED               libpulse.so.0
  NEEDED               libpulsecommon-0.9.21.so
  required from libpulse.so.0:
[colin at jimmy ~]$ objdump -p `which mplayer` | grep pulse
  NEEDED               libpulse.so.0
  required from libpulse.so.0:


This clearly shows that paplay is overlinked.

Distros which do not much care about trying to prevent overlinking (I'm
thinking Fedora... but not confirmed personally - just going on what
I've been told in the past) will have to rebuild a whole lot more
packages when libpulsecommon-0.9.21.so changes to 0.9,22+


This is likely not relevant to your patch, but I'm still curious as to
why your problem is cropping up now. I guess it could easily be related
to gcc point release but I wouldn't have expected such an invasive
change would have been made deliberately.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list