Problems with RTEMS toolchain build 4.12 & 5 incl. Ada support
chris at kluge-rocks.de
chris at kluge-rocks.de
Thu Nov 29 23:09:02 UTC 2018
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).
To additionally avoid any problems caused by mistakes made in build scripts, I fetched the existing build scripts found at:
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.
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':
gcc-7.1.0-newlib-126.96.36.19970623-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-188.8.131.5270623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb
restrict.adb:1198:33: "Restricted_Tasking" is undefined (more references follow)
gnatmake: "/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-184.108.40.20670623-x86_64-linux-gnu-1/gcc-7.1.0/gcc/ada/restrict.adb" compilation error
../gcc-interface/Makefile:2640: recipe for target 'gnatmake-re' failed
make: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-220.127.116.1170623-x86_64-linux-gnu-1/build/gcc/ada/tools'
make: *** [gnatmake-re] Error 4
make: *** [gnattools-cross] Error 2
Makefile:215: recipe for target 'gnattools-cross' failed
make: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-18.104.22.16870623-x86_64-linux-gnu-1/build/gnattools'
make: *** [all-gnattools] Error 2
Makefile:10575: recipe for target 'all-gnattools' failed
make: Leaving directory '/root/development/rtems/src/rtems-source-builder-2018.11.29/rtems/build/sparc-rtems4.12-gcc-7.1.0-newlib-22.214.171.12470623-x86_64-linux-gnu-1/build'
make: *** [all] Error 2
Makefile:897: recipe for target 'all' failed
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-126.96.36.19970623-x86_64-linux-gnu-1/doit
error: building sparc-rtems4.12-gcc-7.1.0-newlib-188.8.131.5270623-x86_64-linux-gnu-1
I then tried to find anything in the web and found this bug report: https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html (https://gcc.gnu.org/ml/gcc-bugs/2017-07/msg01306.html) which describes a workaround:
- don't build GCC in the source tree (which is already ensured by RSB)
- add C & C++ to the supported languages
- use absolute paths for GCC configuration (I guessed this means: don't use ../configure)
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.
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.
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.
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.
Is there any chance to get a GCC with Ada support for RTEMS 5?
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)?
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.
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)!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users