[Top][All Lists]

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

Re: [Mingw-cross-env-list] Re: zlib 1.2.5 fails on Ubuntu Linux (amd64)

From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] Re: zlib 1.2.5 fails on Ubuntu Linux (amd64) -- adler32.o: No such file or directory -> Solved
Date: Sat, 19 Jun 2010 20:53:45 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Garth Dahlstrom <address@hidden> schrieb:
> Adding a CC define to the zlib.mk solved it!   Patch is attached.

Thanks for providing a working solution. However, I can't accept it
because we need to address the real cause of the problem.

The real issue is that the CC environment variable is exported to
sub processes (here: Zlib's ./configure). That simply shouldn't
happen! We try to explicitly unset all troublesome environment
variables in the main Makefile:

    # unset any environment variables which might cause trouble
    AR =
    CC =
    CFLAGS =

However, those empty assignment don't really remove the variables. The
variables are still exported to sub processes as "" (empty strings).
Most scripts are satisfied with that, because they only check whether
"$CC" evaluates to "", which is true for empty as well as undefined
environment variables.

In contrast, Zlib's ./configure script really checks whether $CC
is defined and only replaces it with "${CROSS_PREFIX}gcc" if $CC
was undefined, using the "${VAR-default}" construct:



So we have to fix the cleanup code of our Makefile. Note that there
is no "undef" or "unset" command in GNU Make. However, there is the
"unexport" command which prevents Make variables to be exported:

    # unexport any environment variables that might cause trouble
    unexport AR
    unexport CC
    unexport CFLAGS

Since those variables are no longer exported, there is no need to
unset or to empty them anymore.

I just committed the corresponding patch:

Garth, please check whether that solves the issue on your machine.


Volker Grabsch
NotJustHosting GbR

reply via email to

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