Issue installing a GNAT cross-compiler

Joel Sherrill joel at rtems.org
Tue May 9 13:59:23 UTC 2017


It will also help to have a new enough RTEMS and tools where the network
headers are in the C Library. They were moved to make building tools which
needed networking headers easier.

Our general push is to get most/all of the POSIX headers packaged with the
C Library even if the implementation is in RTEMS. This makes the headers
available when building the tools. There is a chicken and egg problem when
building the tools for RTEMS for some .h files.

--joel

On Tue, May 9, 2017 at 7:58 AM, <Jan.Sommer at dlr.de> wrote:

> Hi Gabriel,
>
> It's quite some time since I last built the cross compiler with Ada.
> Maybe this could help you?: http://taste.tuxfamily.org/
> wiki/index.php?title=Building_a_TASTE-y_RTEMS
> You can skip the sparc-specific things. I used to build it for the
> RaspberryPi, so it should work on ARM in general.
>
> @Chris: I just noticed that the rsb uses gcc 4.9.3 in the 4.11 branch.
> Could we update that to 4.9.4? This version will have the patch for Ada on
> RTEMS.
>
> Best regards,
>
>  Jan
>
>
> > -----Original Message-----
> > From: users [mailto:users-bounces at rtems.org] On Behalf Of Gabriel Brusq
> > Sent: Tuesday, May 09, 2017 1:35 PM
> > To: users at rtems.org
> > Subject: Issue installing a GNAT cross-compiler
> >
> > Issue installing a GNAT cross-compiler
> >
> > Hello,
> >
> > I am trying to build a GNAT cross-compiler for xilinx zynq zedboard (ARM
> Cortex-
> > A9) and I'm facing the well known issue "fatal error: sys/socket.h: No
> such file or
> > directory"
> > I have read previous threads regarding this error and followed
> recommendations
> > but the trouble persists
> >
> > What I have done up to now:
> >
> > - Installation of native gcc-4.8.2 and binutils-2.4
> > - Installation of cross-compiler (same versions) WITHOUT ada support
> >
> > - Installation of rtems-4.11 WITHOUT ada support, to generate the missing
> > <sys/socket.h> [1]
> >                 ../rtems/configure --target=arm-rtems4.11
> --enable-rtemsbsp="xilinx-
> > zynq" --enable-networking --enable-posix --enable-cxx --enable-tests
> --enable-
> > multilib --prefix=$RTEMS_INSTALL_DIR
> >
> > - Trying to build GNAT cross-compiler WITH ada support but ran into
> issue "fatal
> > error: sys/socket.h: No such file or directory"
> >                 ../gcc-4.8.2/configure --enable-threads=rtems
> --with-gnu-as --with-
> > gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls
> --enable-version-
> > specific-runtime-libs --enable-languages="c,c++,ada"
> --target=arm-rtems4.11 --
> > prefix=$PREREQUISITES_INSTALL_DIR/gcc-cross-c-cpp-ada-4.8.2 --with-
> > gmp=$PREREQUISITES_INSTALL_DIR --with-
> > mpfr=$PREREQUISITES_INSTALL_DIR --with-
> > mpc=$PREREQUISITES_INSTALL_DIR --with-isl=$PREREQUISITES_INSTALL_DIR
> >
> >
> > I think I missed a step after generating socket.h I checked that rtems
> install
> > directory is in $PATH but I do not know if there are other tips to do
> for this
> > header to be found during the GNAT cross compiler build
> >
> > Can someone clarify that for me
> >
> > Thank you for your help
> > Regards,
> > Gabriel Brusq
> >
> >
> > References:
> > [1] gsocket.h
> > /*
> > * RTEMS has these .h files but not until you have built and installed
> RTEMS.
> > * When building a C/C++ toolset, you also build the newlib C library, so
> the
> > * build procedure for an RTEMS GNAT toolset requires that you build a
> C/C++
> > * toolset, then build and install RTEMS with --enable-multilib, and
> finally
> > * build the Ada part of the toolset.
> > */
> >
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170509/f8e4acfb/attachment-0002.html>


More information about the users mailing list