Bug 23480 - pkg-config 0.23 renders '-idirafter -I/usr/X11R6/include' to '-I/usr/X11R6/include ... -idirafter'
Summary: pkg-config 0.23 renders '-idirafter -I/usr/X11R6/include' to '-I/usr/X11R6/in...
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: PowerPC Mac OS X (All)
: medium normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 02:27 UTC by Peter Dyballa
Modified: 2010-05-09 00:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Dyballa 2009-08-24 02:27:05 UTC
Hello!

Due to my pretty old Mac OS X 10.4.11 (Tiger) and more up-to-date software in /sw or in /opt I need put /usr/X11R6/include at the end of the search path with -idirafter (maybe an extension of GCC in Mac OS X only). Now it happens that 'pkg-config --cflags "librsvg-2.0 >= 2.11.0"' (needed for GNU Emacs 23.1.50 from CVS) returns nonsense:

-I/sw/include/freetype2 -I/sw/include -I/sw/lib/fontconfig2/include -I/sw/include/librsvg-2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/gtk-2.0 -I/sw/include/cairo -I/sw/include/pixman-1 -I/sw/include/libpng12 -I/usr/X11R6/include -I/usr/X11/include -idirafter

With the debug option (excerpt) I get:

Looking for package 'librsvg-2.0'
Looking for package 'librsvg-2.0-uninstalled'
Reading 'librsvg-2.0' from file '/sw/lib/pkgconfig/librsvg-2.0.pc'
Parsing package file '/sw/lib/pkgconfig/librsvg-2.0.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>svgz_supported=true
 Variable declaration, 'svgz_supported' has value 'true'
  line>css_supported=true
 Variable declaration, 'css_supported' has value 'true'
  line>
  line>Name: librsvg
  line>Description: library that renders svg files
  line>Version: 2.26.0
  line>Requires: glib-2.0 gdk-pixbuf-2.0 cairo
Looking for package 'glib-2.0'
Looking for package 'glib-2.0-uninstalled'
Reading 'glib-2.0' from file '/sw/lib/pkgconfig/glib-2.0.pc'
Parsing package file '/sw/lib/pkgconfig/glib-2.0.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>glib_genmarshal=glib-genmarshal
 Variable declaration, 'glib_genmarshal' has value 'glib-genmarshal'
  line>gobject_query=gobject-query
 Variable declaration, 'gobject_query' has value 'gobject-query'
  line>glib_mkenums=glib-mkenums
 Variable declaration, 'glib_mkenums' has value 'glib-mkenums'
  line>
  line>Name: GLib
  line>Description: C Utility Library
  line>Version: 2.20.4
  line>Libs: -L${libdir} -lglib-2.0 -lintl 
  line>Libs.private: -liconv
Unknown keyword 'Libs.private' in '/sw/lib/pkgconfig/glib-2.0.pc'
  line>Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include 
Path position of 'GLib' is 7
Adding 'glib-2.0' to list of known packages, returning as package 'glib-2.0'
Looking for package 'gdk-pixbuf-2.0'
Looking for package 'gdk-pixbuf-2.0-uninstalled'
Reading 'gdk-pixbuf-2.0' from file '/sw/lib/pkgconfig/gdk-pixbuf-2.0.pc'
Parsing package file '/sw/lib/pkgconfig/gdk-pixbuf-2.0.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: GdkPixbuf
  line>Description: Image loading and scaling
  line>Version: 2.16.5
  line>Requires: gobject-2.0,gmodule-no-export-2.0
Looking for package 'gobject-2.0'
Looking for package 'gobject-2.0-uninstalled'
Reading 'gobject-2.0' from file '/sw/lib/pkgconfig/gobject-2.0.pc'
Parsing package file '/sw/lib/pkgconfig/gobject-2.0.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: GObject
  line>Description: GLib Type, Object, Parameter and Signal Library
  line>Requires: glib-2.0
  line>Version: 2.20.4
  line>Libs: -L${libdir} -lgobject-2.0
  line>Cflags:
Path position of 'GObject' is 7
Adding 'gobject-2.0' to list of known packages, returning as package 'gobject-2.0'
Looking for package 'gmodule-no-export-2.0'
Looking for package 'gmodule-no-export-2.0-uninstalled'
Reading 'gmodule-no-export-2.0' from file '/sw/lib/pkgconfig/gmodule-no-export-2.0.pc'
Parsing package file '/sw/lib/pkgconfig/gmodule-no-export-2.0.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>gmodule_supported=true
 Variable declaration, 'gmodule_supported' has value 'true'
  line>
  line>Name: GModule
  line>Description: Dynamic module loader for GLib
  line>Requires: glib-2.0
  line>Version: 2.20.4
  line>Libs: -L${libdir} -lgmodule-2.0
  line>Libs.private: 
Unknown keyword 'Libs.private' in '/sw/lib/pkgconfig/gmodule-no-export-2.0.pc'
  line>Cflags:
Path position of 'GModule' is 7
Adding 'gmodule-no-export-2.0' to list of known packages, returning as package 'gmodule-no-export-2.0'
  line>Libs: -L${libdir} -lgdk_pixbuf-2.0 
  line>Cflags: -I${includedir}/gtk-2.0 
  line>
Path position of 'GdkPixbuf' is 7
Adding 'gdk-pixbuf-2.0' to list of known packages, returning as package 'gdk-pixbuf-2.0'
Looking for package 'cairo'
Looking for package 'cairo-uninstalled'
Reading 'cairo' from file '/sw/lib/pkgconfig/cairo.pc'
Parsing package file '/sw/lib/pkgconfig/cairo.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: cairo
  line>Description: Multi-platform 2D graphics library
  line>Version: 1.8.8
  line>
  line>Requires.private:  pixman-1 >= 0.12.0    freetype2 >= 9.7.3 fontconfig glitz >= 0.5.1 libpng12     
Looking for package 'pixman-1'
Looking for package 'pixman-1-uninstalled'
Reading 'pixman-1' from file '/sw/lib/pkgconfig/pixman-1.pc'
Parsing package file '/sw/lib/pkgconfig/pixman-1.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: Pixman
  line>Description: The pixman library (version 1)
  line>Version: 0.14.0
  line>Cflags: -I${includedir}/pixman-1 
  line>Libs: -L${libdir} -lpixman-1 
  line>
Path position of 'Pixman' is 7
Adding 'pixman-1' to list of known packages, returning as package 'pixman-1'
Looking for package 'freetype2'
Looking for package 'freetype2-uninstalled'
Reading 'freetype2' from file '/sw/lib/freetype219/lib/pkgconfig/freetype2.pc'
Parsing package file '/sw/lib/freetype219/lib/pkgconfig/freetype2.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: FreeType 2
  line>Description: A free, high-quality, and portable font engine.
  line>Version: 9.19.3
  line>Requires:
  line>Libs: -L${libdir} -lfreetype -lz -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices
  line>Cflags: -I${includedir}/freetype2 -I${includedir}
Path position of 'FreeType 2' is 2
Adding 'freetype2' to list of known packages, returning as package 'freetype2'
Looking for package 'fontconfig'
Looking for package 'fontconfig-uninstalled'
Reading 'fontconfig' from file '/sw/lib/fontconfig2/lib/pkgconfig/fontconfig.pc'
Parsing package file '/sw/lib/fontconfig2/lib/pkgconfig/fontconfig.pc'
  line>prefix=/sw/lib/fontconfig2
 Variable declaration, 'prefix' has value '/sw/lib/fontconfig2'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw/lib/fontconfig2'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib/fontconfig2/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/lib/fontconfig2/include'
  line>
  line>Name: Fontconfig
  line>Description: Font configuration and customization library
  line>Version: 2.4.1
  line>Libs: -L${libdir} -lfontconfig
  line>Libs.private: -lexpat
Unknown keyword 'Libs.private' in '/sw/lib/fontconfig2/lib/pkgconfig/fontconfig.pc'
  line>Cflags: -I${includedir}
Path position of 'Fontconfig' is 3
Adding 'fontconfig' to list of known packages, returning as package 'fontconfig'
Looking for package 'glitz'
Looking for package 'glitz-uninstalled'
Reading 'glitz' from file '/sw/lib/pkgconfig/glitz.pc'
Parsing package file '/sw/lib/pkgconfig/glitz.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/sw/include'
  line>
  line>Name: libglitz
  line>Description: OpenGL compositing library
  line>Version: 0.5.6
  line>Libs: -L${libdir} -lglitz -lm
  line>Cflags: -I${includedir}
Path position of 'libglitz' is 7
Adding 'glitz' to list of known packages, returning as package 'glitz'
Looking for package 'libpng12'
Looking for package 'libpng12-uninstalled'
Reading 'libpng12' from file '/sw/lib/pkgconfig/libpng12.pc'
Parsing package file '/sw/lib/pkgconfig/libpng12.pc'
  line>prefix=/sw
 Variable declaration, 'prefix' has value '/sw'
  line>exec_prefix=${prefix}
 Variable declaration, 'exec_prefix' has value '/sw'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/sw/lib'
  line>includedir=${prefix}/include/libpng12
 Variable declaration, 'includedir' has value '/sw/include/libpng12'
  line>
  line>Name: libpng
  line>Description: Loads and saves PNG files
  line>Version: 1.2.35
  line>Libs: -L${libdir} -lpng12
  line>Libs.private: -lz 
Unknown keyword 'Libs.private' in '/sw/lib/pkgconfig/libpng12.pc'
  line>Cflags: -I${includedir} 
Path position of 'libpng' is 7
Adding 'libpng12' to list of known packages, returning as package 'libpng12'
  line>Libs: -L${libdir} -lcairo
  line>Libs.private:    -lz -lSM -lICE  -L/usr/X11R6/lib -lX11    -lXrender -lXext
Unknown keyword 'Libs.private' in '/sw/lib/pkgconfig/cairo.pc'
  line>Cflags: -I${includedir}/cairo -idirafter -I/usr/X11R6/include -I/usr/X11/include
Path position of 'cairo' is 7
Adding 'cairo' to list of known packages, returning as package 'cairo'
  line>Requires.private
  line>Libs: -L${libdir} -lrsvg-2
  line>Cflags: -I${includedir}/librsvg-2
Path position of 'librsvg' is 7
Adding 'librsvg-2.0' to list of known packages, returning as package 'librsvg-2.0'
 original:  librsvg  GLib  GdkPixbuf  cairo  GObject  GModule  GLib  GLib  Pixman  FreeType 2  Fontconfig  libglitz  libpng 
 sorted:  FreeType 2  Fontconfig  librsvg  GLib  GdkPixbuf  cairo  GObject  GModule  GLib  GLib  Pixman  libglitz  libpng 
 original:  librsvg  GLib  GdkPixbuf  cairo  GObject  GModule  GLib  GLib  Pixman  FreeType 2  Fontconfig  libglitz  libpng 
 sorted:  FreeType 2  Fontconfig  librsvg  GLib  GdkPixbuf  cairo  GObject  GModule  GLib  GLib  Pixman  libglitz  libpng 
 removing duplicate "-I/sw/include/glib-2.0"
 removing duplicate "-I/sw/lib/glib-2.0/include"
 removing duplicate "-I/sw/include/glib-2.0"
 removing duplicate "-I/sw/lib/glib-2.0/include"
 removing duplicate "-I/sw/include"
-I/sw/include/freetype2 -I/sw/include -I/sw/lib/fontconfig2/include -I/sw/include/librsvg-2 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/gtk-2.0 -I/sw/include/cairo -I/sw/include/pixman-1 -I/sw/include/libpng12 -I/usr/X11R6/include -I/usr/X11/include -idirafter


Pkgconfig should not separate -idirafter from the following -I/path/to/includes word.
Comment 1 Tollef Fog Heen 2010-05-09 00:36:08 UTC
Fixed in git f41325e


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.