unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* build failure 2 emacs-26 branch on Mingw64
@ 2018-01-01 13:19 Stephen Leake
  2018-01-01 13:41 ` Richard Copley
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 2018-01-01 13:19 UTC (permalink / raw)
  To: emacs-devel

Building emacs-26 branch on Mingw64, in a fresh checkout, make fails
with:

make[2]: Leaving directory 'C:/Projects/emacs/emacs-26/lisp'
make[1]: *** No rule to make target '../lisp/\n', needed by '../etc/DOC'.  Stop.
make[1]: Leaving directory 'C:/Projects/emacs/emacs-26/src'
make: *** [Makefile:415: src] Error 2

This is due to a bad sed command for building lisp.mk. The current
command is:

	${AM_V_GEN}( printf 'shortlisp = \\\n'; \
	sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
	  sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
	echo "" ) > $@

The escaped backslashes need to be doubled:

	${AM_V_GEN}( printf 'shortlisp = \\\\\n'; \
	sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
	  sed -e 's/$$/.elc \\\\/' -e 's/\.el\.elc/.el/'; \
	echo "" ) > $@


There are three executables involved that determine the backslash
quoting required: make, bash, and sed. I have:

$ make --version
GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.

$ bash --version
GNU bash, version 4.4.12(1)-release (x86_64-pc-msys)
Copyright (C) 2016 Free Software Foundation, Inc.

$ sed --version
sed (GNU sed) 4.4
Copyright (C) 2017 Free Software Foundation, Inc.

all installed by mingw64 pacman fairly recently; the executable files
are all dated Feb 2017.

--
-- Stephe



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 13:19 build failure 2 emacs-26 branch on Mingw64 Stephen Leake
@ 2018-01-01 13:41 ` Richard Copley
  2018-01-01 14:05   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Copley @ 2018-01-01 13:41 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

> $ make --version
> GNU Make 4.2.1
> Built for x86_64-w64-mingw32
> Copyright (C) 1988-2016 Free Software Foundation, Inc.

You have a native make on the path in your MSYS bash process.
"make" should be the MSYS make:

$ make --version
GNU Make 4.2.1
Built for x86_64-pc-msys
Copyright (C) 1988-2016 Free Software Foundation, Inc.



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 13:41 ` Richard Copley
@ 2018-01-01 14:05   ` Eli Zaretskii
  2018-01-01 17:41     ` Stephen Leake
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2018-01-01 14:05 UTC (permalink / raw)
  To: emacs-devel, Richard Copley, Stephen Leake; +Cc: emacs-devel

On January 1, 2018 3:41:17 PM GMT+02:00, Richard Copley <rcopley@gmail.com> wrote:
> > $ make --version
> > GNU Make 4.2.1
> > Built for x86_64-w64-mingw32
> > Copyright (C) 1988-2016 Free Software Foundation, Inc.
> 
> You have a native make on the path in your MSYS bash process.
> "make" should be the MSYS make:
> 
> $ make --version
> GNU Make 4.2.1
> Built for x86_64-pc-msys
> Copyright (C) 1988-2016 Free Software Foundation, Inc.

Right.  And I believe Sed is not an MSYS Sed, either, because that one
should be version 4.2.2, not 4.4.
Which could also explain the other problem Stephen reported.



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 14:05   ` Eli Zaretskii
@ 2018-01-01 17:41     ` Stephen Leake
  2018-01-01 17:52       ` Richard Copley
  2018-01-01 19:57       ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Leake @ 2018-01-01 17:41 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> On January 1, 2018 3:41:17 PM GMT+02:00, Richard Copley <rcopley@gmail.com> wrote:
>> > $ make --version
>> > GNU Make 4.2.1
>> > Built for x86_64-w64-mingw32
>> > Copyright (C) 1988-2016 Free Software Foundation, Inc.
>> 
>> You have a native make on the path in your MSYS bash process.
>> "make" should be the MSYS make:
>> 
>> $ make --version
>> GNU Make 4.2.1
>> Built for x86_64-pc-msys
>> Copyright (C) 1988-2016 Free Software Foundation, Inc.
>
> Right.  And I believe Sed is not an MSYS Sed, either, because that one
> should be version 4.2.2, not 4.4.
> Which could also explain the other problem Stephen reported.

Hmm. Then the instructions in nt/INSTALL.W64 are wrong; it says to run
autgen and configure from the mingw64.exe shell, which puts mingw64/bin
first in path.

sed is the msys sed; it says "x86_64-pc-msys", and it's /usr/bin/sed.

make is /mingw64/bin/make. Perhaps mingw64/bin/make is not installed by
the msys packages listed in INSTALL.W64, but by something I did later?


Reverting my change above, and running:

/usr/bin/make lisp.mk

does fix the problem.

That's pretty annoying; I don't see why backslash quoting should be
different between msys and mingw!

I'll try rebuilding using the msys shell and/or msys make from the mingw
shell, and propose a patch for INSTALL.W64

-- 
-- Stephe



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 17:41     ` Stephen Leake
@ 2018-01-01 17:52       ` Richard Copley
  2018-01-01 18:41         ` Stephen Leake
  2018-01-01 19:57       ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Copley @ 2018-01-01 17:52 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

On 1 January 2018 at 17:41, Stephen Leake
<stephen_leake@stephe-leake.org> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> On January 1, 2018 3:41:17 PM GMT+02:00, Richard Copley <rcopley@gmail.com> wrote:
>>> > $ make --version
>>> > GNU Make 4.2.1
>>> > Built for x86_64-w64-mingw32
>>> > Copyright (C) 1988-2016 Free Software Foundation, Inc.
>>>
>>> You have a native make on the path in your MSYS bash process.
>>> "make" should be the MSYS make:
>>>
>>> $ make --version
>>> GNU Make 4.2.1
>>> Built for x86_64-pc-msys
>>> Copyright (C) 1988-2016 Free Software Foundation, Inc.
>>
>> Right.  And I believe Sed is not an MSYS Sed, either, because that one
>> should be version 4.2.2, not 4.4.
>> Which could also explain the other problem Stephen reported.
>
> Hmm. Then the instructions in nt/INSTALL.W64 are wrong; it says to run
> autgen and configure from the mingw64.exe shell, which puts mingw64/bin
> first in path.

I think what's unusual about your setup is that you have the native
GNU Make installed under the name "make.exe" on your path. By default,
MSYS2 installs it as "mingw32-make.exe". Try this:

pacman -Ql mingw-w64-x86_64-make

> sed is the msys sed; it says "x86_64-pc-msys", and it's /usr/bin/sed.

I think that's correct. I have the same version. Eli doesn't use the
MSYS2 packages (right?).

> make is /mingw64/bin/make. Perhaps mingw64/bin/make is not installed by
> the msys packages listed in INSTALL.W64, but by something I did later?

I suspect so.

> Reverting my change above, and running:
>
> /usr/bin/make lisp.mk
>
> does fix the problem.
>
> That's pretty annoying; I don't see why backslash quoting should be
> different between msys and mingw!

The commands in the Makefile are written for a Bourne-like shell,
but the native Make is likely to use cmd.exe (or emulate it).

> I'll try rebuilding using the msys shell and/or msys make from the mingw
> shell, and propose a patch for INSTALL.W64



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 17:52       ` Richard Copley
@ 2018-01-01 18:41         ` Stephen Leake
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Leake @ 2018-01-01 18:41 UTC (permalink / raw)
  To: emacs-devel

Richard Copley <rcopley@gmail.com> writes:

> On 1 January 2018 at 17:41, Stephen Leake
> <stephen_leake@stephe-leake.org> wrote:
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> On January 1, 2018 3:41:17 PM GMT+02:00, Richard Copley <rcopley@gmail.com> wrote:
>>>> > $ make --version
>>>> > GNU Make 4.2.1
>>>> > Built for x86_64-w64-mingw32
>>>> > Copyright (C) 1988-2016 Free Software Foundation, Inc.
>>>>
>>>> You have a native make on the path in your MSYS bash process.
>>>> "make" should be the MSYS make:
>>>>
>>>> $ make --version
>>>> GNU Make 4.2.1
>>>> Built for x86_64-pc-msys
>>>> Copyright (C) 1988-2016 Free Software Foundation, Inc.
>>>
>>> Right.  And I believe Sed is not an MSYS Sed, either, because that one
>>> should be version 4.2.2, not 4.4.
>>> Which could also explain the other problem Stephen reported.
>>
>> Hmm. Then the instructions in nt/INSTALL.W64 are wrong; it says to run
>> autgen and configure from the mingw64.exe shell, which puts mingw64/bin
>> first in path.
>
> I think what's unusual about your setup is that you have the native
> GNU Make installed under the name "make.exe" on your path. By default,
> MSYS2 installs it as "mingw32-make.exe". 

Ah, you are correct. I did that on purpose, so I can just run 'make' and
C-c C-k in an Emacs *compilation* buffer can interrupt it. But I forgot
about it until now ...

>> I'll try rebuilding using the msys shell and/or msys make from the mingw
>> shell, and propose a patch for INSTALL.W64

export MAKE=/usr/bin/bash; configure

works for me.

But since I have a non-standard mingw setup, there's no need to change
INSTALL.W64; I'll just keep better notes on my own config.

Thanks.

-- 
-- Stephe



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

* Re: build failure 2 emacs-26 branch on Mingw64
  2018-01-01 17:41     ` Stephen Leake
  2018-01-01 17:52       ` Richard Copley
@ 2018-01-01 19:57       ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2018-01-01 19:57 UTC (permalink / raw)
  To: Stephen Leake; +Cc: emacs-devel

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Mon, 01 Jan 2018 11:41:30 -0600
> 
> I don't see why backslash quoting should be different between msys
> and mingw!

Because native Windows programs don't support command-line quoting
'like this', and so MinGW Make doesn't support that as well.



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

end of thread, other threads:[~2018-01-01 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-01 13:19 build failure 2 emacs-26 branch on Mingw64 Stephen Leake
2018-01-01 13:41 ` Richard Copley
2018-01-01 14:05   ` Eli Zaretskii
2018-01-01 17:41     ` Stephen Leake
2018-01-01 17:52       ` Richard Copley
2018-01-01 18:41         ` Stephen Leake
2018-01-01 19:57       ` Eli Zaretskii

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).