Eu estava compilando um kernel Linux para o meu Raspberry Pi em um laptop (executando o debian 7) (seguiu as instruções aqui ); mas quando começo a compilar ( make ARCH=arm CROSS_COMPILE=${CCPREFIX}
), recebo as seguintes mensagens:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Eu imaginei que o problema era que o cc1 não pôde ser encontrado ou que gcc
não estava instalado corretamente (e, por isso, reinstalei o gcc com apt-get --reinstall install gcc
mas sem sorte).
gcc -v
dá:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
gcc -print-prog-name=cc1
dá:
/usr/lib/gcc/i486-linux-gnu/4.7/cc1
gcc -print-search-dirs
dá:
install: /usr/lib/gcc/i486-linux-gnu/4.7/
programs: =/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/
libraries: =/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/:/lib/i486-linux-gnu/4.7/:/lib/i386-linux-gnu/:/lib/../lib/:/usr/lib/i486-linux-gnu/4.7/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../:/lib/:/usr/lib/
e find / -type f -name cc1
dá:
/opt/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/libexec/gcc/arm-bcm2708-linux-gnueabi/4.7.1/cc1
/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.7.2/cc1
/opt/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/libexec/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/cc1
/usr/lib/gcc/i486-linux-gnu/4.6/cc1
/usr/lib/gcc/i486-linux-gnu/4.7/cc1
A corrida dpkg -S cc1
oferece:
libopencc1:i386: /usr/share/doc/libopencc1/changelog.Debian.gz
g++-4.7: /usr/lib/gcc/i486-linux-gnu/4.7/cc1plus
cpp-4.6: /usr/lib/gcc/i486-linux-gnu/4.6/cc1
libopencc1:i386: /usr/share/doc/libopencc1
cpp-4.7: /usr/lib/gcc/i486-linux-gnu/4.7/cc1
libopencc1:i386: /usr/share/doc/libopencc1/copyright
libgcc1:i386: /usr/share/lintian/overrides/libgcc1
ncurses-term: /usr/share/terminfo/x/xterm+pcc1
libgcc1:i386: /usr/share/doc/libgcc1
Alguma ideia?
strace make
.
CCPREFIX
? Qual compilador cruzado você instalou e onde instalou?