[ELDK] Cannot compile using stdlibs with 5.8

Thomas Lange thomas at corelatus.se
Fri Feb 12 15:04:28 CET 2016


Hi,
there seems to be a problem with gcc system paths
on my system when running ELDK v5.8 on Debian/Jessie:

   k1:/tmp$ arm-linux-gnueabi-gcc -Wall x.c
   x.c:1:19: fatal error: stdio.h: No such file or directory
    #include <stdio.h>

gcc says it is configured with
   --with-sysroot=/not/exist
which seems weird to me.

I would appreciate any hints, I am kind of stuck here.

Full example:

-----
/* First a patch to make install.sh work with debian */

k1:/tmp/work$ diff -Naur /mnt/work/install.sh install.sh -w
--- /mnt/work/install.sh        2016-02-03 11:17:25.000000000 +0100
+++ install.sh  2016-02-12 07:04:10.000938733 +0100
@@ -288,7 +288,7 @@
                 echo -e "*** Installing ${shar}\n    into ${inst_path}" >&2

                 echo -e "${inst_path}\ny" | \
-               ${DRY_RUN} sh ${shar} >/dev/null || exit 1
+               ${DRY_RUN} bash ${shar} >/dev/null || exit 1
         done
  fi

k1:/tmp/work$ ./install.sh  -r lsb-sdk -s toolchain
mkdir: cannot create directory '/opt/eldk-5.8': Permission denied
--------------------------------------------------------------------
NOTICE: superuser priviledges will be needed to create the
installation directory; make sure you have sufficient permissions.
--------------------------------------------------------------------
[sudo] password for thomas:
*** Installing ./targets/armv7a-hf/eldk-glibc-i686-arm-toolchain-5.8.sh
     into /opt/eldk-5.8/armv7a-hf
--------------------------------------------------------------------
NOTICE: superuser priviledges will be needed to install the
root file system; make sure you have sufficient permissions.
--------------------------------------------------------------------
*** Installing 
./targets/armv7a-hf/core-image-lsb-sdk-generic-armv7a-hf.tar.gz
     into /opt/eldk-5.8/armv7a-hf/rootfs-lsb-sdk
k1:/tmp/work$ eval `eldk-switch.sh -r 5.8 -m armv7a-hf`
Setup for armv7a-hf (using ELDK 5.8)
k1:/tmp/work$ cd ..
k1:/tmp$ more x.c
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
   return 0;
}
k1:/tmp$ arm-linux-gnueabi-gcc -Wall x.c
x.c:1:19: fatal error: stdio.h: No such file or directory
  #include <stdio.h>
                    ^
compilation terminated.
k1:/tmp$ `arm-linux-gnueabi-gcc -print-prog-name=cc1` -v
ignoring nonexistent directory 
"/not/exist/usr/lib/gcc/arm-linux-gnueabi/4.9.2/include"
ignoring nonexistent directory "/not/exist/usr/local/include"
ignoring nonexistent directory 
"/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.9.2/../../../../../arm-linux-gnueabi/include"
ignoring nonexistent directory "/not/exist/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 
/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.9.2/include
 
/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.9.2/include-fixed
End of search list.
^C
k1:/tmp$ arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/libexec/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.9.2/lto-wrapper
Target: arm-linux-gnueabi
Configured with: 
/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/work-shared/gcc-4.9.2-r0/gcc-4.9.2/configure 
--build=x86_64-linux --host=i686-eldk-linux --target=arm-linux-gnueabi 
--prefix=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr 
--exec_prefix=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr 
--bindir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi 
--sbindir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/bin/arm-linux-gnueabi 
--libexecdir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/libexec/arm-linux-gnueabi 
--datadir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/share 
--sysconfdir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/etc 
--sharedstatedir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/com 
--localstatedir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/var 
--libdir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/lib/arm-linux-gnueabi 
--includedir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/include --oldincludedir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/include 
--infodir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/share/info --mandir=/opt/eldk-5.8/armv7a-hf/sysroots/i686-eldk-linux/usr/share/man 
--disable-silent-rules --disable-dependency-tracking 
--with-libtool-sysroot=/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/sysroots/i686-nativesdk-eldk-linux 
--with-gnu-ld --enable-shared --enable-languages=c,c++ 
--enable-threads=posix --disable-multilib --enable-c99 
--enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch 
--program-prefix=arm-linux-gnueabi- --without-local-prefix 
--enable-target-optspace --enable-lto --enable-libssp 
--disable-bootstrap --disable-libmudflap --with-system-zlib 
--with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no 
--with-cloog=no --enable-checking=release --enable-cheaders=c_global 
--with-gxx-include-dir=/not/exist/usr/include/c++/4.9.2 
--with-build-time-tools=/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/sysroots/x86_64-linux/usr/arm-linux-gnueabi/bin 
--with-sysroot=/not/exist 
--with-build-sysroot=/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/sysroots/generic-armv7a-hf 
--enable-poison-system-directories 
--with-mpfr=/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/sysroots/i686-nativesdk-eldk-linux 
--with-mpc=/opt/eldk/build/eldk-rel-v5.8-2016-01-07-ffc59ba-armv7a-hf/tmp/sysroots/i686-nativesdk-eldk-linux 
--enable-nls --with-arch=armv7-a
Thread model: posix
gcc version 4.9.2 (GCC)

k1:/tmp$ arm-linux-gnueabi-gcc 
--sysroot=/opt/eldk-5.8/armv7a-hf/sysroots/armv7ahf-vfp-neon-linux-gnueabi/ 
x.c
In file included from 
/opt/eldk-5.8/armv7a-hf/sysroots/armv7ahf-vfp-neon-linux-gnueabi/usr/include/features.h:389:0,
                  from 
/opt/eldk-5.8/armv7a-hf/sysroots/armv7ahf-vfp-neon-linux-gnueabi/usr/include/stdio.h:27,
                  from x.c:1:
/opt/eldk-5.8/armv7a-hf/sysroots/armv7ahf-vfp-neon-linux-gnueabi/usr/include/gnu/stubs.h:7:29: 
fatal error: gnu/stubs-soft.h: No such file or directory
  # include <gnu/stubs-soft.h>
                              ^
compilation terminated.
---------

Regards,
/Thomas


More information about the eldk mailing list