Skip to content

webui编译失败 #91

@onlyJinx

Description

@onlyJinx

使用openwrt官方源码, 好像是少了文件 smartdns-1.2025.47/smartdns-webui/package.json

# Touch all files to set mtime to PKG_SOURCE_DATE_EPOCH for reproducible builds
find /home/new/openwrt/build_dir/target-x86_64_musl/linux-x86_64/base-files/ipkg-x86_64/base-files -exec touch -d "@1753632524" {} \;
/home/new/openwrt/staging_dir/host/bin/fakeroot /home/new/openwrt/staging_dir/host/bin/apk mkpkg --info "name:base-files" --info "version:1667~8f4f7cce76"  --info "description:This package contains a base filesystem and system scripts for OpenWrt." --info "arch:x86_64" --info "license:GPL-2.0" --info "origin:feeds/base/base-files" --info "url:http://openwrt.org/" --info "maintainer:" --info "provides:"  --script "post-install:/home/new/openwrt/build_dir/target-x86_64_musl/linux-x86_64/base-files/apk-x86_64/base-files/post-install" --script "post-upgrade:/home/new/openwrt/build_dir/target-x86_64_musl/linux-x86_64/base-files/apk-x86_64/base-files/post-upgrade" --script "pre-deinstall:/home/new/openwrt/build_dir/target-x86_64_musl/linux-x86_64/base-files/apk-x86_64/base-files/pre-deinstall" --info "depends:libc netifd jsonfilter usign openwrt-keyring fstools fwtool procd procd-seccomp busybox" --files "/home/new/openwrt/build_dir/target-x86_64_musl/linux-x86_64/base-files/ipkg-x86_64/base-files" --output "/home/new/openwrt/bin/targets/x86/64/packages/base-files-1667~8f4f7cce76.apk" --sign "/home/new/openwrt/private-key.pem"
echo "base-files" >> /home/new/openwrt/staging_dir/target-x86_64_musl/pkginfo/base-files.default.install
make[3]: Leaving directory '/home/new/openwrt/package/base-files'
time: package/base-files/compile#2.46#0.84#5.54
   Compiling bindgen-cli v0.72.1
    Finished `release` profile [optimized] target(s) in 52.47s
   Replacing /home/new/.cargo/bin/bindgen
    Replaced package `bindgen-cli v0.72.1` with `bindgen-cli v0.72.1` (executable `bindgen`)
warning: be sure to add `/home/new/.cargo/bin` to your PATH to be able to run the installed binaries
CARGO_BUILD_ARGS=" --profile release"
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl CARGO_HOME=/home/new/openwrt/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_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-openwrt-linux-musl-gcc RUSTFLAGS="-Ctarget-feature=-crt-static  -Clink-arg=-fuse-ld=bfd" TARGET_CC=x86_64-openwrt-linux-musl-gcc TARGET_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47=smartdns-1.2025.47 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CC=/home/new/openwrt/staging_dir/host/bin/gcc MAKEFLAGS="--jobserver-auth=3,4 " CARGO_BUILD_ARGS="" CC=x86_64-openwrt-linux-musl-gcc PATH="/home/new/openwrt/staging_dir/target-x86_64_musl/host/bin:/home/new/openwrt/staging_dir/hostpkg/bin:/home/new/openwrt/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:/home/new/openwrt/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:/home/new/openwrt/staging_dir/host/bin:/home/new/openwrt/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:/home/new/openwrt/staging_dir/host/bin:/home/new/openwrt/staging_dir/host/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/new/openwrt/dl/cargo/bin" AWS_LC_SYS_CFLAGS="-O0" make -C /home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/plugin/smartdns-ui
make[4]: Entering directory '/home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/plugin/smartdns-ui'
/bin/sh: 1: rustup: Permission denied
make[4]: rustup: Permission denied
MAKEFLAGS= RUSTFLAGS="-C target-feature=-crt-static -Ctarget-feature=-crt-static  -Clink-arg=-fuse-ld=bfd" BINDGEN_EXTRA_CLANG_ARGS="--sysroot=/home/new/openwrt/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/sys-include/.." cargo build --target=x86_64-unknown-linux-musl --release --features "build-release"
    Finished `release` profile [optimized] target(s) in 0.11s
cp target/x86_64-unknown-linux-musl/release/libsmartdns_ui.so target/smartdns_ui.so
make[4]: Leaving directory '/home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/plugin/smartdns-ui'
which npm || (echo "npm not found, please install npm first" && exit 1)
/usr/bin/npm
npm install --prefix /home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/smartdns-webui/
npm error code ENOENT
npm error syscall open
npm error path /home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/smartdns-webui/package.json
npm error errno -2
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/smartdns-webui/package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: /home/new/.npm/_logs/2025-10-02T08_21_45_204Z-debug-0.log
make[3]: *** [Makefile:149: /home/new/openwrt/build_dir/target-x86_64_musl/smartdns-1.2025.47/.built] Error 254
make[3]: Leaving directory '/home/new/openwrt/feeds/packages/net/smartdns'
time: package/feeds/packages/smartdns/compile#267.30#7.61#53.21
    ERROR: package/feeds/packages/smartdns failed to build.
make[2]: *** [package/Makefile:183: package/feeds/packages/smartdns/compile] Error 1
make[2]: Leaving directory '/home/new/openwrt'
make[1]: *** [package/Makefile:177: /home/new/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/new/openwrt'
make: *** [/home/new/openwrt/include/toplevel.mk:233: world] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions