RE: Link errors building gdk-pixbuf under CygWin
- From: "Ian Puleston" <ian underpressuredivers com>
- To: <gtk-list gnome org>
- Subject: RE: Link errors building gdk-pixbuf under CygWin
- Date: Mon, 12 Mar 2007 12:13:07 -0700
Typical - having struggled with this for some time, I managed to crack the
problem right after sending out the email for help.
It was nothing to do with configure not detecting cairo-pdf.h, but actually
due to it failing to compile a test program with cairo-pdf.h included, and
that failure was due to a problem with pkg-config. The pkg-config that comes
in the GTK/bin directory with the GTK Win32 port (pkg-config version 0.20)
and the latest CygWin version (0.21) both have this problem. pkg-config
outputs "\r\n" at the end, but when the shell uses that output to set a
variable via XXX=`pkg-config ...` it strips off just "\n" leaving a spurious
"\r" in the variable value. The "\r" was ending up embedded in the gcc
command line, causing gcc to report an error.
The workaround that I used was to pipe the output of pkg-config through
"echo -n". I edited configure to change every occurance of XXX=`pkg-config
...` to XXX=`pkg-config ... | xargs echo -n`. With that configure completes
CC='gcc -march=pentium' CPPFLAGS='-Ic:/GTK/include -Ic:/GTK/include/cairo'
CFLAGS='-O2' LDFLAGS='-Lc:/GTK/lib' ./configure --disable-static
--prefix=c:/GTK --with-gdktarget=win32 --host=i386-pc-mingw32
> -----Original Message-----
> From: gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] On
> Behalf Of Ian Puleston
> Sent: Monday, March 12, 2007 11:24 AM
> To: gtk-list gnome org
> Subject: RE: Link errors building gdk-pixbuf under CygWin
> > -----Original Message-----
> > From: Tor Lillqvist [mailto:tml iki fi]
> > Sent: Thursday, March 08, 2007 2:18 PM
> > If the latter, I strongly recommend using mingw and MSYS instead of
> > Cygwin as a development environment.
> So far, I've had no success running GTK's configure in Win32 under mingw
> msys. I haven't been able to get it to detect cairo-pdf.h which is present
> in my C:/GTK directory:
> [gtk+-2.10.9]: CC='gcc -march=pentium' CPPFLAGS='-Ic:/GTK/include
> -Ic:/GTK/include/cairo' CFLAGS='-O2' LDFLAGS='-Lc:/GTK/lib' ./configure
> --disable-static --prefix=c:/GTK --with-gdktarget=win32
> --host=i386-pc-mingw32 --includedir=c:/GTK/include
> configure: WARNING: If you wanted to set the --build type, don't use --
> If a cross compiler is detected then cross compile mode will be used.
> checking for a BSD-compatible install... /bin/install -c
> checking whether build environment is sane... yes
> checking ATK flags... -Ic:/GTK/include/atk-1.0 -Ic:/GTK/include/glib-2.0
> -Ic:/GTK/lib/glib-2.0/include -Lc:/GTK/lib -latk-1.0 -lgobject-2.0
> -lgmodule-2.0 -lglib-2.0 -lintl -liconv
> checking for cups-config... no
> checking cairo-pdf.h usability... no
> checking cairo-pdf.h presence... no
> checking for cairo-pdf.h... no
> configure: error:
> *** Can't find cairo-pdf.h. You must build Cairo with the pdf
> *** backend enabled.
> [gtk+-2.10.9]: find c:/GTK/include -name "cairo-pdf.h"
> Any ideas on how to tell it where to look to find this?
> gtk-list mailing list
> gtk-list gnome org
] [Thread Prev