[cairo] fatal error: pthread.h: No such file or directory
suzuki toshiya
mpsuzuki at hiroshima-u.ac.jp
Sat Jul 4 19:16:09 PDT 2015
> That is how I am doing to cross-compile cairo-1.14.2:
> $ PKG_CONFIG_PATH="/usr/i686-pc-mingw32/lib/pkgconfig"
Who told you to do such? Clearly it does not fit to
the cross building, as you see that GLib header files
for the building system are included, like,
> In file included from /usr/include/glib-2.0/glib.h:107:0,
> from /usr/include/glib-2.0/gobject/gbinding.h:28,
> from /usr/include/glib-2.0/glib-object.h:23,
YuGiOhJCJ Mailing-List wrote:
> Hello,
>
> I try to cross-compile cairo-1.14.2 (because it is a dependency for gtk+-2.24.20).
> I do this with my cross-compiler (linux to windows) built with mingw32 and including all these libraries:
> binutils-2.24.51
> bzip2-1.0.6
> expat-2.1.0
> fontconfig-2.11.1
> freeglut-2.8.1
> freetype-2.4.10
> gcc-4.9.1
> gettext-0.18.2.1
> gtk+-1.2.10
> libffi-3.0.13
> libiconv-1.14
> libxml2-2.9.2
> libxmp-4.2.8
> mesa-9.1.3
> mingwrt-3.20.2
> sdl-1.2.15
> sdl-mixer-1.2.12
> sdl-net-1.2.8
> sdl-ttf-2.0.11
> smpeg-r389
> w32api-3.17.2
> xmp-4.0.8
> zlib-1.2.8
>
> That is how I am doing to cross-compile cairo-1.14.2:
> $ PKG_CONFIG_PATH="/usr/i686-pc-mingw32/lib/pkgconfig"
> $ tar xvf cairo-1.14.2.tar.xz
> $ cd cairo-1.14.2
> $ ./configure --prefix=/usr/i686-pc-mingw32 --host=i686-pc-mingw32 --enable-win32 --enable-win32-font --disable-xlib --disable-xlib-xrender --disable-xcb --disable-xlib-xcb --disable-xcb-shm --disable-pthread --without-x
> $ make
> [...]
> make[4]: Entering directory `/tmp/build/cairo-1.14.2/util/cairo-gobject'
> CC libcairo_gobject_la-cairo-gobject-enums.lo
> In file included from /usr/include/glib-2.0/glib.h:107:0,
> from /usr/include/glib-2.0/gobject/gbinding.h:28,
> from /usr/include/glib-2.0/glib-object.h:23,
> from cairo-gobject.h:44,
> from cairo-gobject-enums.c:8:
> /usr/include/glib-2.0/glib/deprecated/gthread.h:128:21: fatal error: pthread.h: No such file or directory
> #include <pthread.h>
> ^
> compilation terminated.
> make[4]: *** [libcairo_gobject_la-cairo-gobject-enums.lo] Error 1
> make[4]: Leaving directory `/tmp/build/cairo-1.14.2/util/cairo-gobject'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/tmp/build/cairo-1.14.2/util'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/tmp/build/cairo-1.14.2/util'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/build/cairo-1.14.2'
> make: *** [all] Error 2
>
> That is the first time I can't cross compile a library with my cross-compiler.
> I don't know exactly why it is looking for the "pthread.h" header because my cross-compiler is not supporting threads and because I have given the "--disable-pthread" option to the configure script.
>
> When I am looking at the /tmp/build/cairo-1.14.2/util/cairo-gobject/Makefile file where the problem is found, I see this rule:
> libcairo_gobject_la-cairo-gobject-enums.lo: cairo-gobject-enums.c
> $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_gobject_la_CFLAGS) $(CFLAGS) -MT libcairo_gobject_la-cairo-gobject-enums.lo -MD -MP -MF $(DEPDIR)/libcairo_gobject_la-cairo-gobject-enums.Tpo -c -o libcairo_gobject_la-cairo-gobject-enums.lo `test -f 'cairo-gobject-enums.c' || echo '$(srcdir)/'`cairo-gobject-enums.c
> $(AM_V_at)$(am__mv) $(DEPDIR)/libcairo_gobject_la-cairo-gobject-enums.Tpo $(DEPDIR)/libcairo_gobject_la-cairo-gobject-enums.Plo
>
> I think it is not normal that the "/usr/include/glib-2.0/glib/deprecated/gthread.h" file appears in the error message because this file is part of the headers available in my linux system.
> As I am cross-compiling cairo for windows, I should not see that.
> Maybe the problem is relative to libtool.
>
> Any idea why I got this error message please?
>
> Thank you.
> Best regards.
More information about the cairo
mailing list