尝试执行“cc1”时出错,修复的选项有限

时间:2018-06-01 21:22:59

标签: c linux gcc debian gnu-make

我正在尝试在Debian Linux系统上编译文件,我相信gcc的配置有问题。

$ gcc test.c -o test -pthread -v
Using built-in specs.
COLLECT_GCC=gcc
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) 
COLLECT_GCC_OPTIONS='-o' 'test' '-pthread' '-v' '-mtune=generic' '-march=i586'
cc1 -quiet -v -imultiarch i386-linux-gnu -iprefix ../lib/gcc/i486-linux-gnu/4.7/ -D_REENTRANT test.c -quiet -dumpbase test.c -mtune=generic -march=i586 -auxbase test -version -o /tmp/ccOVllff.s
gcc: error trying to exec 'cc1': execvp: No such file or directory

我在/usr/lib/gcc/i486-linux-gnu/4.7.2/cc1找到了cc1。所以我将cc1符号链接到构建目录并再次尝试:

$ ln -s /usr/lib/gcc/i486-linux-gnu/4.7.2/cc1 /tmp/kernelpop/
$ gcc test.c -o test -pthread
In file included from test.c:22:0:
/usr/include/stdio.h:34:21: fatal error: stddef.h: No such file or directory
compilation terminated.

任何人都可以就如何告诉这个编译器库的位置给我一些建议吗?我无权安装/重新安装/重新配置软件包,因此更新系统对我不起作用。

0 个答案:

没有答案