Luckfox Pico RV1103编译rootfs的时候出现host-attr-2.5.1错误

2024-03-09 08:55:34 提问

make[5]: Entering directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1'

set -e; \

cd "/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/share/man"; \

for d in man/man1/attr.1 man/man1/getfattr.1 man/man1/setfattr.1 man/man3/attr_get.3 man/man3/attr_list.3 man/man3/attr_multi.3 man/man3/attr_remove.3 man/man3/attr_set.3; do \

       man_section=${d##*.}; \

       d=${d#man/}; \

       dst=${d##*/}; \

       for m in `gawk \

               '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $d \

               | /usr/bin/sed \

                       -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \

                       -e 's/\\\f[0-9]//g' -e 's/  / /g;q'`; \

       do \

               [ "$m" = "\\" ] && continue; \

               ln="man$man_section/$m.$man_section"; \

               [ -e "$ln" ] && continue; \

               echo cp -pR $dst $ln; \

               cp -pR $dst $ln; \

       done; \

done

libtool: finish: PATH="/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/sbin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/tools/pc/toolkits:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/tools/pc/uboot_tools:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/out/bin/pc:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/output/out/sysdrv_out/pc:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/lib

/sbin/ldconfig.real: /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/lib/libattr.so.1 is not a symbolic link


----------------------------------------------------------------------

Libraries have been installed in:

  /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/lib


If you ever happen to want to link against installed libraries

in a given directory, LIBDIR, you must either use libtool, and

specify the full pathname of the library, or use the '-LLIBDIR'

flag during linking and do at least one of the following:

  - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable

    during execution

  - add LIBDIR to the 'LD_RUN_PATH' environment variable

    during linking

  - use the '-Wl,-rpath -Wl,LIBDIR' linker flag

  - have your system administrator add LIBDIR to '/etc/ld.so.conf'


See any operating system documentation about shared libraries for

more information, such as the ld(1) and ld.so(8) manual pages.

----------------------------------------------------------------------

/usr/bin/mkdir -p '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin'

cp -pR attr_get.3 man3/attr_getf.3

cp: cannot stat 'attr_get.3': No such file or directory

make[5]: *** [Makefile:1883: install-data-hook] Error 1

make[5]: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1'

make[4]: *** [Makefile:1764: install-data-am] Error 2

make[4]: *** Waiting for unfinished jobs....

 /bin/bash ./libtool   --mode=install /usr/bin/install -c attr getfattr setfattr '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin'

libtool: install: /usr/bin/install -c attr /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin/attr

libtool: install: /usr/bin/install -c getfattr /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin/getfattr

libtool: install: /usr/bin/install -c setfattr /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/bin/setfattr

make[4]: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1'

make[3]: *** [Makefile:1691: install-am] Error 2

make[3]: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1'

make[2]: *** [Makefile:1229: install-recursive] Error 1

make[2]: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1'

make[1]: *** [package/pkg-generic.mk:303: /mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/host-attr-2.5.1/.stamp_host_installed] Error 2

make[1]: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6'

make: *** [Makefile:524: buildroot] Error 2

make: Leaving directory '/mnt/e/VirtualBox_VMs/luckfox/luckfox-pico/sysdrv'

[build.sh:error] Running build_rootfs failed!

[build.sh:error] exit code 2 from line 549:

Luckfox Pico RV1103编译rootfs host-attr-2.5.1错误
我来答
浏览 1275 次
已有3个回答
斑梨游客163f5
回答时间:
2024-03-09 10:34:15

这个错误是由于在编译host-attr-2.5.1的时候,缺少了一个文件attr_get.3,导致cp命令失败。这个文件是一个man手册的源文件,用于生成man文档。这个文件在attr的源码包中是存在的,但是在buildroot的下载源中被删除了,可能是因为buildroot认为这个文件不是必要的。

为了解决这个问题,您可以尝试以下几种方法:

•  方法一:从attr的官方网站https://blog.csdn.net/qq_28877125/article/details/132999147下载attr-2.5.1.tar.gz源码包,解压后找到attr_get.3文件,复制到buildroot的host-attr-2.5.1目录下的man/man3子目录中,然后重新编译。

•  方法二:修改buildroot的host-attr-2.5.1的Makefile文件,注释掉或删除第1883行的cp -pR attr_get.3 man3/attr_getf.3命令,这样就不会执行这个命令,也不会报错,然后重新编译。

•  方法三:修改buildroot的host-attr-2.5.1的configure.ac文件,将第20行的AM_MAINTAINER_MODE([enable])改为AM_MAINTAINER_MODE([disable]),这样就不会执行install-data-hook这个目标,也不会报错,然后重新编译。

点赞0

举报

斑梨游客4aa55
回答时间:
2024-03-09 22:48:35

我尝试着修改过host-attr-2.5.1的Makefile文件,但是运行build.sh的时候,会重新从网上下载 host-attr 2.5.1,重新解压、编译,会将我修改的Makefile覆盖。有什么办法可以不重新下载 host-attr 2.5.1么?

点赞0

举报

斑梨用户8
回答时间:
2024-03-11 13:10:34

】一种可能的方法是,在运行 build.sh 之前,将你修改过的 Makefile 文件备份到另一个地方,然后在 build.sh 完成后,再将你的 Makefile 文件复制回原来的位置,覆盖掉 build.sh 下载的文件。这样你就可以保留你的修改,而不影响 build.sh 的其他功能。

】另一种可能的方法是,修改 build.sh 的脚本,让它不要重新下载 host-attr 2.5.1,或者在下载后不要解压和编译。这样你就可以避免 build.sh 覆盖你的 Makefile 文件。不过,这种方法需要你对 build.sh 的脚本有一定的了解,以免造成其他的错误。

如果你想了解更多关于如何修改 Makefile 文件的方法,你可以参考以下的一些网页:

https://blog.csdn.net/weixin_45690176/article/details/106556371

点赞0

举报