MSYS2 build: header file missing

Jiri Gaisler jiri at gaisler.se
Fri Dec 18 22:04:40 UTC 2020


On 12/18/20 5:15 PM, Robin Müller wrote:
> Hi Jiri,
>
> Okay, I commented out that header on my Windows 10 machine (Version 20H2, 19042.685) and it compiled.
>
> That error was on a different Linux machine when cross compiling the cross toolchain for Windows (i686 rtems6-arm worked now, so that's nice). Maybe this #define is also derived from the current OS?
> I could try to supply it manually..

I have updated sis git with the windows fixes. To test it, apply the attached patch to your RSB tree and build sis standalone with

../source-builder/sb-set-builder --prefix=/opt/rtems/6 devel/sis

Let me know if it builds OK for you and I will push the patch to the RSB tree...

Jiri.

>
> Kind Regards
> Robin
>
>
>
> On Fri, 18 Dec 2020 at 16:35, Jiri Gaisler <jiri at gaisler.se <mailto:jiri at gaisler.se>> wrote:
>
>
>     On 12/18/20 2:10 PM, Robin Müller wrote:
>>     In case you're interested, this is the fail report for the SIS Cxc build on Linux (failed both for i686 and x86_64).
>>
>>     I think it fails because _WIN32_WINNT (windows version) is not defined, causing winsock2.h to exclude requires sections.
>>
>>     Build command was:
>>      ../source-builder/sb-set-builder --prefix=/c/Users/Robin/RTEMS/rtems-tools/rtems/6 --no-install --bset-tar-file --host=i686-w64-mingw32 6/rtems-sparc
>>
>     I had a quick look at this. The first problem with missing arpa/inet.h can be fixed by commenting out the include file, as it is not needed:
>
>     i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I.    -DFAST_UART -O2 -g -pipe -I/home/rmueller/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/tmp/sb-1000/6/rtems-sparc/c/Users/Robin/RTEMS/rtems-tools/rtems/6/include  -MT greth.o -MD -MP -MF .deps/greth.Tpo -c -o greth.o greth.c
>     greth.c:31:10: fatal error: arpa/inet.h: No such file or directory
>        31 | #include <arpa/inet.h>
>
>
>     The second problem with winsock2.h is not obvious to me. On my old windows7/qemu system, remote.c compiles fine and winsock2.h provides the necessary defines. Which windows version are you using where it fails?
>
>     I am about to release a new sis version with more RISCV support, so I could add fixes for MSYS2 if necessary ...
>
>     Regards, Jiri.
>
>
>>     Kind Regards
>>     Robin
>>
>>     On Fri, 18 Dec 2020 at 12:49, Robin Müller <robin.mueller.m at gmail.com <mailto:robin.mueller.m at gmail.com>> wrote:
>>
>>         If I understand correctly, the BSPs can be installed with waf only if the tool suite for the given architecture has been installed.
>>         Problem is, the RSB build will fail even if a tiny component is problematic. 
>>         I thought the tool suite itself is installed using the build commands required by the sources (make, automake, etc).
>>         Is it possible to also build these sources with waf?
>>
>>         I have tried this cross compiling on linux for windows (I used x86_64 instead of i686) because everything was working on Linux, but there are issues with the SIS tool for sparc-rtems6..
>>         But SIS is now also problematic on the Windows machine where I almost managed to build everything.
>>
>>         Everything except SIS was built by the RSB and I copied the installed files manually to install them and tried to build a BSP (is there actually some script like do-install which will perform this step?)
>>         But now some RTEMS tool is missing (rtems-bin2c):
>>
>>         $ ./waf configure --prefix=$RTEMS_TOOLS --rtems-bsp=sparc/erc32
>>         Setting top to                           : C:/Users/Robin/Documents/RTEMS/rtems-tools/src/rtems
>>         Setting out to                           : C:/Users/Robin/Documents/RTEMS/rtems-tools/src/rtems/build
>>         Configure board support package (BSP)    : sparc/erc32
>>         Checking for program 'sparc-rtems6-gcc'  : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-gcc.exe
>>         Checking for program 'sparc-rtems6-g++'  : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-g++.exe
>>         Checking for program 'sparc-rtems6-ar'   : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ar.exe
>>         Checking for program 'sparc-rtems6-ld'   : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ld.exe
>>         Checking for program 'ar'                : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ar.exe
>>         Checking for program 'g++, c++'          : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-g++.exe
>>         Checking for program 'ar'                : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ar.exe
>>         Checking for program 'gas, gcc'          : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-gcc.exe
>>         Checking for program 'ar'                : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ar.exe
>>         Checking for program 'gcc, cc'           : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-gcc.exe
>>         Checking for program 'ar'                : C:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/bin/sparc-rtems6-ar.exe
>>         Checking for program 'rtems-bin2c'       : not found
>>         Could not find the program ['rtems-bin2c']
>>         (complete log in C:/Users/Robin/Documents/RTEMS/rtems-tools/src/rtems/build/config.log)
>>
>>         In general the build process on Windows seems to be more "brittle" than on Linux, so maybe installers would be a good idea? I generally installed cross-compilers (e.g. arm-none-eabi-gcc) on Windows
>>         using installers (for example https://xpack.github.io/arm-none-eabi-gcc/) and have made very good experience with that.
>>
>>         Kind Regards
>>         Robin
>>
>>         On Fri, 18 Dec 2020 at 12:24, Sebastian Huber <sebastian.huber at embedded-brains.de <mailto:sebastian.huber at embedded-brains.de>> wrote:
>>
>>             On 18/12/2020 11:35, Chris Johns wrote:
>>
>>             >> Since all parts of RTEMS build now with waf I think it is possible to build RTEMS applications on Windows without having to install MSYS2/MinGW. It should work with only a Python installation, but I haven't tested this yet.
>>             > This maybe true In theory but I have not been able to achieve it.
>>             What was the missing piece?
>>
>>             -- 
>>             embedded brains GmbH
>>             Herr Sebastian HUBER
>>             Dornierstr. 4
>>             82178 Puchheim
>>             Germany
>>             email: sebastian.huber at embedded-brains.de <mailto:sebastian.huber at embedded-brains.de>
>>             phone: +49-89-18 94 741 - 16
>>             fax:   +49-89-18 94 741 - 08
>>
>>             Registergericht: Amtsgericht München
>>             Registernummer: HRB 157899
>>             Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
>>             Unsere Datenschutzerklärung finden Sie hier:
>>             https://embedded-brains.de/datenschutzerklaerung/
>>
>>             _______________________________________________
>>             devel mailing list
>>             devel at rtems.org <mailto:devel at rtems.org>
>>             http://lists.rtems.org/mailman/listinfo/devel
>>
>>
>>     _______________________________________________
>>     devel mailing list
>>     devel at rtems.org <mailto:devel at rtems.org>
>>     http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201218/4c3e154a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-devel-sis-Update-to-2.26.patch
Type: text/x-patch
Size: 954 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201218/4c3e154a/attachment-0001.bin>


More information about the devel mailing list