Subject: bug#13210: closed (Re: bug#13210: [PATCH] maint: cygwin build broken)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 Dec 2012 10:23:02 +0000

Your bug report

#13210: [PATCH] maint: cygwin build broken

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13210: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13210
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13210: [PATCH] maint: cygwin build broken
From: Pádraig Brady <[email-masked]>
To: Stefano Lattarini <[email-masked]>
Cc: [email-masked], "Z. Majeed" <[email-masked]>
Date: Tue, 18 Dec 2012 10:20:37 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On 12/18/2012 08:58 AM, Stefano Lattarini wrote:
> On 12/18/2012 12:20 AM, Pádraig Brady wrote:
>> On 12/17/2012 11:50 AM, Z. Majeed wrote:
>>> Building latest git source in a non-src directory on cygwin win7 with gcc 4.5.3 is broken - a patch follows -
>>> doc/local.mk: doc subdir is not created in build dir - I made it a prereq of doc/constants.texi
>>
>> That seems a little hacky, for what seems like an automake bug.
>> Maybe this one is the culprit?
>> http://git.sv.gnu.org/gitweb/?p=automake.git;a=commit;h=v1.11-328-ge87c030
>>
> Nope, that change had been later reverted, before any stable release:
> <http://git.sv.gnu.org/gitweb/?p=automake.git;a=commit;h=v1.11-512-g40c3432>
>
>> I use automake-1.11.6 and the coreutils configured min version is 1.11.2.
>> Specifically I'm not impacted as I have this in Makefile:
>>
>> $(srcdir)/doc/version.texi:  $(srcdir)/doc/stamp-vti
>> $(srcdir)/doc/stamp-vti: doc/coreutils.texi $(top_srcdir)/configure
>>          test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
>>          ...
>>
> This rules is there also for makefiles generated by Automake 1.12.x.
>
> And the issue here is really not Automake's fault; the problem really likes in
> the coreutil's build system, since the declaration:
>
>     doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
>
> is hand-written in 'doc/local.mk', and is not provided by Automake.
>
> So what suggested by the OP is not a workaround, but a fix -- and it
> seems a correct fix to me (albeit a little abusing of Automake's
> internal).

I misread the above rule last night, and thought Zartaj's fix
to a broken coreutils.info build was to piggy back on the
working constants.texi build. In general it's best to send
error messages along with a patch like this so that reviewers
can follow the same train of thought.

Anyway an explicit `make doc/constants.texi` fails on my system too
(with a non-src build), and so can fail in a larger build
due to ordering of rules.

Since we're manually writing the doc/constants.texi rule anyway,
I prefer to just add in the MKDIR_P which is the technique we
use elsewhere in coreutils.

>
>> BTW, Steffano, how can I see what release the above commit
>> is included in?
>>
> No one :-)
>
>> Only minor versions seem to be tagged?
>>
> How so?  I see:
> <http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commit;h=v1.12>

I was looking for a tag at each release. 1.11.6 etc.
They weren't done for the 1.11 series but they are in place
since 1.12, for example:
http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commit;h=v1.12.5
There's probably little need to retag older releases,
so it's fine going forward.

>> I dislike dependency creep so am open to a workaround
>> as long as we know what's going on.
>>
> See above.

Thanks a lot for looking at this, and sorry for misreading
the rule last night, I shouldn't have bothered you at all,
with this now obvious issue.

It's good to know we could rely on am__dirstamp in future if needed.

Zartaj I'll apply the following in your name soon.

thanks!
Pádraig.

commit 860307bde02e12700e8a08daf3536801e86e8da8
Author: Zartaj Majeed <[email-masked]>
Date:   Tue Dec 18 09:50:50 2012 +0000

     build: fix cygwin build issues

     * doc/local.mk (doc/constants.texi): Ensure the doc directory
     is present which is needed when doing a non source dir build,
     when the doc/constants.texi target is built before other doc targets.
     * src/local.mk: Add $(EXEEXT) to the make-prime-list calls.

diff --git a/doc/local.mk b/doc/local.mk
index 585faf0..ad25528 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -36,6 +36,7 @@ AM_MAKEINFOFLAGS = --no-split

  doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
         $(AM_V_GEN)LC_ALL=C; export LC_ALL; \
+       $(MKDIR_P) doc && \
         { sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
             $(top_srcdir)/src/tail.c && \
           sed -n -e \
diff --git a/src/local.mk b/src/local.mk
index ead3b8b..66028c9 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -387,9 +387,9 @@ src/dircolors.h: src/dcgen src/dircolors.hin
  # known ints (currently 128-bit).
  BUILT_SOURCES += $(top_srcdir)/src/primes.h
  $(top_srcdir)/src/primes.h:
-       $(MAKE) src/make-prime-list
+       $(MAKE) src/make-prime-list$(EXEEXT)
         $(AM_V_GEN)rm -f $@ $@-t
-       $(AM_V_at)src/make-prime-list 5000 > $@-t
+       $(AM_V_at)src/make-prime-list$(EXEEXT) 5000 > $@-t
         $(AM_V_at)chmod a-w $@-t
         $(AM_V_at)mv $@-t $@

Subject: [PATCH] maint: cygwin build broken
From: "Z. Majeed" <[email-masked]>
To: [email-masked]
Date: Mon, 17 Dec 2012 03:50:22 -0800 (PST)
List-Id: <debbugs-submit.debbugs.gnu.org>

Building latest git source in a non-src directory on cygwin win7 with gcc 4.5.3 is broken - a patch follows - doc/local.mk: doc subdir is not created in build dir - I made it a prereq of doc/constants.texi - src/local.mk: make-prime-list missing $(EXEEXT) couple of places without which make-prime-list.exe does not build

I had to configure --disable-gcc-warnings to avoid the following errors because gcc 4.5.3 is the latest on cygwin and not covered by the ignore warnings pragma in extern-inline.m4 for gcc 4.6 and higher:
  CC       dtotimespec.o
In file included from dtotimespec.c:25:0:
timespec.h:58:1: error: no previous declaration for 'timespec_cmp' 
[-Werror=missing-declarations]
 timespec_cmp (struct timespec a, struct timespec b)

On win7 running ginstall for man/install.1 build required admin rights

Zartaj

diff --git a/doc/local.mk b/doc/local.mk
old mode 100644
new mode 100755
index 585faf0..63696fb
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -34,7 +34,7 @@ doc_coreutils_TEXINFOS = \
 # old systems.
 AM_MAKEINFOFLAGS = --no-split

-doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c doc/$(am__dirstamp)
        $(AM_V_GEN)LC_ALL=C; export LC_ALL; \
        { sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
            $(top_srcdir)/src/tail.c && \
diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f
+Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f-dirty
diff --git a/src/local.mk b/src/local.mk
old mode 100644
new mode 100755
index ead3b8b..66028c9
--- a/src/local.mk
+++ b/src/local.mk
@@ -387,9 +387,9 @@ src/dircolors.h: src/dcgen src/dircolors.hin
 # known ints (currently 128-bit).
 BUILT_SOURCES += $(top_srcdir)/src/primes.h
 $(top_srcdir)/src/primes.h:
-       $(MAKE) src/make-prime-list
+       $(MAKE) src/make-prime-list$(EXEEXT)
        $(AM_V_GEN)rm -f $@ $@-t
-       $(AM_V_at)src/make-prime-list 5000 > $@-t
+       $(AM_V_at)src/make-prime-list$(EXEEXT) 5000 > $@-t
        $(AM_V_at)chmod a-w $@-t
        $(AM_V_at)mv $@-t $@