文章目录
我在一次正常的编译过程中遇到了,如下的错误:
root@ubuntu:/home/liefyuan/Linux/rk356x_linux/buildroot# make -j16
make: Circular /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/iproute2-4.14.1/.stamp_configured <- busybox dependency dropped.
>>> popt 1.16 Extracting
gzip -d -c /home/liefyuan/Linux/rk356x_linux/buildroot/dl/popt-1.16.tar.gz | tar --strip-components=1 -C /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16 -xf -
gzip: /home/liefyuan/Linux/rk356x_linux/buildroot/dl/popt-1.16.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
package/pkg-generic.mk:159: recipe for target '/home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_extracted' failed
make: *** [/home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_extracted] Error 2
....
root@ubuntu:/home/liefyuan/Linux/rk356x_linux/buildroot# make popt-rebuild
rm -f /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_staging_installed
rm -f /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_target_installed
rm -f /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_images_installed
rm -f /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_host_installed
touch /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_built || true
rm -f /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_built
>>> popt 1.16 Extracting
gzip -d -c /home/liefyuan/Linux/rk356x_linux/buildroot/dl/popt-1.16.tar.gz | tar --strip-components=1 -C /home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16 -xf -
gzip: /home/liefyuan/Linux/rk356x_linux/buildroot/dl/popt-1.16.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
package/pkg-generic.mk:159: recipe for target '/home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_extracted' failed
make: *** [/home/liefyuan/Linux/rk356x_linux/buildroot/output/build/popt-1.16/.stamp_extracted] Error 2
总结来说就是:在解压 buildroot/dl/popt-1.16.tar.gz
这个文件的时候,解压命令不好使了,没法解压,不像是gzip的格式!
好,那我拷贝出来直接解压看看:
liefyuan@ubuntu:~/work$ tar -xf popt-1.16.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
liefyuan@ubuntu:~/work$ tar -zxf popt-1.16.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
使用file命令看一下文件格式:
liefyuan@ubuntu:~/work$ file popt-1.16.tar.gz
popt-1.16.tar.gz: HTML document, UTF-8 Unicode text, with very long lines
哦豁,这居然是个HTML文档!
我看看其他正常的压缩文件是咋样的
liefyuan@ubuntu:~/work$ file buildroot-2022.05.tar.gz
buildroot-2022.05.tar.gz: gzip compressed data, last modified: Mon Jun 6 20:21:50 2022, max compression, from Unix
没问题,说明就是那个压缩文件有问题!
去源地址下载
通过在buildroot/package/popt/popt.mk
文件可以知道:
################################################################################
#
# popt
#
################################################################################
POPT_VERSION = 1.16
POPT_SITE = http://rpm5.org/files/popt
POPT_INSTALL_STAGING = YES
POPT_LICENSE = MIT
POPT_LICENSE_FILES = COPYING
POPT_AUTORECONF = YES
POPT_GETTEXTIZE = YES
POPT_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
POPT_CONF_ENV = ac_cv_va_copy=yes
ifeq ($(BR2_PACKAGE_LIBICONV),y)
POPT_CONF_ENV += am_cv_lib_iconv=yes
POPT_CONF_OPTS += --with-libiconv-prefix=$(STAGING_DIR)/usr
POPT_DEPENDENCIES += libiconv
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))
文件地址在:http://rpm5.org/files/popt
文件2010年就在这里了,那应该文件没有问题!
我直接下载替换,看看情况
卧槽!直接下载的文件也不行啊!
liefyuan@ubuntu:~/work/qt-work$ tar -xvf popt-1.16.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
重新找到一个地址:http://ftp.rpm.org/popt/releases/historical/
这个网站下载的这个文件是没有问题的!
liefyuan@ubuntu:~/work/qt-work$ file popt-1.16.tar_2.gz
popt-1.16.tar_2.gz: gzip compressed data, last modified: Tue May 4 20:56:51 2010, max compression, from Unix
liefyuan@ubuntu:~/work/qt-work$ tar -xvf popt-1.16.tar.gz
popt-1.16/
popt-1.16/depcomp
popt-1.16/COPYING
popt-1.16/README
popt-1.16/popt.pc.in
....
直接替换进去试试
make popt-rebuild
没有问题!
估计是那个地址是有问题的!
把这个地址替换进去:http://ftp.rpm.org/popt/releases/historical/popt-1.16.tar.gz
替换:buildroot/package/popt/popt.mk
文件里面的下载地址!