After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313433 - Broken esound.pc when using coreaudio
Broken esound.pc when using coreaudio
Status: RESOLVED FIXED
Product: esound
Classification: Deprecated
Component: general
0.2.x
Other Mac OS
: Normal major
: ---
Assigned To: Esound Maintainers
Esound Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-14 06:54 UTC by Daniel Macks
Modified: 2006-08-08 02:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Prevent pkg-config from munging -Wl,-framework (611 bytes, patch)
2005-08-16 14:22 UTC, Daniel Macks
none Details | Review

Description Daniel Macks 2005-08-14 06:54:23 UTC
Version details: 0.2.36
Distribution/Version: 10.3.9; XCode 1.5

1. Compile and install pkg-config 0.17.2.
2. Compile and install esound.
3. Compile and install libcdio.
4. 'pkg-config --libs esound libcdio'

This gives:
  -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit -Wl,CoreAudio
-L/sw/lib -lesd -laudiofile -lcdio -lm
instead of:
  -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit -Wl,-framework
-Wl,CoreAudio -L/sw/lib -lesd -laudiofile -lcdio -lm

The Libs entries in the .pc files contain:

esound.pc:  -L${libdir} -lesd -Wl,-framework -Wl,CoreAudio
libcdio.pc: -L${libdir} -lcdio  -lm  -Wl,-framework -Wl,CoreFoundation
"-Wl,-framework -Wl,IOKit"

pkg-config treats each whitespace-separated word as a separate entity: it
doesn't know -Wl,-framework is the first of a two-word compiler flag, so it 
squeezes out the "duplicate" occurance. That means the second word is passed
bare, which is not correct. This problem occurs whenever esound.pc is used at
the same time as any other .pc that also passes a -Wl,-framework in this manner.

According to the gcc manpage:
  -Wl,option
    Pass option as an option to the linker.  If option contains com-
    mas, it is split into multiple options at the commas.
so esound.pc should contain:
  Libs: -L${libdir} -lesd -Wl,-framework,CoreAudio
Comment 1 Daniel Macks 2005-08-16 14:22:11 UTC
Created attachment 50798 [details] [review]
Prevent pkg-config from munging -Wl,-framework
Comment 2 David Schleef 2006-08-08 02:32:31 UTC
Applied, thanks.