RTEMS 4.11.0 build fails on Windows

Chris Johns chrisj at rtems.org
Thu Apr 13 00:44:34 UTC 2017


On 13/4/17 8:53 am, Linda Huxley wrote:
> 
> The fix recommended by Gedare worked, and my RTEMS tools build completed
> without incident.

Great. I have pushed a fix to the RSB on the 4.11 branch.

> Section "5.2.1. RTEMS Tools and Kernel" of the RTEMS User Manual 4.11.99
> ends with the following statement:
> 
> "You can now build a 3rd party library or an application as defailted in
> TBD."
> 
> But there are no instructions to build the RTEMS kernel within that
> section.  Is that what is intended?

It needs me to write the section. I would like to do this task however I
have not had time to do this. This work is currently unfunded so it
happens when I have the time.

> I went back to section "3. Quick Start" for instructions on how to build
> the kernel.  The first command for building the kernel is:
> 
> $ export PATH=$HOME/development/rtems/4.12/bin:$PATH
> 
> My directory tree is different, so the corresponding command would be:
> 
> $ export PATH=/c/opt/rtems/4.11.0/bin:$PATH
> 
> But the preceding tools build did not create that directory.  Is that
> right?

What `prefix` did you supply to the RSB `sb-set-builder` command?

> I found the following directory instead:
> 
> /c/opt/rtems/4.11.0/rtems/build/tmp/sb-Linda/C/msys64/opt/rtems/4.11.0/bin

This is a temporary directory used by the RSB to package the tools. It
is not the final directory.

> So I created the "/c/opt/rtems/4.11.0/bin" directory and I copied the
> contents of the other bin directory into it.

This is what the RSB does, but it only does it if there are no errors.

I am confused why you need to do this, the RSB should complete with an
installed set of tools.

>  Then I ran the following
> commands:
> 
> $ export PATH=/c/opt/rtems/4.11.0/bin:$PATH
> $ cd /c/opt/rtems
> $ mkdir kernel
> $ cd kernel
> $ git clone git://git.rtems.org/rtems.git rtems
> $ cd rtems
> $ ./bootstrap -c && ./bootstrap -p && \
>   /c/opt/rtems/4.11.0/source-builder/sb-bootstrap
> $ cd ..
> $ mkdir erc32
> $ cd erc32
> $ /c/opt/rtems/kernel/rtems/configure --prefix=/c/opt/rtems/4.11.0 \
>   --target=sparc-rtems4.11.0 --enable-rtemsbsp=erc32 --enable-posix
> $ make -j 8
> 
> However, the final command failed.  The following errors occurred:
> 
> In file included from
> C:/opt/rtems/kernel/rtems/tools/build/cklength.c:27:0:
> C:/opt/rtems/kernel/rtems/tools/build/cklength.c: In function 'error':
> C:/opt/rtems/kernel/rtems/tools/build/cklength.c:251:16: warning:
> '_errno' redeclared without dllimport attribute: previous dllimport
> ignored [-Wattributes]
>      extern int errno;
>                 ^
> In file included from
> C:/opt/rtems/kernel/rtems/tools/build/eolstrip.c:22:0:
> C:/opt/rtems/kernel/rtems/tools/build/eolstrip.c: In function 'error':
> C:/opt/rtems/kernel/rtems/tools/build/eolstrip.c:245:16: warning:
> '_errno' redeclared without dllimport attribute: previous dllimport
> ignored [-Wattributes]
>      extern int errno;
>                 ^
> In file included from C:/opt/rtems/kernel/rtems/tools/build/unhex.c:36:0:
> C:/opt/rtems/kernel/rtems/tools/build/unhex.c: In function 'error':
> C:/opt/rtems/kernel/rtems/tools/build/unhex.c:687:16: warning: '_errno'
> redeclared without dllimport attribute: previous dllimport ignored
> [-Wattributes]
>      extern int errno;
>                 ^
> 
> Those errors look suspiciously like the problem that I ran into with
> cfns.h.  Is there perhaps a patch or a fix?

They are warnings and I see them as well but the build does not stop.

> 
> Those errors don't terminate the build, but the build fails later with
> the following error:
> 
> checking for sparc-rtems4.11.0-gcc... no
> configure: error: no acceptable cc found in $PATH

This is the real issue. It is an unfortunate the RTEMS build system does
not perform a suitable check when the initial configure phase happens.

I have just uploaded RTEMS 4.11.2-rc4 and I suggest you use this. I
attach a picture of the build running a Windows10 machine. The
4.11.2-rc4 contains the patch needed to build on Windows.

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win10-msys2-rtems-4.11.2-rc4-build.png
Type: image/png
Size: 50305 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170413/36caf3e4/attachment-0002.png>


More information about the users mailing list