RTEMS 4.11.0 build fails on Windows

Worth Burruss worth at motioncontrol.org
Mon Apr 10 14:02:16 UTC 2017


Linda, 

What you are seeing is caused by a recent upgrade of gcc in the MSYS2 enviornment.  A few 
months ago it was 5.something and now it is 6.something.  I came across this last week in 
setting up a new machine.  I found a patch from the GCC mailing list for 5.something and 
adjusted it for gcc 4.9.3.  

Attached are the 2 patches I created and put in a temp area to come back to latter and 
properly fix when I had time.  I have never applied them to another system, but am pretty 
sure they should work.  The gcc patch file goes in your rsb/rtems/patches directory and the 
rsb will do the patch application.  the other patch you have to appy with:

patch -p1 < rsb-fix-for-gcc-4.11-2017-0405-1.patch

with -p1 depending on where you put the patch, I can not remeber for sure but think this 
would be the top level rsb directory.

Unfortunatly I do not have time for the next 2 or 3 weeks to actualy look into fixing the 
patches properly so issues still exist, you will definitly get a warning about no checksum for 
the gcc patch file, but it will not stop the build.  I suspect others may exist such as carriage 
return / line feeds.

Hopefully this is enough to get you started.

Thank you,

Worth Burruss


On 9 Apr 2017 at 15:33, Linda Huxley wrote:

> I am attempting to build the RTEMS tool set, following the instructions 
> in section "5.2.1. RTEMS Tools and Kernel" of the "RTEMS User Manual" 
> 4.11.99.  The instructions for building on Windows are flawed, but I 
> seem to have worked my way through the issues.  I am working in the 
> MSYS2 MINGW64 build environment.  I issue the following commands:
> 
> $ cd /c
> $ mkdir -p opt/rtems
> $ cd opt/rtems
> $ wget 
> https://ftp.rtems.org/pub/rtems/releases/4.11/4.11.0/rtems-source-builder-4.11.0.tar.xz
> $ tar Jxf rtems-source-builder-4.11.0.tar.xz
> $ mv rtems-source-builder-4.11.0 4.11.0
> $ cd 4.11.0/rtems
> $ ../source-builder/sb-set-builder \
>      --prefix=/opt/rtems/4.11.0 4.11/rtems-sparc --jobs=none
> 
> About 45 minutes later, the build fails with the following message:
> 
> error: building srg4n2xwm1
> Build FAILED
>    See error report: 
> rsb-report-sparc-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1.txt
> error: building srg4n2xwm1
> Build Set: Time 0:40:06.527128
> Build FAILED
> 
> The salient error messages at the bottom of error report would appear to be:
> 
> 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:1058: cp/except.o] Error 1
> make[2]: Leaving directory 
> '/C/opt/rtems/4.11.0/rtems/build/srg4n2xwm1/build/gcc'
> make[1]: *** [Makefile:3985: all-gcc] Error 2
> make[1]: Leaving directory 
> '/C/opt/rtems/4.11.0/rtems/build/srg4n2xwm1/build'
> make: *** [Makefile:872: all] Error 2
> shell cmd failed: sh -ex  /C/opt/rtems/4.11.0/rtems/build/srg4n2xwm1/doit
> error: building srg4n2xwm1
> 
> This would appear to be a bug in gcc itself.  I tried making the obvious 
> changes to cfns.h, but the file is overwritten when I restart RSB.
> 
> Can anybody provide a clue as to how to resolve this error?  Has anybody 
> successfully built RTEMS 4.11.0 recently?
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

Thank you,

Worth Burruss
Motion Control Systems, Inc.   
www.motioncontrol.org
Phone 540-731-0540  Fax   540-731-0543


-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  gcc-4.9.3-20170404-1.patch
     Date:  10 Apr 2017, 9:09
     Size:  4164 bytes.
     Type:  Unknown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.9.3-20170404-1.patch
Type: application/octet-stream
Size: 4164 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170410/652b5323/attachment.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  rsb-fix-for-gcc-4.11-20170405-1.patch
     Date:  10 Apr 2017, 9:09
     Size:  768 bytes.
     Type:  Unknown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsb-fix-for-gcc-4.11-20170405-1.patch
Type: application/octet-stream
Size: 768 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170410/652b5323/attachment-0001.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  What is Here.txt
     Date:  10 Apr 2017, 9:09
     Size:  736 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: What is Here.txt
Type: application/octet-stream
Size: 736 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20170410/652b5323/attachment-0002.obj>


More information about the users mailing list