Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译错误 target aarch64 软件包 xfsprogs #11777

Closed
1 task done
ghost opened this issue Jan 14, 2024 · 6 comments
Closed
1 task done

编译错误 target aarch64 软件包 xfsprogs #11777

ghost opened this issue Jan 14, 2024 · 6 comments

Comments

@ghost
Copy link

ghost commented Jan 14, 2024

详细叙述

我认为是代码bug导致的。

重复 issue

  • 没有类似的 issue

具体型号

斐讯n1

详细日志

make[3]: Entering directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/feeds/packages/utils/xfsprogs'
rm -f /home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0/.built
touch /home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0/.built_check
CFLAGS="-Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0=xfsprogs-5.9.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DHAVE_MAP_SYNC -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/usr/include -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/include/fortify -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/include " CXXFLAGS="-Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0=xfsprogs-5.9.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DHAVE_MAP_SYNC -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/usr/include -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/include/fortify -I/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/include " LDFLAGS="-L/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/usr/lib -L/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib -znow -zrelro " make -C /home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0/. AR="aarch64-openwrt-linux-musl-gcc-ar" AS="aarch64-openwrt-linux-musl-gcc -c -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0=xfsprogs-5.9.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DHAVE_MAP_SYNC" LD=aarch64-openwrt-linux-musl-ld NM="aarch64-openwrt-linux-musl-gcc-nm" CC="aarch64-openwrt-linux-musl-gcc" GCC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" STRIP=aarch64-openwrt-linux-musl-strip OBJCOPY=aarch64-openwrt-linux-musl-objcopy OBJDUMP=aarch64-openwrt-linux-musl-objdump SIZE=aarch64-openwrt-linux-musl-size CROSS="aarch64-openwrt-linux-musl-" ARCH="aarch64" ;
make[4]: Entering directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0'
[HEADERS] include
[HEADERS] libxfs
Building include
Building libfrog
Building libxfs
[CC] rdwr.lo
rdwr.c: In function 'libxfs_bcompare':
rdwr.c:338:12: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'pthread_t' {aka 'struct __pthread *'} [-Wformat=]
338 | "%lx: Badness in key lookup (length)\n"
| ~~^
| |
| long unsigned int
339 | "bp=(bno 0x%llx, len %u bytes) key=(bno 0x%llx, len %u bytes)\n",
340 | pthread_self(),
| ~~~~~~~~~~~~~~
| |
| pthread_t {aka struct __pthread *}
rdwr.c: At top level:
rdwr.c:725:40: error: unknown type name 'off64_t'; did you mean 'off_t'?
725 | __read_buf(int fd, void *buf, int len, off64_t offset, int flags)
| ^~~~~~~
| off_t
rdwr.c: In function 'libxfs_readbufr':
rdwr.c:753:17: warning: implicit declaration of function '__read_buf' [-Wimplicit-function-declaration]
753 | error = __read_buf(fd, bp->b_addr, bytes, LIBXFS_BBTOOFF64(blkno), flags);
| ^~~~~~~~~~
rdwr.c: In function 'libxfs_readbufr_map':
rdwr.c:793:17: error: unknown type name 'off64_t'; did you mean 'off_t'?
793 | off64_t offset = LIBXFS_BBTOOFF64(bp->b_maps[i].bm_bn);
| ^~~~~~~
| off_t
rdwr.c: At top level:
rdwr.c:962:41: error: unknown type name 'off64_t'; did you mean 'off_t'?
962 | __write_buf(int fd, void *buf, int len, off64_t offset, int flags)
| ^~~~~~~
| off_t
rdwr.c: In function 'libxfs_bwrite':
rdwr.c:1015:31: warning: implicit declaration of function '__write_buf'; did you mean '__initbuf'? [-Wimplicit-function-declaration]
1015 | bp->b_error = __write_buf(fd, bp->b_addr, bp->b_bcount,
| ^~~~~~~~~~~
| __initbuf
rdwr.c:1022:25: error: unknown type name 'off64_t'; did you mean 'off_t'?
1022 | off64_t offset = LIBXFS_BBTOOFF64(bp->b_maps[i].bm_bn);
| ^~~~~~~
| off_t
gmake[6]: *** [../include/buildrules:75: rdwr.lo] Error 1
gmake[5]: *** [include/buildrules:36: libxfs] Error 2
make[4]: *** [Makefile:91: default] Error 2
make[4]: Leaving directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0'
make[3]: *** [Makefile:98: /home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/build_dir/target-aarch64_generic_musl/xfsprogs-5.9.0/.built] Error 2
make[3]: Leaving directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/feeds/packages/utils/xfsprogs'
time: package/feeds/packages/xfsprogs/compile#0.93#0.54#1.45
ERROR: package/feeds/packages/xfsprogs failed to build.
make[2]: *** [package/Makefile:116: package/feeds/packages/xfsprogs/compile] Error 1
make[2]: Leaving directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt'
make[1]: *** [package/Makefile:110: /home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/staging_dir/target-aarch64_generic_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt'
make: *** [/home/runner/work/actions-openwrt-phicomm-n1/actions-openwrt-phicomm-n1/openwrt/include/toplevel.mk:231: world] Error 2
Error: Process completed with exit code 2.

@lirg-111
Copy link

ERROR: modpost: "ar8337_chip" [drivers/net/phy/ar8216.ko] undefined!
ERROR: modpost: "ar8327_chip" [drivers/net/phy/ar8216.ko] undefined!
ERROR: modpost: "ar8xxx_mii_read32" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8236_mibs" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_attr_vlan" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_get_pvid" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_set_pvid" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_reset_switch" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_get_port_link" [drivers/net/phy/ar8327.ko] undefined!
ERROR: modpost: "ar8xxx_sw_get_port_stats" [drivers/net/phy/ar8327.ko] undefined!
WARNING: modpost: suppressed 32 unresolved symbol warnings because there were too many)
make[7]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1
make[6]: *** [/home/matt/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.10/Makefile:1865: modpost] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[5]: Leaving directory '/home/matt/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.10'
make[4]: *** [Makefile:29: /home/matt/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.10/.modules] Error 2
make[4]: Leaving directory '/home/matt/lede/target/linux/x86'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/home/matt/lede/target/linux'
time: target/linux/compile#1136.21#112.30#1254.12
ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:30: target/linux/compile] Error 1
make[2]: Leaving directory '/home/matt/lede'
make[1]: *** [target/Makefile:23: /home/matt/lede/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/matt/lede'
make: *** [/home/matt/lede/include/toplevel.mk:231:world] 错误 2

@wekingchen
Copy link

请问楼主怎么解决这个问题的?

@ghost
Copy link
Author

ghost commented Jan 18, 2024

请问楼主怎么解决这个问题的?

没有解决,没有修复。

@wekingchen
Copy link

请问楼主怎么解决这个问题的?

没有解决,没有修复。

我倒是解决了,方法是把packages/utils/xfsprogs/Makefile里的-DHAVE_MAP_SYNC/TARGET_CFLAGS一行改为-DHAVE_MAP_SYNC -D_LARGEFILE64_SOURCE,可以试试看

@woni928
Copy link

woni928 commented Jan 21, 2024

请问楼主这个问题怎么解决?

没有解决,没有修复。

我倒是解决了,方法就是把packages/utils/xfsprogs/Makefile里的-DHAVE_MAP_SYNC/TARGET_CFLAGS一行改为-DHAVE_MAP_SYNC -D_LARGEFILE64_SOURCE,可以试试看

云编译的话。这个命令应该怎么写?感谢!

@wekingchen
Copy link

请问楼主这个问题怎么解决?

没有解决,没有修复。

我倒是解决了,方法就是把packages/utils/xfsprogs/Makefile里的-DHAVE_MAP_SYNC/TARGET_CFLAGS一行改为-DHAVE_MAP_SYNC -D_LARGEFILE64_SOURCE,可以试试看

云编译的话。这个命令应该怎么写?感谢!

P3TERX的方案的话,diy-part2.sh加一句

sed -i 's/TARGET_CFLAGS += -DHAVE_MAP_SYNC/TARGET_CFLAGS += -DHAVE_MAP_SYNC -D_LARGEFILE64_SOURCE/' feeds/packages/utils/xfsprogs/Makefile

注意自己xfsprogs的位置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants