Error in building rtems 5.3 tools via mingw
Good afternoon, I'm trying to build the rtems 5.3 tools in windows using mingw, but I'm getting an error during the gdb build. I'm attaching the logs so you can see what's going on. RTEMS Tools Project - Source Builder Error Report Build: error: building arg9xwm1 Command Line: ../source-builder/sb-set-builder --prefix=C:/opt/rtems/5.3 5/rtems-arm Python: 2.7.18 (default, Jan 14 2023, 22:21:24) [GCC 12.2.0 64 bit (AMD64)] RSB: not a valid repo Windows Tail of the build log: ranlib libsim.a x86_64-w64-mingw32-gcc -O2 -g -pipe -I/c/opt/rtems/rtems-source-builder-5.3/rtems/build/tmp/sb-197611/5a/c/opt/rtems/5.3/include -DHAVE_CONFIG_H -DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wno-format -DMODET -I. -I../../../gdb-9.1/sim/arm -I../common -I../../../gdb-9.1/sim/arm/../common -I../../include -I../../../gdb-9.1/sim/arm/../../include -I../../bfd -I../../../gdb-9.1/sim/arm/../../bfd -I../../opcodes -I../../../gdb-9.1/sim/arm/../../opcodes -g -O2 -D__USE_MINGW_ACCESS -L/c/opt/rtems/rtems-source-builder-5.3/rtems/build/tmp/sb-197611/5a/c/opt/rtems/5.3/lib -Wl,--stack,12582912 -o run.exe \ nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -L../../zlib -lz -lm make[3]: Leaving directory '/c/opt/rtems/rtems-source-builder-5.3/rtems/build/arg9xwm1/build/sim/arm' make[2]: Leaving directory '/c/opt/rtems/rtems-source-builder-5.3/rtems/build/arg9xwm1/build/sim' make[2]: Entering directory '/c/opt/rtems/rtems-source-builder-5.3/rtems/build/arg9xwm1/build/gdb' /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs arch/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs cli/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs mi/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs gdbsupport/.deps mkdir -p -- arch/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs compile/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs tui/.deps mkdir -p -- cli/.deps mkdir -p -- mi/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs unittests/.deps mkdir -p -- gdbsupport/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs guile/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs python/.deps mkdir -p -- compile/.deps mkdir -p -- tui/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs target/.deps /bin/sh ../../gdb-9.1/gdb/../mkinstalldirs nat/.deps mkdir -p -- unittests/.deps mkdir -p -- guile/.deps mkdir -p -- python/.deps mkdir -p -- target/.deps mkdir -p -- nat/.deps GENstamp-version CXXxml-support.o GENxml-builtin.c CXXxml-syscall.o CXXxml-tdesc.o CXXgdb.o CXXaarch32-tdep.o CXXada-exp.o CXXada-lang.o CXXada-tasks.o CXXada-typeprint.o CXXada-valprint.o In file included from ../../gdb-9.1/gdb/ada-lang.c:32: ../../gdb-9.1/gdb/inferior.h: In member function 'void infcall_suspend_state_deleter::operator()(infcall_suspend_state*) const': ../../gdb-9.1/gdb/inferior.h:80:38: warning: 'bool std::uncaught_exception()' is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations] 80 | if (!std::uncaught_exception ()) | ^~ In file included from C:/msys64/mingw64/include/c++/12.2.0/ext/concurrence.h:34, from C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr_base.h:62, from C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr.h:53, from C:/msys64/mingw64/include/c++/12.2.0/memory:77, from ../../gdb-9.1/gdb/gdbsupport/common-exceptions.h:25, from ../../gdb-9.1/gdb/gdbsupport/common-defs.h:137, from ../../gdb-9.1/gdb/defs.h:28, from ../../gdb-9.1/gdb/ada-lang.c:21: C:/msys64/mingw64/include/c++/12.2.0/exception:124:8: note: declared here 124 | bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); |^~ CXXada-varobj.o CXXaddrmap.o In file included from ../../gdb-9.1/gdb/ada-tasks.c:24: ../../gdb-9.1/gdb/inferior.h: In member function 'void infcall_suspend_state_deleter::operator()(infcall_suspend_state*) const': ../../gdb-9.1/gdb/inferior.h:80:38: warning: 'bool std::uncaught_exception()' is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations] 80 | if (!std::uncaught_exception ()) | ^~ In file included from C:/msys64/mingw64/include/c++/12.2.0/ext/concurrence.h:34, from C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr_base.h:62, from C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr.h:53
Re: Error in building rtems 5.3 tools via mingw
Ok I managed to resolve the problem by updating the gdb to gdb-12 as you suggested. Just for information if someone will have the same problem, I got the gdb-12.cfg from the master and copied it inside the rtems-source-builder/ rtems/config/tools directory. then I had to modify the rtems-default.bset file inside rtems-source-builder/rtems/config/5 by changing the gdb version to 12.1 otherwise the builder will still use the 9.1 version. Thank you once again for your help. Giovanni Il giorno mar 21 mar 2023 alle ore 17:12 Giovanni Righi ha scritto: > Ok I managed to resolve the problem by updating the gdb to gdb-12 as you > suggested. > Just for information if someone will have the same problem, I got the > gdb-12.cfg from the master and copied it inside the > rtems-source-builder/rtems/config/tools directory. then I had to modify the > rtems-default.bset file inside rtems-source-builder/rtems/config/5 by > changing the gdb version to 12.1 otherwise the builder will still use the > 9.1 version. > Thank you once again for your help. > Giovanni > > Il giorno ven 17 mar 2023 alle ore 18:17 Joel Sherrill > ha scritto: > >> >> >> On Fri, Mar 17, 2023 at 10:22 AM Giovanni Righi >> wrote: >> >>> Good afternoon, >>> I'm trying to build the rtems 5.3 tools in windows using mingw, but I'm >>> getting an error during the gdb build. >>> I'm attaching the logs so you can see what's going on. >>> >> >> The error looks like this gdb is using a feature which is considered >> deprecated by the late model gcc in your mingw. >> >> = >> In file included from ../../gdb-9.1/gdb/corelow.c:25: >> >> ../../gdb-9.1/gdb/inferior.h: In member function 'void >> infcall_suspend_state_deleter::operator()(infcall_suspend_state*) const': >> >> ../../gdb-9.1/gdb/inferior.h:80:38: warning: 'bool >> std::uncaught_exception()' is deprecated: use 'std::uncaught_exceptions()' >> instead [-Wdeprecated-declarations] >> >>80 | if (!std::uncaught_exception ()) >> == >> >> I see two options since I don't think using an older compiler version is >> likely possible. >> >> (1) Change the RSB file which has the gdb configure command to ensure it >> disables werror. >> >> (2) Update the version of gdb in the RSB. You can probably just copy the >> gdb-12 cfg file from the master and bump to that. >> >> Both require a minor level of digging into >> rtems-source-builder/rtems/config >> >> --joel >> >> >>> ___ >>> users mailing list >>> users@rtems.org >>> http://lists.rtems.org/mailman/listinfo/users >> >> ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: Error in building rtems 5.3 tools via mingw
I opened the ticket as requested. Now I'm having another issue, I re-runned the source-builder but now it stop with the following error: + ./waf Waf: Entering directory `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' [ 1/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 Traceback (most recent call last): File "", line 55, in File "", line 20, in run OSError: [Errno 22] Invalid argument [ 2/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4 Waf: Leaving directory `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' Build failed Traceback (most recent call last): File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 181, in exec_command ret,out,err=Utils.run_process(cmd,kw,cargs) File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Utils.py", line 598, in run_process return run_prefork_process(cmd,kwargs,cargs) File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Utils.py", line 533, in run_prefork_process proc.stdin.write(obj) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Task.py", line 180, in process ret=self.run() File "", line 14, in f File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Task.py", line 173, in exec_command return self.generator.bld.exec_command(cmd,**kw) File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 183, in exec_command raise Errors.WafError('Execution failure: %s'%str(e),ex=e) waflib.Errors.WafError: Execution failure: [Errno 32] Broken pipe shell cmd failed: sh -ex /c/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/do-build error: building rt51 ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: Error in building rtems 5.3 tools via mingw
Ok so I tried what you suggested, I downloaded the rtems-tools-5.3 tar form the server and I launched directly the waf script. I got the same error, then I tried again and again I got the same error but on a file following the one that caused the first error. So I launched the waf again and it managed to compile all the files. After this I did a waf clean and tried again and I got the same results, error - error - compilation complete. Note the two errors happened in the same files as the first "run". So now I have the tools compiled but I don't know how to finish the build of the toolchain, because if I launch the sb-set-builder again it cleans everything and starts again so when it reaches the tools part it crashes again because of the waf error. I hope the explanation is clear and there is a solution for this problem. I attach a file with parts of the three runs so you can see what's going on. Il giorno mer 22 mar 2023 alle ore 19:01 Chris Johns ha scritto: > On 23/3/2023 1:16 am, Giovanni Righi wrote: > > I opened the ticket as requested. > > Now I'm having another issue, I re-runned the source-builder but now it > stop > > with the following error: > > + ./waf > > Waf: Entering directory > > > `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' > > [ 1/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 > > Traceback (most recent call last): > > File "", line 55, in > > File "", line 20, in run > > OSError: [Errno 22] Invalid argument > > That looks like waf in rtems-tools had an issue. It may need to be updated. > > Are you able to download the rtems-tools tar file from our servers and > manually > build that package? > > Chris > FIRST RUN: Waf: Entering directory `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' [ 1/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 [ 2/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4 [ 3/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_msize.m4 [ 4/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_funcs.m4 [ 5/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pro_funcs.m4 [ 6/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pro_pubnames.m4 [ 7/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pro_types.m4 [ 8/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pro_vars.m4 Traceback (most recent call last): File "", line 55, in [ 9/258] Compiling Traceback (most recent call last): Traceback (most recent call last): File "", line 55, in File "", line 55, in Traceback (most recent call last): File "", line 55, in File "", line 20, in run File "", line 20, in run File "", line 20, in run OSError: [Errno 22] Invalid argument OSError: [Errno 22] Invalid argument File "", line 20, in run OSError: [Errno 22] Invalid argument Traceback (most recent call last): rtemstoolkit/elftoolchain/libdwarf/dwarf_pro_weaks.m4 File "", line 55, in File "", line 20, in run OSError: [Errno 22] Invalid argument OSError: [Errno 22] Invalid argument Traceback (most recent call last): File "", line 55, in Traceback (most recent call last): File "", line 20, in run File "", line 55, in File "", line 20, in run OSError: [Errno 22] Invalid argument OSError: [Errno 22] Invalid argument [ 10/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pubnames.m4 [ 11/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_pubtypes.m4 [ 12/258] Compiling rtemstoolkit/elftoolchain/libdwarf/dwarf_types.m4 Traceback (most recent call last): File "", line 55, in File "", line 20, in run [ 13/258] Compiling OSError: [Errno 22] Invalid argument rtemstoolkit/elftoolchain/libdwarf/dwarf_vars.m4 Waf: Leaving directory `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' Build failed Traceback (most recent call last): File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 181, in exec_command ret,out,err=Utils.run_process(cmd,kw,cargs) File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Utils.py", line 598, in run_process return run_prefork_process(cmd,kwargs,cargs) File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Utils.py", line 533, in run_prefork_process proc.stdin.write(obj) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exc
Re: Error in building rtems 5.3 tools via mingw
File "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 183, in exec_command raise Errors.WafError('Execution failure: %s'%str(e),ex=e) waflib.Errors.WafError: Execution failure: [Errno 32] Broken pipe shell cmd failed: sh -ex /c/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/do-build error: building rt51 Il giorno sab 25 mar 2023 alle ore 00:06 Chris Johns ha scritto: > On 23/3/2023 10:48 pm, Giovanni Righi wrote: > > Ok so I tried what you suggested, I downloaded the rtems-tools-5.3 tar > form the > > server and I launched directly the waf script. > > I got the same error, then I tried again and again I got the same error > but on a > > file following the one that caused the first error. So I launched the > waf again > > and it managed to compile all the files. > > After this I did a waf clean and tried again and I got the same results, > error - > > error - compilation complete. > > Note the two errors happened in the same files as the first "run". > > So now I have the tools compiled but I don't know how to finish the > build of the > > toolchain, because if I launch the sb-set-builder again it cleans > everything and > > starts again so when it reaches the tools part it crashes again because > of the > > waf error. > > I hope the explanation is clear and there is a solution for this > problem. > > I attach a file with parts of the three runs so you can see what's going > on. > > Thanks. I wonder if the scripting used to handle the `.m4` files is broken > on > mingw? What happens if you add --jobs=1 to a clean build? > > What version of Windows? > > Chris > ___ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users
Re: Error in building rtems 5.3 tools via mingw
Ok, also I forgot to say in the previous email that I'm using windows 11. Il giorno mer 29 mar 2023 alle ore 10:42 Chris Johns ha scritto: > On 29/3/2023 6:33 pm, Giovanni Righi wrote: > > I tried again with the flag --jobs=1 on a clean build and I got the same > error > > message. > > Thanks > > > But this time it seems to happen on the second file. My idea is that with > > parallel building it managed to build more files before getting the > error, while > > with only one job it's slower so it gets the error earlier. > > Yeap but we now know which is the exact file that is broken. That is > helpful. > > I will add this to my list to take a look. > > Chris > > > Here's the tail of the log: > > > ___ > > + ./waf distclean configure --prefix=/c/opt/rtems/5.3 > > 'distclean' finished successfully (0.000s) > > Setting top to : > > C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3 > > Setting out to : > > > C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build > > Version : 5.3 (5) > > Checking for program 'python': > C:/msys64/mingw64/bin/python.exe > > Checking for python version >= 2.6.6 : 3.10.10 > > Checking for program 'python': > C:/msys64/mingw64/bin/python.exe > > Checking for program 'python2' : > C:\msys64\mingw64\bin/python2.exe > > Checking for program 'python3' : > C:\msys64\mingw64\bin/python3.exe > > Checking for 'gcc' (C compiler) : C:\msys64\mingw64\bin/gcc.exe > > Checking for 'g++' (C++ compiler): C:\msys64\mingw64\bin/g++.exe > > Checking for header alloca.h : not found > > Checking for header fcntl.h : yes > > Checking for header process.h: yes > > Checking for header stdlib.h : yes > > Checking for header string.h : yes > > Checking for header strings.h: yes > > Checking for header sys/file.h : yes > > Checking for header sys/stat.h : yes > > Checking for header sys/time.h : yes > > Checking for header sys/types.h : yes > > Checking for header sys/wait.h : not found > > Checking for header unistd.h : yes > > Checking for header vfork.h : not found > > Checking for getrusage : no > > Checking for program 'm4': C:\msys64\usr\bin/m4.exe > > Checking for header sys/wait.h : not found > > Checking for kill: no > > Checking for 'gcc' (C compiler) : C:\msys64\mingw64\bin/gcc.exe > > Checking for 'g++' (C++ compiler): C:\msys64\mingw64\bin/g++.exe > > Checking for 'gcc' (C compiler) : C:\msys64\mingw64\bin/gcc.exe > > Checking for strnlen : yes > > Checking for 'g++' (C++ compiler): C:\msys64\mingw64\bin/g++.exe > > Checking for fopen64 : no > > Checking for stat64 : yes > > Checking for 'gcc' (C compiler) : C:\msys64\mingw64\bin/gcc.exe > > Checking for 'g++' (C++ compiler): C:\msys64\mingw64\bin/g++.exe > > Checking for library LLVM: not found > > Checking for header zlib.h : yes > > Checking for library z : yes > > Checking for library ws2_32 : yes > > Checking for compiler flags -std=c++14 : yes > > 'configure' finished successfully (12.090s) > > + ./waf > > Waf: Entering directory > > > `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' > > [ 1/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 > > Traceback (most recent call last): > > File "", line 55, in > > File "", line 20, in run > > [ 2/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4 > > OSError: [Errno 22] Invalid argument > > Waf: Leaving directory > > > `C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/build' > > Build failed > > Traceback (most recent call last): > > File > > > "C:/opt/rtems/rtems-source-builder-5.3/rtems/build/rt51/rtems-tools-5.3/waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py",