Opened on 04/11/17 at 13:45:49
Closed on 10/14/18 at 00:25:12
#2990 closed defect (fixed)
RTEMS Source Builder Fails on Windows Builds
Reported by: | Worth Burruss | Owned by: | Chris Johns |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | tool/rsb | Version: | 5 |
Severity: | normal | Keywords: | windows, MSYS2, gcc |
Cc: | chrisj@… | Blocked By: | |
Blocking: |
Description
The source Builder Fails to build 4.11 tools under MSYS2 and windows. Newer versions of MSYS use a version of gcc greater than 6.0 which can no longer be used to build older version of gcc.
The attached patch is from the gcc mailing list and originally was for gcc version 5.3. It has been adjusted so that it applies to 4.9.3.
This problem should also apply to linux and other systems that use newer gcc 6.0 and above.
Attachments (1)
Change History (20)
Changed on 04/11/17 at 13:46:55 by Worth Burruss
Attachment: | gcc-4.9.3-20170404-1.patch added |
---|
comment:1 Changed on 04/12/17 at 01:09:21 by Chris Johns
Status: | new → assigned |
---|
comment:2 Changed on 04/12/17 at 10:27:08 by Chris Johns <chrisj@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed on 04/13/17 at 07:48:24 by Chris Johns
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Building 4.11.2-rc4 on Windows with a new MSYS2 install has an error on rtems-arm
:
In file included from ../../gcc-4.9.3/gcc/cp/except.c:1013:0: cfns.gperf: In function 'const char* libc_name_p(const char*, unsigned int)': cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' attribute cfns.gperf:26:14: note: 'const char* libc_name_p(const char*, unsigned int)' previously declared here cfns.gperf: At global scope: cfns.gperf:26:14: warning: inline function 'const char* libc_name_p(const char*, unsigned int)' used but never defined make[2]: *** [Makefile:1059: cp/except.o] Error 1
I am not sure the patch is ok so I am reopening this ticket.
comment:4 Changed on 05/26/17 at 03:07:34 by Chris Johns
The problem with ARM is the bset file includes an arch specific cfg file. This patch needs to be added to that file.
I suggest you create a new cfg file with just this patch, remove it from config/tools/rtems-gcc-4.9-newlib-2.2.0-1.cfg, then include the file. Also add the include to config/tools/rtems-arm-gcc-4.9.3-newlib-2.2.0-20150423-1.cfg.
comment:5 Changed on 06/15/17 at 02:50:23 by Chris Johns
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed with path 2433c4b/rtems-source-builder.
comment:6 Changed on 08/07/17 at 01:33:45 by Chris Johns
Milestone: | 4.11.2 → 4.12.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 4.11 → 4.12 |
This bug effects m32c
on the 4.12 (master) branch.
comment:7 Changed on 08/07/17 at 23:41:35 by Chris Johns
Windows (10 64bit) failures:
- dtc-1.4.1
- epiphany gdb-7.8.1
- lm32 gdb-7.12
- microblaze gdb-7.12
- nios2 gcc-7.1.0, newlib-2.5.0.20170623
- powerpc gdb-7.12
- sparc gdb-7.12
We need all these issues resolved to branch 4.12.
comment:8 Changed on 08/07/17 at 23:42:56 by Chris Johns
dtc-1.4.1:
convert-dtsv0-lexer.lex.c:398:0: error: "yywrap" redefined [-Werror] convert-dtsv0-lexer.lex.c:74:0: note: this is the location of the previous definition convert-dtsv0-lexer.l:41:21: fatal error: fnmatch.h: No such file or directory #include <fnmatch.h> ^
comment:9 Changed on 08/07/17 at 23:51:44 by Joel Sherrill
What's the gdb problem? Is it the same on all the targets failing?
What about the nios2? That would seem to be a different issue.
comment:10 Changed on 08/07/17 at 23:54:56 by Chris Johns
lm32 gdb-7.12:
../../../gdb-7.12/sim/lm32/dv-lm32uart.c: In function 'lm32uart_io_read_buffer': ../../../gdb-7.12/sim/lm32/dv-lm32uart.c:207:3: error: unknown type name 'fd_set' fd_set fd; ^~~~~~
comment:11 Changed on 08/07/17 at 23:55:49 by Chris Johns
microblaze gdb-7.12:
../../../gdb-7.12/sim/microblaze/interp.c: In function 'microblaze_extract_unsigned_integer': ../../../gdb-7.12/sim/microblaze/interp.c:34:57: error: 'BIG_ENDIAN' undeclared (first use in this function) #define target_big_endian (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) ^ ../../../gdb-7.12/sim/microblaze/interp.c:52:8: note: in expansion of macro 'target_big_endian' if (!target_big_endian) ^~~~~~~~~~~~~~~~~ ../../../gdb-7.12/sim/microblaze/interp.c:34:57: note: each undeclared identifier is reported only once for each function it appears in #define target_big_endian (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) ^ ../../../gdb-7.12/sim/microblaze/interp.c:52:8: note: in expansion of macro 'target_big_endian' if (!target_big_endian) ^~~~~~~~~~~~~~~~~ ../../../gdb-7.12/sim/microblaze/interp.c: In function 'microblaze_store_unsigned_integer': ../../../gdb-7.12/sim/microblaze/interp.c:34:57: error: 'BIG_ENDIAN' undeclared (first use in this function) #define target_big_endian (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) ^ ../../../gdb-7.12/sim/microblaze/interp.c:74:8: note: in expansion of macro 'target_big_endian' if (!target_big_endian) ^~~~~~~~~~~~~~~~~
comment:12 Changed on 08/07/17 at 23:59:07 by Chris Johns
nios2 gcc-7.1.0, newlib-2.5.0.20170623:
../../../../../../../../../../gcc-7.1.0/libgcc/unwind-dw2-fde.c: At top level: ../../../../../../../../../../gcc-7.1.0/libgcc/unwind-dw2-fde.c:56:1: error: variable 'object_mutex' has initializer but incomplete type static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT; ^~~~~~ make[4]: *** [../../../../../../../../../../gcc-7.1.0/libgcc/static-object.mk:17: unwind-sjlj.o] Error 1 In file included from ../../../../../../../../../../gcc-7.1.0/libgcc/gthr.h:148:0, from ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:31: ./gthr-default.h:51:30: error: '_MUTEX_INITIALIZER' undeclared here (not in a function); did you mean 'PTHREAD_MUTEX_INITIALIZER'? #define __GTHREAD_MUTEX_INIT _MUTEX_INITIALIZER ^ ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:58:41: note: in expansion of macro '__GTHREAD_MUTEX_INIT' static __gthread_mutex_t emutls_mutex = __GTHREAD_MUTEX_INIT; ^~~~~~~~~~~~~~~~~~~~ ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c: In function '__emutls_get_address': ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:159:13: warning: implicit declaration of function 'calloc' [-Wimplicit-function-declaration] arr = calloc (size + 1, sizeof (void *)); ^~~~~~ ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:159:13: warning: incompatible implicit declaration of built-in function 'calloc' ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:159:13: note: include '<stdlib.h>' or provide a declaration of 'calloc' ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:171:13: warning: implicit declaration of function 'realloc' [-Wimplicit-function-declaration] arr = realloc (arr, (size + 1) * sizeof (void *)); ^~~~~~~ ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:171:13: warning: incompatible implicit declaration of built-in function 'realloc' ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:171:13: note: include '<stdlib.h>' or provide a declaration of 'realloc' ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c: At top level: ../../../../../../../../../../gcc-7.1.0/libgcc/emutls.c:58:26: error: storage size of 'emutls_mutex' isn't known static __gthread_mutex_t emutls_mutex = __GTHREAD_MUTEX_INIT; ^~~~~~~~~~~~ In file included from ../../../../../../../../../../gcc-7.1.0/libgcc/gthr.h:148:0, from ../../../../../../../../../../gcc-7.1.0/libgcc/unwind-dw2-fde.c:37: ./gthr-default.h:51:30: error: '_MUTEX_INITIALIZER' undeclared here (not in a function); did you mean 'PTHREAD_MUTEX_INITIALIZER'? #define __GTHREAD_MUTEX_INIT _MUTEX_INITIALIZER ^ ../../../../../../../../../../gcc-7.1.0/libgcc/unwind-dw2-fde.c:56:41: note: in expansion of macro '__GTHREAD_MUTEX_INIT' static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT; ^~~~~~~~~~~~~~~~~~~~ make[4]: *** [../../../../../../../../../../gcc-7.1.0/libgcc/static-object.mk:17: emutls.o] Error 1 ../../../../../../../../../../gcc-7.1.0/libgcc/unwind-dw2-fde.c:56:26: error: storage size of 'object_mutex' isn't known static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT; ^~~~~~~~~~~~
comment:13 Changed on 08/08/17 at 00:01:55 by Chris Johns
powerpc gdb-7.12:
../sim/ppc/libsim.a(sim_calls.o): In function `sim_io_read_stdin': D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:302: undefined reference to `error' ../sim/ppc/libsim.a(sim_calls.o): In function `sim_io_write_stdout': D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:320: undefined reference to `error' ../sim/ppc/libsim.a(sim_calls.o): In function `sim_io_write_stderr': D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:339: undefined reference to `error' ../sim/ppc/libsim.a(sim_calls.o): In function `sim_io_printf_filtered': D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:358: undefined reference to `error' ../sim/ppc/libsim.a(sim_calls.o): In function `sim_load': D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:105: undefined reference to `error' ../sim/ppc/libsim.a(sim_calls.o):D:\opt\rtems\rsb.git\rtems\build\prg7xwm1\build\sim\ppc/../../../gdb-7.12/sim/ppc/sim_calls.c:125: more undefined references to `error' follow
Tracked in GDB here https://sourceware.org/bugzilla/show_bug.cgi?id=20863
comment:14 Changed on 08/08/17 at 00:02:59 by Chris Johns
sparc gdb-7.12:
../../../gdb-7.12/sim/erc32/sis.c: In function 'main': ../../../gdb-7.12/sim/erc32/sis.c:245:16: warning: implicit declaration of function 'fcntl' [-Wimplicit-function-declaration] termsave = fcntl(0, F_GETFL, 0); ^~~~~ ../../../gdb-7.12/sim/erc32/sis.c:245:25: error: 'F_GETFL' undeclared (first use in this function) termsave = fcntl(0, F_GETFL, 0); ^~~~~~~ ../../../gdb-7.12/sim/erc32/sis.c:245:25: note: each undeclared identifier is reported only once for each function it appears in
comment:15 Changed on 08/09/17 at 23:36:23 by Chris Johns
epiphany gdb or binutils:
syslex_wrap.o: In function `yylex': D:\opt\rtems\rsb.git\rtems\build\erg7xwm1\build\binutils/syslex.c:1097: undefined reference to `yywrap' collect2.exe: error: ld returned 1 exit status
comment:16 Changed on 08/25/17 at 01:25:41 by Chris Johns
Windows (10 64bit) failures with the gcc-7.2.0 changes to the RSB:
- dtc-1.4.1
- epiphany gdb-7.8.1
- microblaze gdb-7.12
- nios2 gcc-7.1.0, newlib-2.5.0.20170623
- powerpc gdb-7.12
- sparc gdb-7.12
comment:17 follow-up: 19 Changed on 08/25/17 at 03:04:42 by Chris Johns
DTC uses fnmatch
and this function is not available on Windows in the MinGW environment. The use of this function makes it difficult to get this tool to work on native Windows.
A couple of solutions come to mind:
- Fix the DTC tool.
- Commit a DTB to the
moxie
project for the DTS and remove the dependency.
comment:18 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
comment:19 Changed on 10/14/18 at 00:25:12 by Chris Johns
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to Chris Johns:
DTC uses
fnmatch
and this function is not available on Windows in the MinGW environment. The use of this function makes it difficult to get this tool to work on native Windows.
A couple of solutions come to mind:
- Fix the DTC tool.
- Commit a DTB to the
moxie
project for the DTS and remove the dependency.
I will not fixing DTC on Windows. A new ticket can be opened if this is needed.
In e85c673/rtems-source-builder: