public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/94918] New: Ada bootstrap errors on Cygwin64
@ 2020-05-02  9:37 mikpelinux at gmail dot com
  2020-05-02 19:27 ` [Bug bootstrap/94918] " mikpelinux at gmail dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: mikpelinux at gmail dot com @ 2020-05-02  9:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94918

            Bug ID: 94918
           Summary: Ada bootstrap errors on Cygwin64
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikpelinux at gmail dot com
  Target Milestone: ---

Attempting to bootstrap gcc-10.1.0-RC-20200430 with Ada on Cygwin64
fails with several errors.

The first is:

g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format  -Wmissing-format-attribute -Woverloaded-virtual
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -Wno-error
-DHAVE_CONFIG_H -I. -Iada -I/tmp/gcc-10.1.0-RC-20200430/gcc
-I/tmp/gcc-10.1.0-RC-20200430/gcc/ada
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../include
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libcpp/include
-I/home/mikpe/pkgs/cygwin-x86_64/gmp-6.2.0/include
-I/home/mikpe/pkgs/cygwin-x86_64/mpfr-4.0.2/include
-I/home/mikpe/pkgs/cygwin-x86_64/mpc-1.1.0/include 
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libdecnumber
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libdecnumber/bid -I../libdecnumber
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libbacktrace   -o ada/adaint.o -MT
ada/adaint.o -MMD -MP -MF ada/.deps/adaint.TPo
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c
In file included from
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/xmmintrin.h:34,
                 from
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/emmintrin.h:31,
                 from /usr/include/w32api/winnt.h:1558,
                 from /usr/include/w32api/minwindef.h:163,
                 from /usr/include/w32api/windef.h:8,
                 from /usr/include/w32api/windows.h:69,
                 from /tmp/gcc-10.1.0-RC-20200430/gcc/ada/mingw32.h:60,
                 from /tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c:164:
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/mm_malloc.h:53:18:
error: attempt to use poisoned "malloc"
   53 |   __malloc_ptr = malloc (__size + __align);
      |                  ^
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c: In function 'int
__gnat_open_new_temp(char*, int)':
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c:1064:19: warning: 'char*
mktemp(char*)' is deprecated: the use of `mktemp' is dangerous; use `mkstemp'
instead [-Wdeprecated-declarations]
 1064 |   if (mktemp (path) == NULL)
      |                   ^
In file included from /tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c:237:
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.h:280:15: note: declared here
  280 | extern char  *mktemp       (char *);
      |               ^~~~~~
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c:1064:19: warning: 'char*
mktemp(char*)' is deprecated: the use of `mktemp' is dangerous; use `mkstemp'
instead [-Wdeprecated-declarations]
 1064 |   if (mktemp (path) == NULL)
      |                   ^
In file included from /tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.c:237:
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/adaint.h:280:15: note: declared here
  280 | extern char  *mktemp       (char *);
      |               ^~~~~~
make[3]: *** [Makefile:1117: ada/adaint.o] Error 1
make[3]: Leaving directory '/tmp/objdir/gcc'
make[2]: *** [Makefile:4741: all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/objdir'
make[1]: *** [Makefile:20804: stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/objdir'
make: *** [Makefile:21125: bootstrap] Error 2

mingw32.h has this at line 60:

 /* Note: windows.h on cygwin-64 includes x86intrin.h which uses malloc.
    That fails to compile, if malloc is poisoned, i.e. if !IN_RTS.  */
 #define _X86INTRIN_H_INCLUDED
 #endif
 #include <windows.h>

<windows.h> now also drags in <emmintrin.h>, so the fix is to add:

  #define _EMMINTRIN_H_INCLUDED

The second error is:

g++ -std=gnu++98 -fno-PIE -c  -I/tmp/gcc-10.1.0-RC-20200430/gcc/../libgcc
-DEH_MECHANISM_gcc -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format  -Wmissing-format-attribute -Woverloaded-virtual
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -Iada -I/tmp/gcc-10.1.0-RC-20200430/gcc
-I/tmp/gcc-10.1.0-RC-20200430/gcc/ada
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../include
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libcpp/include
-I/home/mikpe/pkgs/cygwin-x86_64/gmp-6.2.0/include
-I/home/mikpe/pkgs/cygwin-x86_64/mpfr-4.0.2/include
-I/home/mikpe/pkgs/cygwin-x86_64/mpc-1.1.0/include 
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libdecnumber
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libdecnumber/bid -I../libdecnumber
-I/tmp/gcc-10.1.0-RC-20200430/gcc/../libbacktrace   -o ada/raise-gcc.o -MT
ada/raise-gcc.o -MMD -MP -MF ada/.deps/raise-gcc.TPo
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/raise-gcc.c
In file included from
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/xmmintrin.h:34,
                 from
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/immintrin.h:29,
                 from
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/x86intrin.h:32,
                 from /usr/include/w32api/winnt.h:1554,
                 from /usr/include/w32api/minwindef.h:163,
                 from /usr/include/w32api/windef.h:8,
                 from /usr/include/w32api/windows.h:69,
                 from /tmp/gcc-10.1.0-RC-20200430/libgcc/unwind-generic.h:33,
                 from /tmp/gcc-10.1.0-RC-20200430/gcc/ada/raise-gcc.c:90:
/home/mikpe/pkgs/cygwin-x86_64/gcc-9.3.1/lib/gcc/x86_64-pc-cygwin/9.3.1/include/mm_malloc.h:53:18:
error: attempt to use poisoned "malloc"
   53 |   __malloc_ptr = malloc (__size + __align);
      |                  ^
/tmp/gcc-10.1.0-RC-20200430/gcc/ada/raise-gcc.c:1615:1: warning:
'_Unwind_Reason_Code __gnat_personality_v0(version_arg_t, phases_arg_t,
_Unwind_Exception_Class, _Unwind_Exception*, _Unwind_Context*)' defined but not
used [-Wunused-function]
 1615 | __gnat_personality_v0 (version_arg_t version_arg,
      | ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1117: ada/raise-gcc.o] Error 1
make[3]: Leaving directory '/tmp/objdir/gcc'
make[2]: *** [Makefile:4741: all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/objdir'
make[1]: *** [Makefile:20804: stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/objdir'
make: *** [Makefile:21125: bootstrap] Error 2

which is another occurrence of the previous issue.  Here we need to add:

  #define _X86INTRIN_H_INCLUDED
  #define _EMMINTRIN_H_INCLUDED

before including <windows.h> in unwind-generic.h.  Both are needed, as
defining either one isn't enough to prevent all errors.

The third error is:

/tmp/objdir/./gcc/xgcc -B/tmp/objdir/./gcc/
-B/home/mikpe/pkgs/cygwin-x86_64/gcc-10.1/x86_64-pc-cygwin/bin/
-B/home/mikpe/pkgs/cygwin-x86_64/gcc-10.1/x86_64-pc-cygwin/lib/ -isystem
/home/mikpe/pkgs/cygwin-x86_64/gcc-10.1/x86_64-pc-cygwin/include -isystem
/home/mikpe/pkgs/cygwin-x86_64/gcc-10.1/x86_64-pc-cygwin/sys-include  
-fchecking=1 -c -g -O2   -W -Wall -gnatpg -nostdinc   g-sercom.adb -o
g-sercom.o
g-sercom.adb:113:17: expected type "Serial_Port_Descriptor" defined at
g-sercom.ads:128
g-sercom.adb:113:17: found type "System.Win32.HANDLE"
make[4]: *** [../gcc-interface/Makefile:299: g-sercom.o] Error 1
make[4]: Leaving directory '/tmp/objdir/gcc/ada/rts'
make[3]: *** [gcc-interface/Makefile:615: gnatlib] Error 2
make[3]: Leaving directory '/tmp/objdir/gcc/ada'
make[2]: *** [Makefile:107: gnatlib] Error 2
make[2]: Leaving directory '/tmp/objdir/x86_64-pc-cygwin/libada'
make[1]: *** [Makefile:19584: all-target-libada] Error 2
make[1]: Leaving directory '/tmp/objdir'
make: *** [Makefile:21127: bootstrap] Error 2

which is because g-sercom.ads changed the Serial_Port_Descriptor type, but
g-sercom__mingw.adb missed an adjustment; here the fix is to wrap the code
in call to Serial_Port_Descriptor ().

With those three fixes bootstrap is successful.

Patch is being prepared.

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

end of thread, other threads:[~2021-03-10 11:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02  9:37 [Bug bootstrap/94918] New: Ada bootstrap errors on Cygwin64 mikpelinux at gmail dot com
2020-05-02 19:27 ` [Bug bootstrap/94918] " mikpelinux at gmail dot com
2020-05-04 21:28 ` [Bug bootstrap/94918] [8/9/10/11 regression] " ebotcazou at gcc dot gnu.org
2020-05-04 21:39 ` cvs-commit at gcc dot gnu.org
2020-05-04 21:40 ` cvs-commit at gcc dot gnu.org
2020-05-04 21:44 ` cvs-commit at gcc dot gnu.org
2020-05-04 21:46 ` cvs-commit at gcc dot gnu.org
2020-05-04 21:49 ` ebotcazou at gcc dot gnu.org
2020-06-26 12:05 ` rguenth at gcc dot gnu.org
2021-01-14  8:41 ` rguenth at gcc dot gnu.org
2021-01-14  9:00 ` mikpelinux at gmail dot com
2021-03-10 11:46 ` cvs-commit at gcc dot gnu.org
2021-03-10 11:48 ` cvs-commit at gcc dot gnu.org
2021-03-10 11:49 ` cvs-commit at gcc dot gnu.org
2021-03-10 11:49 ` ebotcazou at gcc dot gnu.org

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