#352 libz.dll.a is missing

v1.0 (example)
closed
nobody
libtool (1)
5
2013-10-30
2013-10-22
Zane U. Ji
No

Windows 7 32bit with GCC 4.8.2 from https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.2/threads-posix/sjlj/ i686-4.8.2-release-posix-sjlj-rt_v3-rev0.7z

When libxml2-2.9.1 is configured with "./configure --enable-shared", there were errors when compiling. No libxml2.dll is produced.
It turned out that libxml2 depends on zlib.
The problem can be reproduced with:
/bin/sh ./libtool --tag=CC --mode=link gcc -DHAVE_WIN32_THREADS -D_REENTRANT -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long -no-undefined -Wl,--version-script=../libxml2.syms -version-info 11:1:9 -o libxml2.la -rpath /mingw/lib SAX.lo entities.lo encoding.lo error.lo parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo nanohttp.lo nanoftp.lo catalog.lo globals.lo threads.lo c14n.lo xmlstring.lo buf.lo xmlregexp.lo xmlschemas.lo xmlschemastypes.lo xmlunicode.lo xmlreader.lo relaxng.lo dict.lo SAX2.lo xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo xmlmodule.lo schematron.lo xzlib.lo -lz -liconv -lws2_32

The output is:
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: d:/mingw32/i686-w64-mingw32/lib/libz.
a

Reinstalling zlib fixes the problem

Discussion

  • niXman
    niXman
    2013-10-22

    In fact, our builds is not aimed to provide additional libraries(to do this we are working on another project). I think in the future we will stop to supply zlib as part of our builds.

     
  • Kai Tietz
    Kai Tietz
    2013-10-30

    • status: open --> closed