[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] trouble with libz.a and other libraries

From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] trouble with libz.a and other libraries
Date: Fri, 28 May 2010 20:18:52 +1000

On 28 May 2010 07:22, Natalie Tasman <address@hidden> wrote:
> I am trying to build libarchive 2.8.3, which uses an autotools and
> supports mingw, under the most recent dev version of mingw-cross-env.
> Other autotools projects are working under my cross-env setup, but I'm
> having trouble getting a useful build of libarchive.
> Please note: I don't know if this is an issue with mingw-cross-env, or
> with libarchive's ./configure (which as far as I know is tested on
> mingw but not under cross-compiling for mingw.)
> Unless I explicitly limit the  libarchive ./configure using
> --without-zlib (and so for all other dependencies: --without-bz2lib,
> etc) I get the follow error messages and get a libarchive.a and
> libarchive.la that I *cannot* link to from my other programs with
> mingw-cross-env.  However if I *do* disable these library
> dependencies, I get .a, .la, and .dll.a-- and then *can* use this
> libarchive with other mingw-cross-env-built projects-- but then cannot
> use libarchive to open .tgz files.
> Thanks,
> Natalie
> *** 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: /path/to/mingw-cross-env/usr/lib
> /gcc/i686-pc-mingw32/4.5.0/../../../../i686-pc-mingw32/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.

That seems to be a very roundabout way to say that it (what's with the
first person message?) can't create a shared library that links to a
static one. Use:


to avoid the warning (and speed up the build) though it's just a warning.

LZMA isn't part of mingw-cross-env, so leave it out:


Finally, there is a bug in ./configure that doesn't detect xml2
properly. Either disable it:


or specify the path to xml2-config:

XML2_CONFIG= path to mingw-cross-env/usr/i686-pc-mingw32/bin/xml2-config



reply via email to

[Prev in Thread] Current Thread [Next in Thread]