GNOME Bugzilla – Bug 576047
pkg-config for gtkmm under Windows cannot handling tha path with space
Last modified: 2010-05-30 21:10:03 UTC
Please describe the problem: If gtkmm installed under default path of win32 installer, such as "C:\Program Files\gtkmm". The pkg-config will not correctly output the result for --cflags or --libs. Steps to reproduce: 1. Install gtkmm-win32 by the official installer on the default path, or other directory with space in its name, such as "E:\Program Files\gtkmm". 2. open command line and run 'pkg-config --cflags' or 'pkg-config --libs' Actual results: E:\Program Files\gtkmm>pkg-config --libs gtkmm-2.4 Files/gtkmm/lib -LE:/Program -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl E:\Program Files\gtkmm>pkg-config --cflags gtkmm-2.4 Files/gtkmm/include/gtkmm-2.4 Files/gtkmm/lib/gtkmm-2.4/include Files/gtkmm/include/glibmm-2.4 Files/gtkmm/lib/glibmm-2.4/include Files/gtkmm/include/giomm-2.4 Files/gtkmm/lib/giomm-2.4/include Files/gtkmm/include/gdkmm-2.4 Files/gtkmm/lib/gdkmm-2.4/include Files/gtkmm/include/pangomm-1.4 Files/gtkmm/include/atkmm-1.6 Files/gtkmm/include/gtk-2.0 -mms-bitfields Files/gtkmm/include/sigc++-2.0 Files/gtkmm/lib/sigc++-2.0/include Files/gtkmm/include/glib-2.0 Files/gtkmm/lib/glib-2.0/include Files/gtkmm/lib/gtk-2.0/include Files/gtkmm/include/cairomm-1.0 Files/gtkmm/include/pango-1.0 Files/gtkmm/include/cairo Files/gtkmm/include/libpng12 Files/gtkmm/include/atk-1.0 -IE:/Program Expected results: Does this happen every time? yes, it is happened every time. Other information:
CCing Armin, who works on the Windows installer. Armin, is this a known pkg-config bug? Should our installer warn the user when they use a patch with spaces?
Yes, it is a known problem. See this freedesktop.org bug: https://bugs.freedesktop.org/show_bug.cgi?id=3571. The Wiki page at http://live.gnome.org/gtkmm/MSWindows already mentions the problem. I will add a warning to the installer, though I would love to simply have pkg-config fixed. The bug mentioned above even has a patch.
ok, maybe there are 2 options. First, build our own pkg-config with the patch fixed the problem, and package it into the win32 installer. Second, change the default installation path from "C:\Program Files\gtkmm" to "C:\gtkmm", so the pkg-config problem will not be raised. Of course, if the user intend to install it under something with space in name, then at least a warning is shown to user.
(In reply to comment #2) > I will add a warning to the installer, though I would love to simply have > pkg-config fixed. The bug mentioned above even has a patch. Where is that patch? Please give us the URL of the bugzilla report or similar. Why is this filed against gtkmm?
> Where is that patch? Please give us the URL of the bugzilla report or similar. I did already in comment #2: https://bugzilla.gnome.org/show_bug.cgi?id=576047 I guess there is not much we can do about this, apart from using a custom pkg-config with that patch applied (which I am not particulary keen to).
> I did already in comment #2: https://bugzilla.gnome.org/show_bug.cgi?id=576047 Sorry. I meant https://bugs.freedesktop.org/show_bug.cgi?id=3571 of course.
Yes, I'm closing this as NOTGNOME. Bugs for pkg-config can be filed at bugs.freedesktop.org.