[cairo] Win32 compiling question
richard at theworths.org
richard at theworths.org
Fri Apr 9 05:02:28 PDT 2004
On Sat Apr 3 Andreas Raab wrote:
> I was trying to compile Cairo on Cygwin but I ran into some trouble,
> apparently caused by libpixman - when I compile Cairo I get an error
> message wildly claiming:
>
> *** Warning: This system can not link to static lib archive
> /usr/local/lib/libpixman.la.
> *** I have the capability to make that library automatically link in
> when *** you link to this library. But I can only do this if you have
> a *** shared version of the library, which you do not appear to have.
The problem here is a missing libtool flag '-no-undefined' when libpixman
was compiled. This is required on Windows (see
http://sources.redhat.com/autobook/autobook/autobook_88.html for more
information)
When you compiled libpixman there was a (easily missed) warning:
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared libraries
At this point because of platform restrictions it is no longer able to make
a shared library so it makes only a static library. (Hence your later error
message, when trying to link to a shared library)
When you do a make install at this point, two files are copied to
/usr/local/lib/
libpixman.a
libpixman.la
The one you're missing (the shared library file) is
libpixman.dll.a
> Any ideas what to do about this? I had libpixman compiled with an
> out-of-the-box "make install" and it seemed to compile and install
> okay.
I assume you've compiled libpixman from a snapshot tar file? (maybe that's
what you meant by out-of-the-box?) It looks like it's out of date.
The last libpixman snapshot (libpixman-0.1.0.tar.gz) is dated 01-Jan-2004
This cygwin '-no-undefined' fix was committed to CVS on 23-Jan-2004
See the following thread for more information:
http://www.cairographics.org/pipermail/cairo/2004-January/000944.html
Three options:
1. Add the '-no-undefined' libtool flag manually:
modify libpixman/src/Makefile (line 163) from
libpixman_la_LDFLAGS = -version-info 1:0:0
to
libpixman_la_LDFLAGS = -version-info 1:0:0 -no-undefined
You'll have to modify a similar line in cairo/src/Makefile, otherwise
you'll have the same problem trying to build a shared library version of
cairo.2. Build from CVS.
3. Wait for the libpixman snapshot to be updated. (Sorry, I can't help you
there)
Hope this helps.
- Richard D. Worth
richard at theworths.org
More information about the cairo
mailing list