unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Trunk: Build error on FreeBSD
@ 2012-09-15  8:44 Herbert J. Skuhra
  2012-09-15  9:33 ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-15  8:44 UTC (permalink / raw)
  To: emacs-devel

Hi,

Emacs trunk does not bootstrap on FreeBSD:

% uname -rms
FreeBSD 9.1-PRERELEASE i386
% bzr clean-tree --ignored --detritus
% bzr revno
110036
% ./autogen.sh
% ./configure
% find . -name "epaths.h"
./src/epaths.h
% gmake bootstrap
[...]
gmake[2]: *** No rule to make target `epaths.h', needed by `xfns.o'.  Stop.
gmake[2]: Leaving directory `/home/herbert/source/emacs/trunk/src'
gmake[1]: *** [src] Error 2
gmake[1]: Leaving directory `/home/herbert/source/emacs/trunk'
gmake: *** [bootstrap] Error 2
% find . -name "epaths.h"
%

Unrelated, but I also get the following warnings on FreeBSD:

In file included from lisp.h:24,
                 from window.c:27: 
../lib/stdalign.h:51:1: warning: "_Alignof" redefined
In file included from /usr/include/string.h:36,
                 from ./conf_post.h:159,
                 from ./config.h:1663,
                 from window.c:21:
/usr/include/sys/cdefs.h:240:1: warning: this is the location of the previous definition

-- 
Herbert



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-15  8:44 Trunk: Build error on FreeBSD Herbert J. Skuhra
@ 2012-09-15  9:33 ` Paul Eggert
  2012-09-15 12:48   ` Wolfgang Jenkner
  2012-09-15 20:57   ` Herbert J. Skuhra
  0 siblings, 2 replies; 27+ messages in thread
From: Paul Eggert @ 2012-09-15  9:33 UTC (permalink / raw)
  To: Herbert J. Skuhra; +Cc: emacs-devel

On 09/15/2012 01:44 AM, Herbert J. Skuhra wrote:> Hi,

> % ./configure
> % find . -name "epaths.h"
> ./src/epaths.h
> % gmake bootstrap
> [...]
> gmake[2]: *** No rule to make target `epaths.h', needed by `xfns.o'.  Stop.
> gmake[2]: Leaving directory `/home/herbert/source/emacs/trunk/src'

On Fedora 17, 'gmake bootstrap' does delete src/epaths.h
as part of the 'bootstrap-clean' action, but it goes on
to recreate it as part of './config.status --recheck' or
'./configure'.  Can you investigate why the latter doesn't
occur for you?  Perhaps append '&& find . -name epaths.h'
to the MAKE_CONFIG_STATUS macro definition.

> In file included from lisp.h:24,
>                  from window.c:27: 
> ../lib/stdalign.h:51:1: warning: "_Alignof" redefined
> In file included from /usr/include/string.h:36,
>                  from ./conf_post.h:159,
>                  from ./config.h:1663,
>                  from window.c:21:
> /usr/include/sys/cdefs.h:240:1: warning: this is the location of the previous definition

That's an unwanted clash between <string.h> and Emac's stdalign.h
substitute.  Should be harmless.  I'll look into fixing that by
prepending "#undef _Alignof" to the stdalign.h substitute.




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-15  9:33 ` Paul Eggert
@ 2012-09-15 12:48   ` Wolfgang Jenkner
  2012-09-17 13:04     ` Wolfgang Jenkner
  2012-09-15 20:57   ` Herbert J. Skuhra
  1 sibling, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-15 12:48 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, emacs-devel

On Sat, Sep 15 2012, Paul Eggert wrote:

> On Fedora 17, 'gmake bootstrap' does delete src/epaths.h
> as part of the 'bootstrap-clean' action, but it goes on
> to recreate it as part of './config.status --recheck'

For autoconf 2.69 (info "(autoconf)config.status Invocation") states

`--recheck'
     Ask `config.status' to update itself and exit (no instantiation).

and (info "(autoconf)Configuration Actions") says that
AC_CONFIG_COMMANDS is an "instantiating macro".

> or './configure'.

No question about that.

Wolfgang




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-15  9:33 ` Paul Eggert
  2012-09-15 12:48   ` Wolfgang Jenkner
@ 2012-09-15 20:57   ` Herbert J. Skuhra
  2012-09-16  3:42     ` Paul Eggert
  1 sibling, 1 reply; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-15 20:57 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

On Sat, 15 Sep 2012 02:33:19 -0700
Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 09/15/2012 01:44 AM, Herbert J. Skuhra wrote:> Hi,
> 
> > % ./configure
> > % find . -name "epaths.h"
> > ./src/epaths.h
> > % gmake bootstrap
> > [...]
> > gmake[2]: *** No rule to make target `epaths.h', needed by `xfns.o'.  Stop.
> > gmake[2]: Leaving directory `/home/herbert/source/emacs/trunk/src'
> 
> On Fedora 17, 'gmake bootstrap' does delete src/epaths.h
> as part of the 'bootstrap-clean' action, but it goes on
> to recreate it as part of './config.status --recheck' or
> './configure'.  Can you investigate why the latter doesn't
> occur for you?  Perhaps append '&& find . -name epaths.h'
> to the MAKE_CONFIG_STATUS macro definition.

The command

${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force

fails if run from config.status:

creating src/epaths.h
make: don't know how to make wd. Stop

If I replace ${MAKE-make} with gmake in configure 'gmake bootstrap'
works.

-- 
Herbert



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-15 20:57   ` Herbert J. Skuhra
@ 2012-09-16  3:42     ` Paul Eggert
  2012-09-16 14:39       ` Herbert J. Skuhra
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-16  3:42 UTC (permalink / raw)
  To: Herbert J. Skuhra; +Cc: emacs-devel

On 09/15/2012 01:57 PM, Herbert J. Skuhra wrote:
> ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
> 
> fails if run from config.status:
> 
> creating src/epaths.h
> make: don't know how to make wd. Stop

That "wd" looks like there's something unusual about the
environment.  Perhaps "MAKE" is set to something that contains
a space followed by "wd"?  What happens if you do the following
trivial change to "configure", to try to debug it?  If the
$MAKE environment variable contains a space in it, there's
a simple fix, but I'd like to know that we've actually isolated
the problem.

--- configure~	2012-09-15 00:11:14.369490534 -0700
+++ configure	2012-09-15 20:39:35.710598150 -0700
@@ -26045,6 +26045,7 @@
  ;;
     "epaths":C)
 echo creating src/epaths.h
+echo "${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force"
 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
  ;;
     "gdbinit":C)




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-16  3:42     ` Paul Eggert
@ 2012-09-16 14:39       ` Herbert J. Skuhra
  2012-09-16 16:40         ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-16 14:39 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

On Sat, 15 Sep 2012 20:42:21 -0700
Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 09/15/2012 01:57 PM, Herbert J. Skuhra wrote:
> > ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
> > 
> > fails if run from config.status:
> > 
> > creating src/epaths.h
> > make: don't know how to make wd. Stop
> 
> That "wd" looks like there's something unusual about the
> environment.  Perhaps "MAKE" is set to something that contains
> a space followed by "wd"?  What happens if you do the following
> trivial change to "configure", to try to debug it?  If the
> $MAKE environment variable contains a space in it, there's
> a simple fix, but I'd like to know that we've actually isolated
> the problem.

Running './configure':

creating src/epaths.h
make MAKEFILE_NAME=do-not-make-Makefile epaths-force
config.status: executing gdbinit commands

Running 'gmake bootstrap':

creating src/epaths.h
make MAKEFILE_NAME=do-not-make-Makefile epaths-force
make: don't know how to make w. Stop
config.status: executing gdbinit commands

Running 'gmake -d bootstrap':

creating src/epaths.h
make MAKEFILE_NAME=do-not-make-Makefile epaths-force
make: don't know how to make wd. Stop
config.status: executing gdbinit commands

I've change the line

${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force

to

${MAKE-make} -d A MAKEFILE_NAME=do-not-make-Makefile epaths-force

and diffed the debug.log:

--- emacs_configure.log 2012-09-16 16:05:53.000000000 +0200
+++ emacs_gmake_bootstrap.log   2012-09-16 16:04:33.000000000 +0200
@@ -10,7 +10,8 @@
 Global:.ST_EXPORTVAR = YES
 Global:.CURDIR = /home/herbert/source/emacs/trunk
 Global:.OBJDIR = /home/herbert/source/emacs/trunk
-Global:.TARGETS = epaths-force
+Global:.TARGETS = w
+Global:.TARGETS = w epaths-force
 Caching /usr/share/mk...done
 expanding "sys.mk".../usr/share/mk/sys.mk 
 Global:MAKEFILE = /usr/share/mk/sys.mk
@@ -2071,13 +2072,13 @@
 unix             = We run FreeBSD, not UNIX.
 .MAKEFILE_LIST   = /usr/share/mk/sys.mk /etc/make.conf .. /usr/share/mk/bsd.compat.mk .. /usr/share/mk/bsd.cpu.mk .. .. Makefile ..
 MAKEFILE         = Makefile
-.TARGETS         = epaths-force
+.TARGETS         = w epaths-force
[...]

Surprisingly FreeBSD's make can suddenly build/bootstrap Emacs trunk
again. When running 'make bootstrap' TARGETS is also correct.

-- 
Herbert



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-16 14:39       ` Herbert J. Skuhra
@ 2012-09-16 16:40         ` Paul Eggert
  2012-09-17 11:44           ` Herbert J. Skuhra
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-16 16:40 UTC (permalink / raw)
  To: Herbert J. Skuhra; +Cc: emacs-devel

I'm afraid the latest symptoms are even more mysterious.
The change from 'wd' to 'w', and the fact that the problem
does not occur with FreeBSD make, suggest a bug in GNU 'make',
unfortunately.  Another possibility is that something in
your environment (the MAKEFILES environment variable, say)
is messing up GNU make.  The 'env' command should tell you
that.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-16 16:40         ` Paul Eggert
@ 2012-09-17 11:44           ` Herbert J. Skuhra
  0 siblings, 0 replies; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-17 11:44 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

On 16.09.2012 18:40, Paul Eggert wrote:
> I'm afraid the latest symptoms are even more mysterious.
> The change from 'wd' to 'w', and the fact that the problem
> does not occur with FreeBSD make, suggest a bug in GNU 'make',
> unfortunately.  Another possibility is that something in
> your environment (the MAKEFILES environment variable, say)
> is messing up GNU make.  The 'env' command should tell you
> that.

When running:

"gmake bootstrap" env shows MAKEFLAGS=w
"gmake -d bootstrap" env shows MAKEFLAGS=wd

This also happens on NetBSD 6.0RC1 and Fedora 17.

But re-creating epaths.h only fails on FreeBSD and NetBSD (${MAKE-make} 
!= GNU make).

-- 
Herbert




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-15 12:48   ` Wolfgang Jenkner
@ 2012-09-17 13:04     ` Wolfgang Jenkner
  2012-09-17 21:52       ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-17 13:04 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, emacs-devel

On Sat, Sep 15 2012, Wolfgang Jenkner wrote:

> On Sat, Sep 15 2012, Paul Eggert wrote:
>
>> On Fedora 17, 'gmake bootstrap' does delete src/epaths.h
>> as part of the 'bootstrap-clean' action, but it goes on
>> to recreate it as part of './config.status --recheck'
>
> For autoconf 2.69 (info "(autoconf)config.status Invocation") states
>
> `--recheck'
>      Ask `config.status' to update itself and exit (no instantiation).
>
> and (info "(autoconf)Configuration Actions") says that
> AC_CONFIG_COMMANDS is an "instantiating macro".

A patch is at the end, after this rather amusing story:

So, src/epaths.h is created by something else.

Let's begin with the beginning: bootstrap does the following

bootstrap: bootstrap-clean FRC
	cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; }
	$(MAKE_CONFIG_STATUS)
	$(MAKE) $(MFLAGS) info all

When autogen.sh finishes, src/epaths.h has been nuked but config.status
is still there and executable.

The definition of MAKE_CONFIG_STATUS shows that the next step is

./config.status --recheck;

which doesn't recreate src/epaths.h, see above (the --recheck flag was
added in rev. 109962).

At this point, however, the last step has created a new config.status,
which is now newer than Makefile.  Makefile contains a rule to update
itself, which has indeed config.status as prerequisite:

MAKEFILE_NAME = Makefile
$(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \
          $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN)
	./config.status

Now for GNU make, this is exactly, what happens next, i.e.,
config.status runs and finally recreates src/epaths.h.

I think this rule is triggered before anything else because of
(info "(make)Remaking Makefiles"):

	To this end, after reading in all makefiles, `make' will
	consider each as a goal target and attempt to update it.

For other versions of make the rule is triggered for the lib target.

Wolfgang

Ah, the patch:

=== modified file 'Makefile.in'
--- Makefile.in	2012-09-16 18:49:00 +0000
+++ Makefile.in	2012-09-17 12:51:18 +0000
@@ -358,7 +358,7 @@
 MAKEFILE_NAME = Makefile
 $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \
           $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN)
-	./config.status
+	MAKE='${MAKE}' ./config.status
 
 # Don't erase these files if make is interrupted while refreshing them.
 .PRECIOUS: Makefile config.status




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 13:04     ` Wolfgang Jenkner
@ 2012-09-17 21:52       ` Paul Eggert
  2012-09-17 22:12         ` Andreas Schwab
                           ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Paul Eggert @ 2012-09-17 21:52 UTC (permalink / raw)
  To: Wolfgang Jenkner; +Cc: Herbert J. Skuhra, emacs-devel

Thanks for the patch.  I installed that as trunk
bzr 110080.

Your amusing story also makes it pretty clear that
'make bootstrap' should run ./configure directly
rather than indirectly via ./config.status, so I
changed 'make bootstrap' to do that too.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 21:52       ` Paul Eggert
@ 2012-09-17 22:12         ` Andreas Schwab
  2012-09-17 22:37           ` Paul Eggert
  2012-09-17 22:42         ` Herbert J. Skuhra
  2012-09-18  2:51         ` Stefan Monnier
  2 siblings, 1 reply; 27+ messages in thread
From: Andreas Schwab @ 2012-09-17 22:12 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Wolfgang Jenkner, Herbert J. Skuhra, emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> Your amusing story also makes it pretty clear that
> 'make bootstrap' should run ./configure directly

./configure does not exist.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 22:12         ` Andreas Schwab
@ 2012-09-17 22:37           ` Paul Eggert
  2012-09-17 22:42             ` Andreas Schwab
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-17 22:37 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Wolfgang Jenkner, Herbert J. Skuhra, emacs-devel

On 09/17/2012 03:12 PM, Andreas Schwab wrote:
>> > Your amusing story also makes it pretty clear that
>> > 'make bootstrap' should run ./configure directly
> ./configure does not exist.

Thanks for mentioning that, I assume this was because
up-to-date autotools weren't available.  I installed
a further patch as trunk bzr 110081.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 21:52       ` Paul Eggert
  2012-09-17 22:12         ` Andreas Schwab
@ 2012-09-17 22:42         ` Herbert J. Skuhra
  2012-09-17 23:23           ` Herbert J. Skuhra
  2012-09-18  2:51         ` Stefan Monnier
  2 siblings, 1 reply; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-17 22:42 UTC (permalink / raw)
  To: emacs-devel

Thanks for the fix.

One more thing:

% ./configure --without-gconf --without-dbus --without-gsettings
[...]
  Does Emacs use -ldbus?                                  no
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               no
[...]
% gmake bootstrap
[...]
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 yes
  Does Emacs use GSettings?                               yes
[...]
% ldd src/emacs |egrep "(gconf|dbus)"
	libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x2917c000)
	libgconf-2.so.4 => /usr/local/lib/libgconf-2.so.4 (0x2933f000)

Is this expected? Or should bootstrap use EMACS_CONFIG_OPTIONS?

-- 
Herbert



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 22:37           ` Paul Eggert
@ 2012-09-17 22:42             ` Andreas Schwab
  2012-09-17 23:11               ` Paul Eggert
  2012-09-18 14:04               ` Wolfgang Jenkner
  0 siblings, 2 replies; 27+ messages in thread
From: Andreas Schwab @ 2012-09-17 22:42 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Wolfgang Jenkner, Herbert J. Skuhra, emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> Thanks for mentioning that, I assume this was because
> up-to-date autotools weren't available.  I installed
> a further patch as trunk bzr 110081.

It still does not exist.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 22:42             ` Andreas Schwab
@ 2012-09-17 23:11               ` Paul Eggert
  2012-09-18 14:04               ` Wolfgang Jenkner
  1 sibling, 0 replies; 27+ messages in thread
From: Paul Eggert @ 2012-09-17 23:11 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Wolfgang Jenkner, Herbert J. Skuhra, emacs-devel

On 09/17/2012 03:42 PM, Andreas Schwab wrote:
> It still does not exist.

Sorry, apparently I guessed wrong.  I'll need
more info to diagnose the problem, then.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 22:42         ` Herbert J. Skuhra
@ 2012-09-17 23:23           ` Herbert J. Skuhra
  0 siblings, 0 replies; 27+ messages in thread
From: Herbert J. Skuhra @ 2012-09-17 23:23 UTC (permalink / raw)
  To: emacs-devel

Sorry, please ignore my previous message.
It's working in r110082. Thanks.

On Tue, 18 Sep 2012 00:42:24 +0200
"Herbert J. Skuhra" <hskuhra@eumx.net> wrote:

> Thanks for the fix.
> 
> One more thing:
> 
> % ./configure --without-gconf --without-dbus --without-gsettings
> [...]
>   Does Emacs use -ldbus?                                  no
>   Does Emacs use -lgconf?                                 no
>   Does Emacs use GSettings?                               no
> [...]
> % gmake bootstrap
> [...]
>   Does Emacs use -ldbus?                                  yes
>   Does Emacs use -lgconf?                                 yes
>   Does Emacs use GSettings?                               yes
> [...]
> % ldd src/emacs |egrep "(gconf|dbus)"
> 	libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x2917c000)
> 	libgconf-2.so.4 => /usr/local/lib/libgconf-2.so.4 (0x2933f000)
> 
> Is this expected? Or should bootstrap use EMACS_CONFIG_OPTIONS?
> 
> -- 
> Herbert



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 21:52       ` Paul Eggert
  2012-09-17 22:12         ` Andreas Schwab
  2012-09-17 22:42         ` Herbert J. Skuhra
@ 2012-09-18  2:51         ` Stefan Monnier
  2 siblings, 0 replies; 27+ messages in thread
From: Stefan Monnier @ 2012-09-18  2:51 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Wolfgang Jenkner, Herbert J. Skuhra, emacs-devel

> Your amusing story also makes it pretty clear that
> 'make bootstrap' should run ./configure directly
> rather than indirectly via ./config.status, so I

Only if it correctly preserves the previously set configure options,
like config.status does.


        Stefan



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-17 22:42             ` Andreas Schwab
  2012-09-17 23:11               ` Paul Eggert
@ 2012-09-18 14:04               ` Wolfgang Jenkner
  2012-09-22  7:40                 ` Paul Eggert
  1 sibling, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-18 14:04 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Paul Eggert, Herbert J. Skuhra, emacs-devel

On Tue, Sep 18 2012, Andreas Schwab wrote:

> It still does not exist.

Rev. 110082 reintroduces the original bug, which was at the beginning of
this story, viz.

$ ./autogen.sh && ./configure MAKE=gmake && gmake bootstrap

runs this line in config.status

${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force

with make instead of gmake.  This prevented src/epaths.h from being
generated because gmake was passing down indigestible MAKEFLAGS to an
unsuspecting make.

This time, this doesn't happen (with the default settings), but I'd like
to propose the following patch anyway.

Wolfgang

2012-09-18  Wolfgang Jenkner  <wjenkner@inode.at>

	* Makefile.in (bootstrap): Simplify last change.

=== modified file 'Makefile.in'
--- Makefile.in	2012-09-17 22:43:12 +0000
+++ Makefile.in	2012-09-18 12:57:30 +0000
@@ -894,13 +894,8 @@
 #  * Build Makefile, to build the build procedure itself.
 #  * Do the actual build.
 bootstrap: bootstrap-clean FRC
-	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
-	if [ -x config.status ]; then \
-	    ./config.status --recheck && \
-	    ./config.status; \
-	else \
-	    $(srcdir)/configure $(CONFIGURE_FLAGS); \
-	fi
+	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } && touch configure
+	$(MAKE) $(MFLAGS) Makefile
 	$(MAKE) $(MFLAGS) info all
 
 .PHONY: check-declare




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-18 14:04               ` Wolfgang Jenkner
@ 2012-09-22  7:40                 ` Paul Eggert
  2012-09-22 10:25                   ` Wolfgang Jenkner
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-22  7:40 UTC (permalink / raw)
  To: Andreas Schwab, Herbert J. Skuhra, emacs-devel

On 09/18/2012 07:04 AM, Wolfgang Jenkner wrote:
>  bootstrap: bootstrap-clean FRC
> -	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
> -	if [ -x config.status ]; then \
> -	    ./config.status --recheck && \
> -	    ./config.status; \
> -	else \
> -	    $(srcdir)/configure $(CONFIGURE_FLAGS); \
> -	fi
> +	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } && touch configure
> +	$(MAKE) $(MFLAGS) Makefile
>  	$(MAKE) $(MFLAGS) info all

Sorry, I don't understand why that change would help, or would work.

"bootstrap-clean" removes Makefile, so the command "$(MAKE) $(MFLAGS) Makefile"
would be run without Makefile being present.  This won't work
unless GNU Make is being used.

Also, I don't see why the "touch configure" is needed.
autogen.sh (or autogen/copy_autogen) should create 'configure'.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22  7:40                 ` Paul Eggert
@ 2012-09-22 10:25                   ` Wolfgang Jenkner
  2012-09-22 11:04                     ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-22 10:25 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, Andreas Schwab, emacs-devel

On Sat, Sep 22 2012, Paul Eggert wrote:

> On 09/18/2012 07:04 AM, Wolfgang Jenkner wrote:
>>  bootstrap: bootstrap-clean FRC
>> -	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
>> -	if [ -x config.status ]; then \
>> -	    ./config.status --recheck && \
>> -	    ./config.status; \
>> -	else \
>> -	    $(srcdir)/configure $(CONFIGURE_FLAGS); \
>> -	fi
>> +	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } && touch configure
>> +	$(MAKE) $(MFLAGS) Makefile
>>  	$(MAKE) $(MFLAGS) info all
>
> Sorry, I don't understand why that change would help, or would work.
>
> "bootstrap-clean" removes Makefile,
It doesn't.

> so the command "$(MAKE) $(MFLAGS) Makefile"
> would be run without Makefile being present.  This won't work
> unless GNU Make is being used.
>
> Also, I don't see why the "touch configure" is needed.

Probably, because no configure was generated (as Andreas remarked).
> autogen.sh (or autogen/copy_autogen) should create 'configure'.

I actually test my changes.

Wolfgang



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22 10:25                   ` Wolfgang Jenkner
@ 2012-09-22 11:04                     ` Paul Eggert
  2012-09-22 11:17                       ` Wolfgang Jenkner
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-22 11:04 UTC (permalink / raw)
  To: Andreas Schwab, Herbert J. Skuhra, emacs-devel

>> "bootstrap-clean" removes Makefile,
> It doesn't.

Right you are.  Sorry about that.

>> I don't see why the "touch configure" is needed.
> 
> Probably, because no configure was generated (as Andreas remarked).

Andreas was fairly cryptic, but what I *think* he was saying
was the Makefile should use $(srcdir)/configure, not ./configure,
since ./configure does not exist when we're doing an out-of-tree build.
If I understood him correctly, there should be no need to touch
$(srcdir)/configure.  If I'm wrong I hope somebody corrects me.

Thanks again for following up.  I installed the following
as trunk bzr 110134.

=== modified file 'ChangeLog'
--- ChangeLog	2012-09-22 09:46:20 +0000
+++ ChangeLog	2012-09-22 10:59:13 +0000
@@ -1,5 +1,9 @@
 2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+	* Makefile.in (bootstrap): Simplify build procedure.
+	Suggested by Wolfgang Jenker in
+	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00456.html>.
+
 	Merge from gnulib, incorporating:
 	2012-09-22 sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases
 

=== modified file 'Makefile.in'
--- Makefile.in	2012-09-17 22:43:12 +0000
+++ Makefile.in	2012-09-22 10:59:13 +0000
@@ -889,18 +889,13 @@
 .PHONY: bootstrap
 
 # Bootstrapping does the following:
-#  * Remove files to start from a clean slate.
+#  * Remove files to start from a bootstrap-clean slate.
 #  * Run autogen.sh, falling back on copy_autogen if autogen.sh fails.
-#  * Build Makefile, to build the build procedure itself.
+#  * Rebuild Makefile, to update the build procedure itself.
 #  * Do the actual build.
 bootstrap: bootstrap-clean FRC
 	cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
-	if [ -x config.status ]; then \
-	    ./config.status --recheck && \
-	    ./config.status; \
-	else \
-	    $(srcdir)/configure $(CONFIGURE_FLAGS); \
-	fi
+	$(MAKE) $(MFLAGS) Makefile
 	$(MAKE) $(MFLAGS) info all
 
 .PHONY: check-declare





^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22 11:04                     ` Paul Eggert
@ 2012-09-22 11:17                       ` Wolfgang Jenkner
  2012-09-22 14:32                         ` Wolfgang Jenkner
  0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-22 11:17 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, Andreas Schwab, emacs-devel

On Sat, Sep 22 2012, Paul Eggert wrote:

> Andreas was fairly cryptic, but what I *think* he was saying
> was the Makefile should use $(srcdir)/configure, not ./configure,
> since ./configure does not exist when we're doing an out-of-tree build.
> If I understood him correctly, there should be no need to touch
> $(srcdir)/configure.  If I'm wrong I hope somebody corrects me.

Well, I have to touch configure, though I haven't investigated why.  The
idea is that config.status being a prerequisite of Makefile, the latter
will be rebuilt if config.status is outdated with respect to configure.

Wolfgang



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22 11:17                       ` Wolfgang Jenkner
@ 2012-09-22 14:32                         ` Wolfgang Jenkner
  2012-09-22 19:00                           ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-22 14:32 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, Andreas Schwab, emacs-devel

On Sat, Sep 22 2012, Wolfgang Jenkner wrote:

> On Sat, Sep 22 2012, Paul Eggert wrote:
>
>> If I understood him correctly, there should be no need to touch
>> $(srcdir)/configure.  If I'm wrong I hope somebody corrects me.
>
> Well, I have to touch configure, though I haven't investigated why.  The
> idea is that config.status being a prerequisite of Makefile, the latter
> will be rebuilt if config.status is outdated with respect to configure.

[137 ~/src/emacs-bzr]$ bzr branch trunk conftest && cd conftest && ./autogen.sh && ./configure MAKE=gmake && gmake bootstrap-clean && ./autogen.sh
*** output flushed ***
[138 ~/src/emacs-bzr/conftest]$ ls -l conf*
-rw-r--r--  1 wolfgang  staff   12833 Sep 22 15:59 config.bat
-rw-r--r--  1 wolfgang  staff  772677 Sep 22 16:01 config.log~
-rwxr-xr-x  1 wolfgang  staff   66639 Sep 22 16:01 config.status*
-rwxr-xr-x  1 wolfgang  staff  690223 Sep 22 15:59 configure*
-rw-r--r--  1 wolfgang  staff  157343 Sep 22 15:59 configure.ac

The second invocation of autogen.sh is part of the make bootstrap, and
I get the timestamps above.  It seems that autoreconf hasn't seen a need
to update configure, which ends up being older than config.status.  The
same thing happens with the native FreeBSD make here, by the way.

Wolfgang



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22 14:32                         ` Wolfgang Jenkner
@ 2012-09-22 19:00                           ` Paul Eggert
  2012-09-23 11:42                             ` Wolfgang Jenkner
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-22 19:00 UTC (permalink / raw)
  To: Andreas Schwab, Herbert J. Skuhra, emacs-devel

On 09/22/2012 07:32 AM, Wolfgang Jenkner wrote:
> It seems that autoreconf hasn't seen a need
> to update configure, which ends up being older than config.status.

OK, thanks, but in that case, since 'configure' hasn't changed,
why is there a need to touch it?  I am guessing that the
touch is to force 'make' to rebuild 'config.status'.  But
why bother?  If 'configure' hasn't changed, 'config.status'
should not need to be rebuilt.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-22 19:00                           ` Paul Eggert
@ 2012-09-23 11:42                             ` Wolfgang Jenkner
  2012-09-23 16:02                               ` Paul Eggert
  0 siblings, 1 reply; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-23 11:42 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, Andreas Schwab, emacs-devel

On Sat, Sep 22 2012, Paul Eggert wrote:

> On 09/22/2012 07:32 AM, Wolfgang Jenkner wrote:
>> It seems that autoreconf hasn't seen a need
>> to update configure, which ends up being older than config.status.
>
> OK, thanks, but in that case, since 'configure' hasn't changed,
> why is there a need to touch it?  I am guessing that the
> touch is to force 'make' to rebuild 'config.status'.  But
> why bother?  If 'configure' hasn't changed, 'config.status'
> should not need to be rebuilt.

You introduced this additional rebuilding two weeks ago, in rev. 109962:

+MAKE_CONFIG_STATUS = \
 	if [ -x ./config.status ]; then	\
 	    ./config.status --recheck;	\
 	else				\
 	    ./configure $(CONFIGURE_FLAGS); \
 	fi
[...]
 bootstrap: bootstrap-clean FRC
-	if [ -x ./config.status ]; then           \
-	    ./config.status;                      \
-	else                                      \
-	    ./configure $(CONFIGURE_FLAGS);       \
-	fi
+	cd $(srcdir) && { ./autogen.sh || test $$? -eq 101; }
+	$(MAKE_CONFIG_STATUS)
 	$(MAKE) $(MFLAGS) info all
 

Wolfgang



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-23 11:42                             ` Wolfgang Jenkner
@ 2012-09-23 16:02                               ` Paul Eggert
  2012-09-23 20:09                                 ` Wolfgang Jenkner
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Eggert @ 2012-09-23 16:02 UTC (permalink / raw)
  To: Andreas Schwab, Herbert J. Skuhra, emacs-devel

On 09/23/2012 04:42 AM, Wolfgang Jenkner wrote:
>> > OK, thanks, but in that case, since 'configure' hasn't changed,
>> > why is there a need to touch it?  I am guessing that the
>> > touch is to force 'make' to rebuild 'config.status'.  But
>> > why bother?  If 'configure' hasn't changed, 'config.status'
>> > should not need to be rebuilt.
> You introduced this additional rebuilding two weeks ago, in rev. 109962:

I'm afraid that isn't enough for me to understand why
the touch would be needed, but I did see a related problem
and fixed it in trunk bzr 110154, and perhaps that also
addresses the 'touch' issue, whatever it is.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Trunk: Build error on FreeBSD
  2012-09-23 16:02                               ` Paul Eggert
@ 2012-09-23 20:09                                 ` Wolfgang Jenkner
  0 siblings, 0 replies; 27+ messages in thread
From: Wolfgang Jenkner @ 2012-09-23 20:09 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Herbert J. Skuhra, Andreas Schwab, emacs-devel

On Sun, Sep 23 2012, Paul Eggert wrote:

> On 09/23/2012 04:42 AM, Wolfgang Jenkner wrote:
>>> > OK, thanks, but in that case, since 'configure' hasn't changed,
>>> > why is there a need to touch it?  I am guessing that the
>>> > touch is to force 'make' to rebuild 'config.status'.  But
>>> > why bother?  If 'configure' hasn't changed, 'config.status'
>>> > should not need to be rebuilt.
>> You introduced this additional rebuilding two weeks ago, in rev. 109962:
>
> I'm afraid that isn't enough for me to understand why
> the touch would be needed, but I did see a related problem
> and fixed it in trunk bzr 110154, and perhaps that also
> addresses the 'touch' issue, whatever it is.

Two weeks ago, /you/ introduced the `config.status --recheck', which
runs configure and rebuilds config.status, unconditionally, without
regard to configure having changed or not.  /I/ thought you had good
reasons for that and so I made sure that my changes preserved this
behaviour (by touching configure).  Now, you changed your mind about
unconditionally rebuilding config.status.  Fine.

Wolfgang




^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2012-09-23 20:09 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-15  8:44 Trunk: Build error on FreeBSD Herbert J. Skuhra
2012-09-15  9:33 ` Paul Eggert
2012-09-15 12:48   ` Wolfgang Jenkner
2012-09-17 13:04     ` Wolfgang Jenkner
2012-09-17 21:52       ` Paul Eggert
2012-09-17 22:12         ` Andreas Schwab
2012-09-17 22:37           ` Paul Eggert
2012-09-17 22:42             ` Andreas Schwab
2012-09-17 23:11               ` Paul Eggert
2012-09-18 14:04               ` Wolfgang Jenkner
2012-09-22  7:40                 ` Paul Eggert
2012-09-22 10:25                   ` Wolfgang Jenkner
2012-09-22 11:04                     ` Paul Eggert
2012-09-22 11:17                       ` Wolfgang Jenkner
2012-09-22 14:32                         ` Wolfgang Jenkner
2012-09-22 19:00                           ` Paul Eggert
2012-09-23 11:42                             ` Wolfgang Jenkner
2012-09-23 16:02                               ` Paul Eggert
2012-09-23 20:09                                 ` Wolfgang Jenkner
2012-09-17 22:42         ` Herbert J. Skuhra
2012-09-17 23:23           ` Herbert J. Skuhra
2012-09-18  2:51         ` Stefan Monnier
2012-09-15 20:57   ` Herbert J. Skuhra
2012-09-16  3:42     ` Paul Eggert
2012-09-16 14:39       ` Herbert J. Skuhra
2012-09-16 16:40         ` Paul Eggert
2012-09-17 11:44           ` Herbert J. Skuhra

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).