all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Master fails to build on Windows
@ 2019-11-01  9:56 Angelo Graziosi
  2019-11-01 10:31 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01  9:56 UTC (permalink / raw)
  To: emacs-devel

Just tried to build master-3a1e7624ed23 (Fix insert-file-contents file error regression, 2019-10-31 23:32:05 -0700) on Windows (MSYS2/MinGW64) and it fails:

[...]
make -C doc/lispintro info
make[2]: ingresso nella directory "/tmp/emacs-master/doc/lispintro"
  GEN      ../../info/eintr.info
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text+0x381): undefined reference to `__strcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text+0x4e1): undefined reference to `__strncpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text+0x679): undefined reference to `__strncpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text.startup+0x105): undefined reference to `__strcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text.startup+0x42c): undefined reference to `__memcpy_chk'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:249: cmdproxy.exe] Error 1
make[1]: *** Attesa per i processi non terminati....
make -C doc/emacs info
[...]
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccj99NAQ.o:addpm.c:(.text.startup+0x2c5): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccj99NAQ.o:addpm.c:(.text.startup+0x2ea): undefined reference to `__strcat_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccj99NAQ.o:addpm.c:(.text.startup+0x4fa): undefined reference to `__chk_fail'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccj99NAQ.o:addpm.c:(.text.startup+0x51c): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccj99NAQ.o:addpm.c:(.text.startup+0x555): undefined reference to `__strcat_chk'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:243: addpm.exe] Error 1
make[1]: uscita dalla directory "/tmp/emacs-master/nt"
make: *** [Makefile:411: nt] Error 2
make: *** Attesa per i processi non terminati....
[...]
Error: Failure running MAKE

The same source (now it is http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-3a1e7624ed23.tar.gz) build on GNU/Linux Mint 64b (cairo build) and it is building on macOS...



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

* Re: Master fails to build on Windows
  2019-11-01  9:56 Master fails to build on Windows Angelo Graziosi
@ 2019-11-01 10:31 ` Eli Zaretskii
  2019-11-01 10:41   ` Angelo Graziosi
  2019-11-01 11:27   ` Angelo Graziosi
  0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-11-01 10:31 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Fri, 1 Nov 2019 10:56:20 +0100 (CET)
> From: Angelo Graziosi <angelo.g0@libero.it>
> 
> Just tried to build master-3a1e7624ed23 (Fix insert-file-contents file error regression, 2019-10-31 23:32:05 -0700) on Windows (MSYS2/MinGW64) and it fails:
> 
> [...]
> make -C doc/lispintro info
> make[2]: ingresso nella directory "/tmp/emacs-master/doc/lispintro"
>   GEN      ../../info/eintr.info
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccB6yHeU.o:cmdproxy.c:(.text+0x381): undefined reference to `__strcpy_chk'

Are you configuring with --enable-gcc-warnings?  If so, don't.



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

* Re: Master fails to build on Windows
  2019-11-01 10:31 ` Eli Zaretskii
@ 2019-11-01 10:41   ` Angelo Graziosi
  2019-11-01 11:27   ` Angelo Graziosi
  1 sibling, 0 replies; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01 10:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


> Il 1 novembre 2019 alle 11.31 Eli Zaretskii ha scritto:
> 
> Are you configuring with --enable-gcc-warnings?  If so, don't.

No, I never configured with that... nor I changed recently my build scripts... I configured exacly as I did the last month and the previous ones.

BTW, the build on macOS finished without issues... and it works so as on GNU/Linux



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

* Re: Master fails to build on Windows
  2019-11-01 10:31 ` Eli Zaretskii
  2019-11-01 10:41   ` Angelo Graziosi
@ 2019-11-01 11:27   ` Angelo Graziosi
  2019-11-01 12:47     ` Angelo Graziosi
  1 sibling, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01 11:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


It seems that something is wrong now in MSYS2 (or in Windows?) because I recovered the same source I built previously and whose binaries I am using and now it does not build any more but fails in the same manner.

(For the sake of completeness, http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-287f5f1fa48ba947c41ad897ba6f5288a166c887.tar.gz did build successfully on October 16 but fails now... same build script)

Let's see if MSYS2 people has some ideas...



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

* Re: Master fails to build on Windows
  2019-11-01 11:27   ` Angelo Graziosi
@ 2019-11-01 12:47     ` Angelo Graziosi
  2019-11-01 12:58       ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01 12:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

> Il 1 novembre 2019 alle 12.27 Angelo Graziosi  ha scritto:
> 
> 
> 
> It seems that something is wrong now in MSYS2 (or in Windows?) because I recovered the same source I built previously and whose binaries I am using and now it does not build any more but fails in the same manner.

Really it was an issue in MSYS2 (https://github.com/msys2/MINGW-packages/issues/5868). After adapting my build script, emacs master builds fine. Sorry for the noise..



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

* Re: Master fails to build on Windows
  2019-11-01 12:47     ` Angelo Graziosi
@ 2019-11-01 12:58       ` Eli Zaretskii
  2019-11-01 15:12         ` Angelo Graziosi
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-11-01 12:58 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Fri, 1 Nov 2019 13:47:03 +0100 (CET)
> From: Angelo Graziosi <angelo.g0@libero.it>
> Cc: emacs-devel@gnu.org
> 
> Really it was an issue in MSYS2
> (https://github.com/msys2/MINGW-packages/issues/5868).

Yes, we know.

> After adapting my build script, emacs master builds fine. Sorry for the noise..

How did you adapt your build script (and what is that build script,
i.e. how is it related to the usual "configure; make" method of
building Emacs)?



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

* Re: Master fails to build on Windows
  2019-11-01 12:58       ` Eli Zaretskii
@ 2019-11-01 15:12         ` Angelo Graziosi
  2019-11-01 15:59           ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01 15:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


> Il 1 novembre 2019 alle 13.58 Eli Zaretskii ha scritto:
> 
> How did you adapt your build script (and what is that build script,
> i.e. how is it related to the usual "configure; make" method of
> building Emacs)?

The build script simply download the emacs-master.tar.gz, unpacks it etc. 

I removed 'D_FORTIFY_SOURCE=2', now. I added that following the makepkg-mingw script in MSYS2.

In short my script simplify makepkg-mingw creating a personal package (.7z) I can install also on a tablet with W10 Home 64b.



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

* Re: Master fails to build on Windows
  2019-11-01 15:12         ` Angelo Graziosi
@ 2019-11-01 15:59           ` Eli Zaretskii
  2019-11-01 18:11             ` Angelo Graziosi
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-11-01 15:59 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Fri, 1 Nov 2019 16:12:59 +0100 (CET)
> From: Angelo Graziosi <angelo.g0@libero.it>
> Cc: emacs-devel@gnu.org
> 
> The build script simply download the emacs-master.tar.gz, unpacks it etc. 
> 
> I removed 'D_FORTIFY_SOURCE=2', now. I added that following the makepkg-mingw script in MSYS2.
> 
> In short my script simplify makepkg-mingw creating a personal package (.7z) I can install also on a tablet with W10 Home 64b.

So you don't invoke configure and make, but instead run a script
called makepkg-mingw?  And D_FORTIFY_SOURCE=2 is set by that script?



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

* Re: Master fails to build on Windows
  2019-11-01 15:59           ` Eli Zaretskii
@ 2019-11-01 18:11             ` Angelo Graziosi
  2019-11-01 18:54               ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2019-11-01 18:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

> Il 1 novembre 2019 alle 16.59 Eli Zaretskii ha scritto:
> 
> So you don't invoke configure and make, but instead run a script
> called makepkg-mingw?  And D_FORTIFY_SOURCE=2 is set by that script?

No no, my script (emacs-w64-build.sh) downloads the source, run autogen.sh and

eval "${emacs_build_env}" ./configure --prefix="/${PREFIXNAME}" \
         --build=x86_64-w64-mingw32 \
         --without-imagemagick \
         --without-dbus \
         --without-pop \
         --with-modules

make ${MAKE_OPT}

where 

emacs_build_env is, basically,

  CPPFLAGS="-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1" \
  CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"

MAKE_OPT is, basically, '-j 6'. Now I removed '-D_FORTIFY_SOURCE=2'.

Then, the script creates the .7z package.

The script 'makepkg-mingw' belongs to MSYS2 installation. If you remember, MSYS2 uses PKGBUILD scripts as in ArchLinux and 'makepkg-mingw' is used to build MinGW packages (there is also a 'makepkg' script to build _native_ MSYS2 packages). See https://github.com/msys2/msys2/wiki/Creating-packages#building.



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

* Re: Master fails to build on Windows
  2019-11-01 18:11             ` Angelo Graziosi
@ 2019-11-01 18:54               ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-11-01 18:54 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Fri, 1 Nov 2019 19:11:22 +0100 (CET)
> From: Angelo Graziosi <angelo.g0@libero.it>
> Cc: emacs-devel@gnu.org
> 
> No no, my script (emacs-w64-build.sh) downloads the source, run autogen.sh and
> 
> eval "${emacs_build_env}" ./configure --prefix="/${PREFIXNAME}" \
>          --build=x86_64-w64-mingw32 \
>          --without-imagemagick \
>          --without-dbus \
>          --without-pop \
>          --with-modules
> 
> make ${MAKE_OPT}
> 
> where 
> 
> emacs_build_env is, basically,
> 
>   CPPFLAGS="-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1" \
>   CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"

Why are you using non-default compiler flags?  Are they really needed,
or is this just a copy/paste from MSYS2?  If the latter, can I
convince not to use the MSYS2 options?  They are in many cases
incorrect or suboptimal.

In any case, you should definitely report the non-default settings
when you describe any problems, because these options can have
significant effect on the binary.

> The script 'makepkg-mingw' belongs to MSYS2 installation. If you remember, MSYS2 uses PKGBUILD scripts as in ArchLinux and 'makepkg-mingw' is used to build MinGW packages (there is also a 'makepkg' script to build _native_ MSYS2 packages). See https://github.com/msys2/msys2/wiki/Creating-packages#building.

I know about their scripts, I just don't understand why you would want
to use them.  You aren't building an MSYS2 Emacs, you are building
Emacs for yourself, right?



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

end of thread, other threads:[~2019-11-01 18:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01  9:56 Master fails to build on Windows Angelo Graziosi
2019-11-01 10:31 ` Eli Zaretskii
2019-11-01 10:41   ` Angelo Graziosi
2019-11-01 11:27   ` Angelo Graziosi
2019-11-01 12:47     ` Angelo Graziosi
2019-11-01 12:58       ` Eli Zaretskii
2019-11-01 15:12         ` Angelo Graziosi
2019-11-01 15:59           ` Eli Zaretskii
2019-11-01 18:11             ` Angelo Graziosi
2019-11-01 18:54               ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.