Issue installing a GNAT cross-compiler

Jan.Sommer at Jan.Sommer at
Tue May 9 12:58:09 UTC 2017

Hi Gabriel,

It's quite some time since I last built the cross compiler with Ada.
Maybe this could help you?:
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,


> -----Original Message-----
> From: users [mailto:users-bounces at] On Behalf Of Gabriel Brusq
> Sent: Tuesday, May 09, 2017 1:35 PM
> To: users at
> 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-
> 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

More information about the users mailing list