Problems with RTEMS toolchain build 4.12 & 5 incl. Ada support
Thanassis.Tsiodras at esa.int
Thanassis.Tsiodras at esa.int
Fri Nov 30 08:26:03 UTC 2018
Hi Chris.
I wrote that script - and indeed use it to build the cross-compiler
bundled in the TASTE VM.
It's been a while since I last performed a build - so my advice may be a
bit outdated - but your problems in all likelihood come from using an old
GNAT. The Ada cross compiler uses constructs that aren't supported in
GNAT6.3 (the default policy in Debian stable - which is the basis of the
TASTE VM - is to update things.... very slowly). So when I build the cross
compiler, I simply install a later GNAT from Debian testing or unstable (
edit /etc/apt/sources.list, add the "testing" or "unstable" repos,
"apt-get update", and then install gnat 7 - or maybe we're at gnat 8 now
(not sure).
Try it again this way, and keep me in the loop (you can contact me
directly if you want). I make it a point to keep that script working -
because we need Ada support in our TASTE-bundled cross-compilers,
regardless of how everything else evolves.
BTW, even though I periodically merge my script in the repo you pointed
to, my "master" copy is here:
https://gitrepos.estec.esa.int/ttsiodras/RTEMS-build-workflows/tree/master/OAR/contrib
At some point I need to create a Dockerfile to completely automate this
thing - there's too many variables to consider and people can easily trip
over one of them.
Cheers,
Thanassis.
Thanassis Tsiodras
Real-time Embedded Software Engineer
System, Software and Technology Department
ESTEC
Keplerlaan 1, PO Box 299
NL-2200 AG Noordwijk, The Netherlands
Thanassis.Tsiodras at esa.int | www.esa.int
T +31 71 565 5332
From: chris at kluge-rocks.de
To: users at rtems.org
Date: 30/11/2018 00:09
Subject: Problems with RTEMS toolchain build 4.12 & 5 incl. Ada
support
Sent by: "users" <users-bounces at rtems.org>
Hi community,
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:
https://gitrepos.estec.esa.int/taste/taste-setup/tree/master/misc/HW_experiments/GR740_SPW/contrib
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-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
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-2.5.0.20170623-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[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'
make[3]: *** [gnatmake-re] Error 4
make[2]: *** [gnattools-cross] Error 2
Makefile:215: recipe for target 'gnattools-cross' failed
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'
make[1]: *** [all-gnattools] Error 2
Makefile:10575: recipe for target 'all-gnattools' failed
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'
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-2.5.0.20170623-x86_64-linux-gnu-1/doit
error: building
sparc-rtems4.12-gcc-7.1.0-newlib-2.5.0.20170623-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 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)!
Best regards,
Chris Kluge
_______________________________________________
users mailing list
users at rtems.org
http://lists.rtems.org/mailman/listinfo/users
This message is intended only for the recipient(s) named above. It may contain proprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (dpo at esa.int).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20181130/9c534ea3/attachment-0002.html>
More information about the users
mailing list