尝试在构建根目录上构建 x86_64 映像,错误:未找到 C99 编译器,eudev 需要 C99 编译器

问题描述

因此,我尝试使用 buildroot 来构建自定义 x86_64 映像,但是,我遇到了此错误

error: no C99 compiler found,eudev requires a C99 compiler.

你们现在可能是什么? 我已经试过检查 gcc 版本

marlon@ubuntu:~/buildroot$  gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
copyright (C) 2019 Free Software Foundation,Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or fitness FOR A PARTIculaR PURPOSE.

检查堆栈版本

[Yesterday 11:43 AM] Marlon Oliveira
    marlon@ubuntu:~$ stack --version
Version 2.5.1,Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0

我也成功运行了所有需求

$ sudo apt install make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc wget libncurses-dev

这是完整的错误消息:

>>> eudev 3.2.10 Configuring
(cd /home/marlon/buildroot/output/build/eudev-3.2.10/ && rm -rf config.cache && PATH="/home/marlon/buildroot/output/host/bin:/home/marlon/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" AR="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ar" AS="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-as" LD="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld" NM="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-nm" CC="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc" GCC="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc" CPP="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-cpp" CXX="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-g++" FC="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gfortran" F77="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gfortran" RANLIB="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ranlib" READELF="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-readelf" STRIP="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-strip" OBJcopY="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-objcopy" OBJDUMP="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/home/marlon/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/home/marlon/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/home/marlon/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/home/marlon/buildroot/output/host/lib -Wl,-rpath,/home/marlon/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-as" DEFAULT_LINKER="/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONfig="/home/marlon/buildroot/output/host/bin/pkg-config" STAGING_DIR="/home/marlon/buildroot/output/host/x86_64-buildroot-linux-uclibc/sysroot" INTLTOOL_PERL=/usr/bin/perl CXX=no ac_cv_lbl_unaligned_fail=no ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no   CONfig_SITE=/dev/null ./configure --target=x86_64-buildroot-linux-uclibc --host=x86_64-buildroot-linux-uclibc --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared  --disable-manpages --sbindir=/sbin --libexecdir=/lib --disable-introspection --enable-kmod --enable-blkid --with-rootlibdir=/lib --enable-split-usr --disable-rule-generator --enable-hwdb --disable-selinux )
configure: WARNING: unrecognized options: --disable-gtk-doc,--disable-gtk-doc-html,--disable-doc,--disable-docs,--disable-documentation,--with-xmlto,--with-fop,--enable-ipv6,--disable-nls
checking for x86_64-buildroot-linux-uclibc-gcc... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc accepts -g... yes
checking for /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc option to accept ISO C89... none needed
checking whether /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc understands -c and -o together... yes
checking how to run the C preprocessor... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-buildroot-linux-uclibc-strip... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc... none
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-buildroot-linux-uclibc
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld
checking if the linker (/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-nm
checking the name lister (/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-buildroot-linux-uclibc format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld option to reload object files... -r
checking for x86_64-buildroot-linux-uclibc-objdump... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-buildroot-linux-uclibc-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64-buildroot-linux-uclibc-ar... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ar
checking for archiver @FILE support... @
checking for x86_64-buildroot-linux-uclibc-strip... (cached) /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-strip
checking for x86_64-buildroot-linux-uclibc-ranlib... /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ranlib
checking command to parse /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-nm output from /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for x86_64-buildroot-linux-uclibc-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc supports -fno-rtti -fno-exceptions... no
checking for /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc option to produce PIC... -fPIC -DPIC
checking if /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc PIC flag -fPIC -DPIC works... yes
checking if /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc static flag -static works... yes
checking if /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc supports -c -o file.o... yes
checking if /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc supports -c -o file.o... (cached) yes
checking whether the /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc linker (/home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether ln -s works... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for gawk... (cached) gawk
checking for /home/marlon/buildroot/output/host/bin/x86_64-buildroot-linux-uclibc-gcc option to accept ISO C99... unsupported
configure: error: no C99 compiler found,eudev requires a C99 compiler.
make: *** [package/pkg-generic.mk:240: /home/marlon/buildroot/output/build/eudev-3.2.10/.stamp_configured] Error 1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)