[cairo] libtool help!

Damian Frank damian.frank at gmail.com
Fri Jul 17 08:26:53 PDT 2009


I'm trying to build on mingw on Windows, and I am having a lot of trouble
getting a shared library to be built.  In theory, this is in the same
configuration with the same dependencies as I've successfully built cairo
before, so I gather something may have changed.  (I'm building from the
current git sources.)

First, a word about my setup.  I'm building cairo & its dependencies in a
local, temporary directory, with environment variables & --prefix set up so
this local path is searched first.  Among other things, this avoids pulling
in certain system libraries, like, say, the wrong version of pixman (though
that's not an issue on win32 I suppose).  Anyway, among these is zlib, which
I build statically, intending that the cairo DLL will link statically with
it.  This has worked in the past, as recently as 1.8.X.  But now, libtool
seems to choke on zlib.  Here's the command & result of it:

/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2  -version-info
10905:0:10903 -no-undefined -export-symbols cairo.def
-L/tmp/pango-build-23492fskdja/install/lib  -o libcairo.la -rpath
/tmp/pango-build-23492fskdja/install/lib
cairo-analysis-surface.lo cairo-arc.lo cairo-array.lo cairo-atomic.lo
cairo-base85-stream.lo cairo-bentley-ottmann.lo cairo.lo cairo-cache.lo
cairo-clip.lo cairo-color.lo cairo-debug.lo cairo-fixed.lo
cairo-font-face.lo cairo-font-face-twin.lo cairo-font-face-twin-data.lo
cairo-font-options.lo cairo-freelist.lo cairo-gstate.lo cairo-hash.lo
cairo-hull.lo cairo-image-info.lo cairo-image-surface.lo cairo-lzw.lo
cairo-matrix.lo cairo-meta-surface.lo cairo-misc.lo cairo-mutex.lo
cairo-output-stream.lo cairo-paginated-surface.lo cairo-path-bounds.lo
cairo-path.lo cairo-path-fill.lo cairo-path-fixed.lo cairo-path-in-fill.lo
cairo-path-stroke.lo cairo-pattern.lo cairo-pen.lo cairo-polygon.lo
cairo-rectangle.lo cairo-region.lo cairo-scaled-font.lo cairo-skiplist.lo
cairo-slope.lo cairo-spans.lo cairo-spline.lo cairo-stroke-style.lo
cairo-surface.lo cairo-surface-fallback.lo cairo-tor-scan-converter.lo
cairo-system.lo cairo-traps.lo cairo-toy-font-face.lo cairo-unicode.lo
cairo-user-font.lo cairo-version.lo cairo-wideint.lo cairo-cff-subset.lo
cairo-scaled-font-subsets.lo cairo-truetype-subset.lo
cairo-type1-fallback.lo cairo-type1-subset.lo cairo-type3-glyph-surface.lo
cairo-pdf-operators.lo        cairo-win32-surface.lo
cairo-win32-printing-surface.lo cairo-win32-font.lo
cairo-ps-surface.lo cairo-pdf-surface.lo cairo-deflate-stream.lo
-LC:/DOCUME~1/damianf/LOCALS~1/Temp/pango-build-23492fskdja/install/lib
-lpixman-1      -lgdi32 -lmsimg32     -lz -lz    -lm

*** Warning: linker path does not have real file for library -lz.
*** 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
*** because I did check the linker path looking for a file starting
*** with libz and none of the candidates passed a file format test
*** using a file magic. Last file checked:
C:/DOCUME~1/damianf/LOCALS~1/Temp/pango-build-23492fskdja/install/lib/libz.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.


Just to be sure, that libz.a does exist, and is valid.

$ file
C:/DOCUME~1/damianf/LOCALS~1/Temp/pango-build-23492fskdja/install/lib/li
bz.a
C:/DOCUME~1/damianf/LOCALS~1/Temp/pango-build-23492fskdja/install/lib/libz.a:
current ar archive

Can anyone please offer me advice on getting this to link a shared library?

Damian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090717/00c491c3/attachment.html 


More information about the cairo mailing list