unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
@ 2019-04-24  7:28 martin rudalics
  2019-07-11 18:23 ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2019-04-24  7:28 UTC (permalink / raw)
  To: 35410

Trying a 32-bit MSYS2 build of master on Windows 10 configured with
CFLAGS='-O3' gets me here:

w32.o:w32.c:(.text+0xa29f): undefined reference to `_imp___futime32'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:643: temacs.exe] Fehler 1
make[1]: Verzeichnis „/c/emacs/trunk/opt-32/src“ wird verlassen
make: *** [Makefile:423: src] Fehler 2

A build configured with CFLAGS='-O0 -g3' proceeds without problems.
The 32-builds use gcc 7.4.0.  64-bit builds with the same options
proceed without problems using gcc 8.3.0.

A workaround here is to add a check to mingw_time.h like

/* The @#$%^&! MinGW developers stopped updating the values of
    __MINGW32_VERSION, __MINGW32_MAJOR_VERSION, and
    __MINGW32_MINOR_VERSION values in v4.x of the runtime, to
    "discourage its uses".  So the values of those macros can no longer
    be trusted, and we need the workaround below, to have a single set
    of macros we can trust.  (The .17 minor version is arbitrary.)  */
#ifdef __MINGW32__
#include <_mingw.h>
# ifndef __CRT__NO_INLINE
#  define __CRT__NO_INLINE
# endif
#endif

martin






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

* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
  2019-04-24  7:28 bug#35410: 27.0.50; 32-bit build of master failing with MSYS2 martin rudalics
@ 2019-07-11 18:23 ` Noam Postavsky
  2019-07-12  8:12   ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2019-07-11 18:23 UTC (permalink / raw)
  To: martin rudalics; +Cc: 35410

martin rudalics <rudalics@gmx.at> writes:

> Trying a 32-bit MSYS2 build of master on Windows 10 configured with
> CFLAGS='-O3' gets me here:
>
> w32.o:w32.c:(.text+0xa29f): undefined reference to `_imp___futime32'
> collect2.exe: error: ld returned 1 exit status
> make[1]: *** [Makefile:643: temacs.exe] Fehler 1
> make[1]: Verzeichnis „/c/emacs/trunk/opt-32/src“ wird verlassen
> make: *** [Makefile:423: src] Fehler 2
>
> A build configured with CFLAGS='-O0 -g3' proceeds without problems.
> The 32-builds use gcc 7.4.0.  64-bit builds with the same options
> proceed without problems using gcc 8.3.0.

Seems to work okay here, but my ming32 gcc is 7.2.0.  Is this still a
problem?






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

* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
  2019-07-11 18:23 ` Noam Postavsky
@ 2019-07-12  8:12   ` martin rudalics
  2019-07-12 15:28     ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2019-07-12  8:12 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 35410

 >> w32.o:w32.c:(.text+0xa29f): undefined reference to `_imp___futime32'
 >> collect2.exe: error: ld returned 1 exit status
 >> make[1]: *** [Makefile:643: temacs.exe] Fehler 1
 >> make[1]: Verzeichnis „/c/emacs/trunk/opt-32/src“ wird verlassen
 >> make: *** [Makefile:423: src] Fehler 2
 >>
 >> A build configured with CFLAGS='-O0 -g3' proceeds without problems.
 >> The 32-builds use gcc 7.4.0.  64-bit builds with the same options
 >> proceed without problems using gcc 8.3.0.
 >
 > Seems to work okay here, but my ming32 gcc is 7.2.0.  Is this still a
 > problem?

Yes.  With slight changes in the Makefile references:

   CCLD     temacs.exe
w32.o:w32.c:(.text+0xa27f): undefined reference to `_imp___futime32'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:651: temacs.exe] Fehler 1
make[1]: Verzeichnis „/c/emacs/trunk/opt-32/src“ wird verlassen
make: *** [Makefile:424: src] Fehler 2

In an earlier conversation with Eli I wrote

 > > An optimized 32-bit build apparently does not recognize
 > >
 > > #ifndef __MINGW64_VERSION_MAJOR

and he told me

 > So I guess we need to find an alternative to
 > __MINGW64_VERSION_MAJOR that will work in the 32-bit MinGW64 builds.
 > Look for macros that include "_VERSION_" or "_MAJOR" in the MinGW64
 > headers.

but I had no good idea how to continue.

martin






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

* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
  2019-07-12  8:12   ` martin rudalics
@ 2019-07-12 15:28     ` Noam Postavsky
  2019-07-12 16:52       ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2019-07-12 15:28 UTC (permalink / raw)
  To: martin rudalics; +Cc: 35410, Noam Postavsky

martin rudalics <rudalics@gmx.at> writes:

>>> w32.o:w32.c:(.text+0xa29f): undefined reference to `_imp___futime32'
>>> collect2.exe: error: ld returned 1 exit status
>>> make[1]: *** [Makefile:643: temacs.exe] Fehler 1
>>> make[1]: Verzeichnis „/c/emacs/trunk/opt-32/src“ wird verlassen
>>> make: *** [Makefile:423: src] Fehler 2
>>>
>>> A build configured with CFLAGS='-O0 -g3' proceeds without problems.
>>> The 32-builds use gcc 7.4.0.  64-bit builds with the same options
>>> proceed without problems using gcc 8.3.0.
>>
>> Seems to work okay here, but my ming32 gcc is 7.2.0.

Hmm, I tried updating, but now my mingw32 gcc is 9.1.0, and it still
builds fine.  I'm not sure if it's practical to support old compiler
versions from a rolling release.





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

* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
  2019-07-12 15:28     ` Noam Postavsky
@ 2019-07-12 16:52       ` martin rudalics
  2019-10-09 18:11         ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2019-07-12 16:52 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 35410

 > Hmm, I tried updating, but now my mingw32 gcc is 9.1.0, and it still
 > builds fine.  I'm not sure if it's practical to support old compiler
 > versions from a rolling release.

The problem is not with the compiler version per se but with the
headers shipped with MinGW64.  So hopefully they fixed that problem in
our sense in the meantime.  I'm reluctant to update as well because
the 64-bit builds work sufficiently well and updating always bears the
risk spoiling that.  I filed the report only to hear opinions from
other MinGW64 users but apparently neither of them uses my version.

martin





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

* bug#35410: 27.0.50; 32-bit build of master failing with MSYS2
  2019-07-12 16:52       ` martin rudalics
@ 2019-10-09 18:11         ` martin rudalics
  0 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2019-10-09 18:11 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 35410-done

 >  > Hmm, I tried updating, but now my mingw32 gcc is 9.1.0, and it still
 >  > builds fine.  I'm not sure if it's practical to support old compiler
 >  > versions from a rolling release.
 >
 > The problem is not with the compiler version per se but with the
 > headers shipped with MinGW64.  So hopefully they fixed that problem in
 > our sense in the meantime.  I'm reluctant to update as well because
 > the 64-bit builds work sufficiently well and updating always bears the
 > risk spoiling that.  I filed the report only to hear opinions from
 > other MinGW64 users but apparently neither of them uses my version.

I now upgraded MSYS2 to its present version and it builds fine so I'm
hopefully closing this bug.

Thanks for the heads-up, martin





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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24  7:28 bug#35410: 27.0.50; 32-bit build of master failing with MSYS2 martin rudalics
2019-07-11 18:23 ` Noam Postavsky
2019-07-12  8:12   ` martin rudalics
2019-07-12 15:28     ` Noam Postavsky
2019-07-12 16:52       ` martin rudalics
2019-10-09 18:11         ` martin rudalics

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