bug-gnulib
[Top][All Lists]
Advanced

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

Re: Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".


From: Simon Josefsson
Subject: Re: Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
Date: Mon, 22 Jan 2007 08:08:46 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux)

Jim Meyering <address@hidden> writes:

> Simon Josefsson <address@hidden> wrote:
>> This patch seem to cause plenty of build failures like this:
>
> Hi Simon,
>
> Thanks for the report.
> What version of autoconf are you using on that system?

dopio:/data/gnulib/build/gettime# autoconf --version|head -1
autoconf (GNU Autoconf) 2.61
dopio:/data/gnulib/build/gettime# automake --version|head -1
automake (GNU automake) 1.9.6
dopio:/data/gnulib/build/gettime# libtool --version|head -1
ltmain.sh (GNU libtool) 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 
22:14:06)

This is a fairly up-to-date Debian box, and I haven't installed any
local versions of auto* tools.

> I tried to reproduce the failure like this:
>
>     cd /tmp
>     rm -rf x
>     /gnulib/gnulib-tool --dir x --with-tests --create-testdir gettime
>
> but it worked fine for me.
> I tried with automake-1.10 and each of autoconf-2.60, 2.61, and 2.61a.
> You may be using a bad version of sed.

dopio:/data/gnulib/build/gettime# sed --version|head -1
GNU sed version 4.1.5

However, I could not reproduce this on my main development box, so
there is probably some subtle problem.  My main box runs automake 1.10
though.

> Please verify the versions of sed, m4, and automake, too.
> If you built autoconf with a version of m4 older than 1.4.4,
> that can cause trouble, too, though I don't know if it could
> cause what you're seeing.

m4 -dopio:~# m4 --version|head -1
GNU M4 1.4.8
dopio:~#

> What does this output?
>
>     grep MKDIR_P config.status
>
> I get this:
>
>     MKDIR_P='/bin/mkdir -p'
>       ac_MKDIR_P=$MKDIR_P
>       case $MKDIR_P in
>       */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
>     s&@MKDIR_P@&$ac_MKDIR_P&;t t
>
> If you see the same (modulo the precise path for mkdir), then try
> tracing config.status to see why the sed substitution doesn't work:
>
>     bash -x config.status

Yup, I get the same.

> ...
>> http://autobuild.josefsson.org/gnulib/log-200701211146617069000.txt
>>
>> It seems like $(MKDIR_P) is empty.  The configure.ac does contain:
>>
>> AC_PROG_MKDIR_P
>>
>> However, it doesn't seem like it is getting substituted into the
>> Makefile:
>>
>> dopio:/data/gnulib/build/gettime# grep MKDIR gllib/*
>> gllib/Makefile: $(MKDIR_P) sys
>> gllib/Makefile.am:      $(MKDIR_P) sys
>> gllib/Makefile.in:      $(MKDIR_P) sys
>> dopio:/data/gnulib/build/gettime#
>
> Ahh... this is it.
> Something is wrong with your version of automake.
> I get this:
>
>     $ grep MKDIR_P Makefile.in
>     MKDIR_P = @MKDIR_P@
>               */*) $(MKDIR_P) `echo "$$dist_files" | \
>             $(MKDIR_P) sys
>
> Notice that I have the definition of MKDIR_P and you don't.

Ah, right.  I'll read the other e-mails before debugging things
further..

/Simon




reply via email to

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