Re: pkg-config
Sven Luther <[email protected]> Tue, 29 Apr 2003 13:46:13 +0200
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <20030429114613.GB30641@iliana> |
On Tue, Apr 29, 2003 at 10:47:57AM +0100, J. Ali Harlow wrote: > > On 2003.04.29 08:55 Sven Luther wrote: > > On Mon, Apr 28, 2003 at 02:28:42PM +0100, J. Ali Harlow wrote: > > > > I wrote a patch to get pkg-config to work as expected when cross > > > compiling. I did submit it but it doesn't seem to have been taken > > > up - I'm not sure why. I attach a copy in case it is of use. > > > > This is a patch you have to apply to the linux pkg-config, right ? > > Yup. Ok, i will try to build a debian package with the patch applied and see if it will work. That said, why do we really need to patch pkg-config ? We could simply call it either with the --define-variable=VARIABLENAME=VARIABLEVALUE argument to modify the prefix, or using the PKG_CONFIG_PATH env variable to point at the .pc files location ? Yep it seems to work : $ PKG_CONFIG_PATH=/home/luther/download/gtkwin32/lib/pkgconfig/ pkg-config --define-variable=prefix=/home/luther/download/gtkwin32 --cflags gtk+-2.0 -I/home/luther/download/gtkwin32/include/gtk-2.0 -I/home/luther/download/gtkwin32/lib/gtk-2.0/include -I/home/luther/download/gtkwin32/include/atk-1.0 -I/home/luther/download/gtkwin32/include/pango-1.0 -I/home/luther/download/gtkwin32/include/glib-2.0 -I/home/luther/download/gtkwin32/lib/glib-2.0/include $ PKG_CONFIG_PATH=/home/luther/download/gtkwin32/lib/pkgconfig/ pkg-config --define-variable=prefix=/home/luther/download/gtkwin32 --libs gtk+-2.0 -L/home/luther/download/gtkwin32/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv > > How do you install the gtk+ libraries, you simply unzip them somewhere > > and have pkg-config point to that ? > > That seems to work just fine, yes. Ok, will try that. Mmm, I need libintl and libiconv, ... $ export PKG_CONFIG_PATH=/home/luther/download/gtkwin32/lib/pkgconfig $ i586-mingw32msvc-gcc -mno-cygwin -mms-bitfields -o lib/hello-gtk `pkg-config --define-variable=prefix=/home/luther/download/gtkwin32 --cflags gtk+-2.0` hello-gtk.c `pkg-config --define-variable=prefix=/home/luther/download/gtkwin32 --libs gtk+-2.0` Yes, it builds fine, let's try launching it ... luther@iliana:~/download/gtkwin32$ cd lib luther@iliana:~/download/gtkwin32/lib$ wine ./hello-gtk err:module:get_registry_value Invalid load order module-type L"so", ignored err:module:get_registry_value Invalid load order module-type L"so", ignored fixme:keyboard:X11DRV_KEYBOARD_DetectLayout Your keyboard layout was not found! Using closest match instead (French keyboard layout) for scancode mapping. Please define your layout in windows/x11drv/keyboard.c and submit them to us for inclusion into future Wine releases. See the Wine User Guide, chapter "Keyboard" for more information. err:module:get_registry_value Invalid load order module-type L"so", ignored err:module:get_registry_value Invalid load order module-type L"so", ignored fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device VNETBIOS fixme:file:DeviceIoControl Unimplemented control 256 for VxD device NWLINK err:module:get_registry_value Invalid load order module-type L"so", ignored fixme:wintab32:WTInfoA (0, 0, (nil)): stub fixme:system:SystemParametersInfoA Unimplemented action: 74 (SPI_GETFONTSMOOTHING) err:module:get_registry_value Invalid load order module-type L"so", ignored Hello World Wine exited with a successful status Well, it works, there is garbage in the button though, but maybe this is just wine, will try launching it under windows. Mmm, i need to bundle the .dll with the executable, right ? > > BTW, would it be easier to cross compile the libraries than it is to > > build them under windows ? > > Well, I looked at building under Windows and decided it wasn't > worth pursuing - but then I'm biased in favour of Linux build > anyway because my configuration management system runs under UNIX. Yes. And if you can cross compile it under linux, cross-development debian packages can then be created, and you would just need to : apt-get install mingw32 libgtk2.0-cross-dev and compile from there :))) > I can cross-compile Gtk+ 2.2.1 with three patches now (I haven't > yet got around to submitting these but you can have copies if > you want them). Yes, please. > Last time I tried to cross-compile Glib I failed, > but I know that Owen has put a lot of work into improving the > situation since then so things may well have moved on. I haven't > tried to cross-compile any of the lower libraries yet. Which lower libraries ? libicon and libintl ? Friendly, Sven Luther