Encountered 2 build errors
goediy opened this issue · 2 comments
When I built from scratch with the default settings, I first encountered the following error:
>>> uboot v2021.01-f1c100s-4 Building
PATH="/home/vagrant/buildroot-2020.02/output/host/bin:/home/vagrant/buildroot-2020.02/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" AR="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-ar" AS="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-as" LD="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-ld" NM="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-nm" CC="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-gcc" GCC="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-gcc" CPP="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-cpp" CXX="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-g++" FC="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-gfortran" F77="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-gfortran" RANLIB="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-ranlib" READELF="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-readelf" STRIP="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-strip" OBJCOPY="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-objcopy" OBJDUMP="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-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/vagrant/buildroot-2020.02/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/home/vagrant/buildroot-2020.02/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/home/vagrant/buildroot-2020.02/output/host/include" LDFLAGS_FOR_BUILD="-L/home/vagrant/buildroot-2020.02/output/host/lib -Wl,-rpath,/home/vagrant/buildroot-2020.02/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-as" DEFAULT_LINKER="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-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 -g2 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 " LDFLAGS="" FCFLAGS=" -Os -g2" FFLAGS=" -Os -g2" PKG_CONFIG="/home/vagrant/buildroot-2020.02/output/host/bin/pkg-config" STAGING_DIR="/home/vagrant/buildroot-2020.02/output/host/arm-buildroot-linux-gnueabi/sysroot" INTLTOOL_PERL=/usr/bin/perl /usr/bin/make -j2 -C /home/vagrant/buildroot-2020.02/output/build/uboot-v2021.01-f1c100s-4 CROSS_COMPILE="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-" ARCH=arm HOSTCC="/usr/bin/gcc -O2 -isystem /home/vagrant/buildroot-2020.02/output/host/include" HOSTLDFLAGS="-L/home/vagrant/buildroot-2020.02/output/host/lib -Wl,-rpath,/home/vagrant/buildroot-2020.02/output/host/lib" all
scripts/kconfig/conf --syncconfig Kconfig
UPD include/config.h
GEN include/autoconf.mk.dep
CFG u-boot.cfg
CFG spl/u-boot.cfg
GEN include/autoconf.mk
GEN spl/include/autoconf.mk
UPD include/generated/timestamp_autogenerated.h
UPD include/generated/dt.h
UPD include/config/uboot.release
UPD include/generated/version_autogenerated.h
SHIPPED scripts/dtc/pylibfdt/libfdt.i
rm -f scripts/dtc/pylibfdt/_libfdt*.so
PYMOD scripts/dtc/pylibfdt/_libfdt.so
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
Traceback (most recent call last):
File "scripts/dtc/pylibfdt/setup.py", line 21, in <module>
from distutils.core import setup, Extension
ModuleNotFoundError: No module named 'distutils.core'
scripts/dtc/pylibfdt/Makefile:27: recipe for target 'scripts/dtc/pylibfdt/_libfdt.so' failed
make[5]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
scripts/Makefile.build:419: recipe for target 'scripts/dtc/pylibfdt' failed
make[4]: *** [scripts/dtc/pylibfdt] Error 2
make[4]: *** Waiting for unfinished jobs....
===================== WARNING ======================
This board does not use CONFIG_DM_MMC. Please update
the board to use CONFIG_DM_MMC before the v2019.04 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================
===================== WARNING ======================
This board does not use CONFIG_DM_USB. Please update
the board to use CONFIG_DM_USB before the v2019.07 release.
Failure to update by the deadline may result in board removal.
scripts/Makefile.build:419: recipe for target 'scripts/dtc' failed
make[3]: *** [scripts/dtc] Error 2
Makefile:577: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs....
See doc/driver-model/migration.rst for more info.
====================================================
package/pkg-generic.mk:266: recipe for target '/home/vagrant/buildroot-2020.02/output/build/uboot-v2021.01-f1c100s-4/.stamp_built' failed
make[1]: *** [/home/vagrant/buildroot-2020.02/output/build/uboot-v2021.01-f1c100s-4/.stamp_built] Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
After investigating the log above, it turned out to be a Python script error.
Traceback (most recent call last):
File "scripts/dtc/pylibfdt/setup.py", line 21, in <module>
from distutils.core import setup, Extension
ModuleNotFoundError: No module named 'distutils.core'
So, I installed additional packages.
$ sudo apt install python3-distutils python3-dev
The above error disappeared after the installation, but another error occurred as below.
>>> linux v5.11-nano-3 Configuring
>>> linux v5.11-nano-3 Building
cp -f /vagrant/board/licheepi_nano/suniv-f1c100s-licheepi-nano-custom.dts /home/vagrant/buildroot-2020.02/output/build/linux-v5.11-nano-3/arch/arm/boot/dts/
PATH="/home/vagrant/buildroot-2020.02/output/host/bin:/home/vagrant/buildroot-2020.02/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/vagrant/buildroot-2020.02/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/vagrant/buildroot-2020.02/output/host/lib/pkgconfig:/home/vagrant/buildroot-2020.02/output/host/share/pkgconfig" BR_BINARIES_DIR=/home/vagrant/buildroot-2020.02/output/images KCFLAGS=-Wno-attribute-alias /usr/bin/make -j2 HOSTCC="/usr/bin/gcc -O2 -I/home/vagrant/buildroot-2020.02/output/host/include -L/home/vagrant/buildroot-2020.02/output/host/lib -Wl,-rpath,/home/vagrant/buildroot-2020.02/output/host/lib" ARCH=arm INSTALL_MOD_PATH=/home/vagrant/buildroot-2020.02/output/target CROSS_COMPILE="/home/vagrant/buildroot-2020.02/output/host/bin/arm-buildroot-linux-gnueabi-" DEPMOD=/home/vagrant/buildroot-2020.02/output/host/sbin/depmod INSTALL_MOD_STRIP=1 -C /home/vagrant/buildroot-2020.02/output/build/linux-v5.11-nano-3 all
SYNC include/config/auto.conf.cmd
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/expr.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
SYSHDR arch/arm/include/generated/uapi/asm/unistd-common.h
WRAP arch/arm/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm/include/generated/uapi/asm/bitsperlong.h
WRAP arch/arm/include/generated/uapi/asm/bpf_perf_event.h
SYSHDR arch/arm/include/generated/uapi/asm/unistd-oabi.h
WRAP arch/arm/include/generated/uapi/asm/errno.h
WRAP arch/arm/include/generated/uapi/asm/ioctl.h
WRAP arch/arm/include/generated/uapi/asm/ipcbuf.h
WRAP arch/arm/include/generated/uapi/asm/msgbuf.h
WRAP arch/arm/include/generated/uapi/asm/param.h
WRAP arch/arm/include/generated/uapi/asm/poll.h
WRAP arch/arm/include/generated/uapi/asm/resource.h
WRAP arch/arm/include/generated/uapi/asm/sembuf.h
WRAP arch/arm/include/generated/uapi/asm/shmbuf.h
SYSHDR arch/arm/include/generated/uapi/asm/unistd-eabi.h
WRAP arch/arm/include/generated/uapi/asm/siginfo.h
WRAP arch/arm/include/generated/uapi/asm/socket.h
WRAP arch/arm/include/generated/uapi/asm/sockios.h
WRAP arch/arm/include/generated/uapi/asm/termbits.h
WRAP arch/arm/include/generated/uapi/asm/termios.h
HOSTCC scripts/dtc/dtc.o
UPD include/config/kernel.release
WRAP arch/arm/include/generated/asm/early_ioremap.h
WRAP arch/arm/include/generated/asm/extable.h
WRAP arch/arm/include/generated/asm/flat.h
WRAP arch/arm/include/generated/asm/parport.h
WRAP arch/arm/include/generated/asm/compat.h
WRAP arch/arm/include/generated/asm/current.h
WRAP arch/arm/include/generated/asm/emergency-restart.h
WRAP arch/arm/include/generated/asm/exec.h
WRAP arch/arm/include/generated/asm/irq_regs.h
WRAP arch/arm/include/generated/asm/kdebug.h
WRAP arch/arm/include/generated/asm/kmap_size.h
WRAP arch/arm/include/generated/asm/local.h
WRAP arch/arm/include/generated/asm/local64.h
WRAP arch/arm/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm/include/generated/asm/mmiowb.h
WRAP arch/arm/include/generated/asm/msi.h
WRAP arch/arm/include/generated/asm/preempt.h
WRAP arch/arm/include/generated/asm/rwonce.h
WRAP arch/arm/include/generated/asm/serial.h
HOSTCC scripts/dtc/flattree.o
WRAP arch/arm/include/generated/asm/simd.h
WRAP arch/arm/include/generated/asm/trace_clock.h
UPD include/generated/uapi/linux/version.h
UPD include/generated/utsrelease.h
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.[ch]
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
HOSTCC scripts/kallsyms
DTC arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/extract-cert
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
#include <openssl/bio.h>
^~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.host:95: recipe for target 'scripts/extract-cert' failed
make[3]: *** [scripts/extract-cert] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:1185: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
package/pkg-generic.mk:266: recipe for target '/home/vagrant/buildroot-2020.02/output/build/linux-v5.11-nano-3/.stamp_built' failed
make[1]: *** [/home/vagrant/buildroot-2020.02/output/build/linux-v5.11-nano-3/.stamp_built] Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
This also seemed to be due to a lack of a package, so I solved it by doing:
$ sudo apt install libssl-dev
After this, the build was perfect.
I don't know how to fix these problems permanently, so I just report them.
Hi Ken, thanks for sharing the build output and your commands that fixed it. I will update the docs soonish.
Hi can this issue be closed now as these 3 dependencies have already been added to README.md
Please note libssl-dev is mentioned in both the first and the second batch of dependencies