<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">Hi community,<div><div><div style="font-family: arial, sans-serif;font-size: 13px"> <div><div><div style="font-family: arial, sans-serif;font-size: 13px"> <br>I'm struggling with building a GCC toolchain for RTEMS including Ada language support. After trying everything I found at Github or in the web, the RTEMS documentation or RTEMS source builder, I finally decided to use TASTE's virtual machine which I hoped to find a consistent and correct environment, esp. regarding the GCC toolchain installed on this system (GCC 6.3.0 with Ada support).<br><br>To additionally avoid any problems caused by mistakes made in build scripts, I fetched the existing build scripts found at:<br><a rel="external nofollow noopener noreferrer" target="_blank" tabindex="-1" href="https://gitrepos.estec.esa.int/taste/taste-setup/tree/master/misc/HW_experiments/GR740_SPW/contrib">https://gitrepos.estec.esa.int/taste/taste-setup/tree/master/misc/HW_experiments/GR740_SPW/contrib</a><br><br>The scripts should build toolchains for RTEMS 4.11 and 5.1. The RTEMS GCC toolchain installed in the VM is obviously built with one of the scripts, at least according to the comments and readme files. So I was pretty optimistic to be successful after days and weeks of disappointed attempts.<br><br>Unfortunately, I once again ran into trouble and couldn't build the toolchain. This time the process stopped when during build of GCC because of an undefined symbol: 'Restricted_Tasking':<br><br>gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada -O2 -pipe -I/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/tmp/sb-root/4.12/rtems-sparc/opt/rtems-4.12-2018.11.29/include -g -O2 -W -Wall -gnatpg -gnata -I- /root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb<br>restrict.adb:1198:33: "Restricted_Tasking" is undefined (more references follow)<br>gnatmake: "/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb" compilation error<br>../gcc-interface/Makefile:2640: recipe for target 'gnatmake-re' failed<br>make[3]: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build/gcc/ada/tools'<br>make[3]: *** [gnatmake-re] Error 4<br>make[2]: *** [gnattools-cross] Error 2<br>Makefile:215: recipe for target 'gnattools-cross' failed<br>make[2]: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build/gnattools'<br>make[1]: *** [all-gnattools] Error 2<br>Makefile:10575: recipe for target 'all-gnattools' failed<br>make[1]: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/build'<br>make: *** [all] Error 2<br>Makefile:897: recipe for target 'all' failed<br>shell cmd failed: /bin/sh -ex /root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1/doit<br>error: building sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-x86_64-linux-gnu-1<br><br>I then tried to find anything in the web and found this bug report: <a rel="external nofollow noopener noreferrer" target="_blank" tabindex="-1" href="https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html">https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html</a> which describes a workaround:<br>- don't build GCC in the source tree (which is already ensured by RSB)<br>- add C & C++ to the supported languages<br>- use absolute paths for GCC configuration (I guessed this means: don't use ../configure)<br><br>I edited gcc-common-1.cfg of RSB accordingly to avoid use of relative paths for the GCC configuration, but this didn't help. The build process still fails with the same issue, independent from RTEMS 4.11 or 5 or if there's an abs path or not.<br><br>I know that providing an existing GNAT is mandatory when building Ada and that I have to build a bootstrap compiler first before resuming with build of the final GCC. But I didn't expect the build process to fail in the TASTE VM which should provide everything needed to have success.<br><br>Does anyone know where to find a really working build script or the required RTEMS source builder commit IDs to use? I guess that using the masters of both, RTEMS source builder and the kernel, will not work for that, but I can't find a tag or branch which points me to the right direction or which works.<br><br>Addditionally, there's no information in the RTEMS source builder on how to build with Ada support: The description of the TASTE project describes building a bootstrap and a final compiler while the original RTEMS source builder documentation simply says that parameter --with-ada is enough in combination with a GNAT in the PATH. None of that worked.<br><br>Is there any chance to get a GCC with Ada support for RTEMS 5?<br>Which exact version of GCC and which RTEMS source builder and kernel git versions/commits are supposed to work (the masters don't work for me, neither the commit IDs of TASTE's build.rtems.X.sh scripts work for me)?<br><br>I could imagine that the GCC 6.3.0 of the TASTE VM isn't suitable to build RTEMS toolchain with RTEMS source builder & kernel masters but I can't find information which of all those config files of RSB I have to use for a successful build (targets: ARM, x86-64). This is pretty frustrating and very disappointing. There are so many variables which are not exactly documented, at least for the current version of RSB/kernel.<br><br>Thanks in advance for every answer or hint pointing me to the right direction (esp. on the question how to define the correct RSB and RTEMS kernel versions/commit IDs for a specific native GCC installation)!<br><br>Best regards,<br>Chris Kluge<br><br><br><br> </div></div></div> <br><br><br><signature></signature> </div></div></div> <br> <br><br><signature></signature> </div></body></html>