lede icon indicating copy to clipboard operation
lede copied to clipboard

编译nmap出错

Open stonemate opened this issue 4 months ago • 1 comments

详细叙述

最近在编译固件的时候,发现如果勾选python3 后编译会报错nmap编译失败,但是并没有勾选nmap套件,咨询AI后AI给出答案:

  1. 编译luci-app-wol的时候会自动编译nmap,所以在编译nmap时报错
  2. 错是因为nmap的版本比较低所致

请大神们帮忙参考上述AI建议查看报错信息并规划修复

重复 issue

  • [x] 没有类似的 issue

具体型号

R2S

详细日志

Compiling nmap rm -f nmap aarch64-openwrt-linux-musl-g++ -L/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib -L/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib -L/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib -L/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib -Wl,-E -L/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/usr/lib -L/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/lib -fuse-ld=bfd -znow -zrelro -L/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib -Lnbase -Lnsock/src/ -o nmap charpool.o FingerPrintResults.o FPEngine.o FPModel.o idle_scan.o MACLookup.o nmap_dns.o nmap_error.o nmap.o nmap_ftp.o NmapOps.o NmapOutputTable.o nmap_tty.o osscan2.o osscan.o output.o payload.o portlist.o portreasons.o protocols.o scan_engine.o scan_engine_connect.o scan_engine_raw.o scan_lists.o service_scan.o services.o string_pool.o NewTargets.o TargetGroup.o Target.o targets.o tcpip.o timing.o traceroute.o utils.o xml.o nse_main.o nse_utility.o nse_nsock.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_pcrelib.o nse_lpeg.o nse_openssl.o nse_ssl_cert.o nse_libssh2.o nse_zlib.o main.o -lnsock -lnbase -lpcre -lpcap -lssh2 -lssl -lcrypto -lz libnetutil/libnetutil.a ./libdnet-stripped/src/.libs/libdnet.a ./liblinear/liblinear.a -llua5.3 cd ncat && make make[5]: Entering directory '/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/ncat' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/ncat' make[4]: Leaving directory '/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91' cd "/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91" && CC="aarch64-openwrt-linux-musl-gcc" CCSHARED="aarch64-openwrt-linux-musl-gcc -DPIC -fPIC" CXX="aarch64-openwrt-linux-musl-g++" LD="aarch64-openwrt-linux-musl-gcc" LDSHARED="aarch64-openwrt-linux-musl-gcc -shared" CFLAGS="-Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91=nmap-7.91 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CPPFLAGS="-I/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/usr/include -I/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include -I/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include/fortify -I/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/include/python3.11" LDFLAGS="-L/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/usr/lib -L/home/shell/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/lib -fuse-ld=bfd -znow -zrelro -lpython3.11" _PYTHON_HOST_PLATFORM="linux-aarch64" _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata__linux_aarch64-linux-musl" PYTHONPATH="/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib/python3.11:/home/shell/lede/staging_dir/target-aarch64_generic_musl//usr/lib/python3.11/site-packages:/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/ipkg-install//usr/lib/python3.11/site-packages" PYTHONDONTWRITEBYTECODE=1 _python_sysroot="/home/shell/lede/staging_dir/target-aarch64_generic_musl" _python_prefix="/usr" _python_exec_prefix="/usr" CARGO_BUILD_TARGET=aarch64-unknown-linux-musl CARGO_HOME=/home/shell/lede/dl/cargo CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_DEBUG=false CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=false CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS=true CARGO_PROFILE_RELEASE_PANIC=unwind CARGO_PROFILE_RELEASE_RPATH=false CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-openwrt-linux-musl-gcc RUSTFLAGS="-Ctarget-feature=-crt-static -lssp_nonshared -Clink-arg=-fuse-ld=bfd" TARGET_CC=aarch64-openwrt-linux-musl-gcc TARGET_CFLAGS="-Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91=nmap-7.91 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -mno-outline-atomics" PYO3_CROSS_LIB_DIR="/home/shell/lede/staging_dir/target-aarch64_generic_musl/usr/lib/python3.11" SETUPTOOLS_RUST_CARGO_PROFILE="release" /home/shell/lede/staging_dir/hostpkg/bin/python3.11 -m build --no-isolation --outdir "/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/ndiff"/openwrt-build --wheel "/home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/ndiff"

  • Getting build dependencies for wheel... running egg_info writing ndiff.egg-info/PKG-INFO writing dependency_links to ndiff.egg-info/dependency_links.txt writing top-level names to ndiff.egg-info/top_level.txt reading manifest file 'ndiff.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'ndiff.egg-info/SOURCES.txt'
  • Building wheel... running bdist_wheel running build running build_py warning: build_py: byte-compiling is disabled, skipping.

running build_scripts copying and adjusting scripts/ndiff -> build/scripts-3.11 running install running install_lib warning: install_lib: byte-compiling is disabled, skipping.

running install_scripts running egg_info writing ndiff.egg-info/PKG-INFO writing dependency_links to ndiff.egg-info/dependency_links.txt writing top-level names to ndiff.egg-info/top_level.txt reading manifest file 'ndiff.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'ndiff.egg-info/SOURCES.txt' copying build/scripts-3.11/ndiff -> build/bdist.linux-aarch64/wheel/ndiff-0.0.0.data/scripts changing mode of build/bdist.linux-aarch64/wheel/ndiff-0.0.0.data/scripts/ndiff to 755 running install_data running install_egg_info Traceback (most recent call last): File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 412, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir self.run_setup() File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 484, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/build_meta.py", line 335, in run_setup exec(code, locals()) File "", line 307, in File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 403, in run self.run_command("install") File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/shell/lede/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "", line 135, in run File "", line 183, in create_uninstaller File "", line 59, in path_strip_prefix AssertionError

ERROR Backend subprocess exited when trying to invoke build_wheel make[3]: *** [Makefile:198: /home/shell/lede/build_dir/target-aarch64_generic_musl/nmap-full/nmap-7.91/.built] Error 1 make[3]: Leaving directory '/home/shell/lede/feeds/packages/net/nmap' time: package/feeds/packages/nmap/full/compile#3.21#0.72#4.17 ERROR: package/feeds/packages/nmap failed to build (build variant: full). make[2]: *** [package/Makefile:116: package/feeds/packages/nmap/compile] Error 1 make[2]: Leaving directory '/home/shell/lede' make[1]: *** [package/Makefile:110: /home/shell/lede/staging_dir/target-aarch64_generic_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/shell/lede' make: *** [/home/shell/lede/include/toplevel.mk:231: world] Error 2 shell@N6-Co-compiler:~/lede$

stonemate avatar Oct 12 '25 16:10 stonemate

更新 feeds

coolsnowwolf avatar Oct 13 '25 09:10 coolsnowwolf