Issue installing a GNAT cross-compiler

Gabriel Brusq gabriel.brusq at
Tue May 9 11:35:18 UTC 2017

Issue installing a GNAT cross-compiler
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
Gabriel Brusq
[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.

More information about the users mailing list