Error in building rtems 5.3 tools via mingw

Chris Johns chrisj at rtems.org
Wed Mar 29 08:42:32 UTC 2023


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 "<string>", line 55, in <module>
>   File "<string>", 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", 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 "<string>", 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
> 
> Il giorno sab 25 mar 2023 alle ore 00:06 Chris Johns <chrisj at rtems.org
> <mailto:chrisj at rtems.org>> 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
> 


More information about the users mailing list