On OS X, gcc has a special -framework flag, which is used to link against frameworks (frameworks are directories containing ordinary libraries). The framework flag is a flag with a parameter. pkg-config messes up these flags because it weeds out duplicates. For instance, if a package links against two frameworks, Foo and Bar, we get this: -framework Foo -framework Bar ..which gets mangled by pkgconfig into: -framework Foo Bar ..which gcc will parse as '-framework Foo' with some garbage 'Bar'. So, each package that uses pkgconfig on OS X will break if it uses more than one -framework flag.
2005-04-02 Tollef Fog Heen <tfheen@err.no> * parse.c (parse_libs): Handle -framework as a single argument. (Freedesktop #1278) If you could try with the current CVS version, that would be nice. It seems to work in my preliminary testing.
pkg-config 0.17 released; closing bug
Still broken: $ cat libcdio.pc prefix=/sw exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libcdio Description: Portable CD-ROM I/O library Version: 0.79 #Requires: glib-2.0 Libs: -L${libdir} -lcdio -L/sw/lib -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit Cflags: -I${includedir} $ pkg-config --libs libcdio -L/sw/lib -Wl,-framework -Wl,CoreFoundation -Wl,IOKit -lcdio -lm
Created attachment 106975 [details] [review] [PATCH] Also match -Wl,-framework for OSX framework Freedesktop #1278 (https://bugs.freedesktop.org/show_bug.cgi?id=1278) --- parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Does the attached patch fix things for you? We were only matching on -framework and not -Wl,-framework.
Went ahead and pushed the fix in 8d19fad. Moving back to fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.