From e78b723dd7d04a1308787a26ce2ce6cb812ec721 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 28 Dec 2025 11:13:35 +0100 Subject: [PATCH] fix(tools): Prevent lucihttp compilation failure in local-build.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applied same fix as GitHub Actions workflow to local build script. Problem: - lucihttp and cgi-io fail to compile in SDK environment - Missing lua.h headers cause: ninja: build stopped: subcommand failed - Our SecuBox packages are PKGARCH:=all (scripts only), don't need these Changes to secubox-tools/local-build.sh: 1. Removed lucihttp and cgi-io from build loop - Only build: lua, liblua, rpcd (essentials that work) - Skip: lucihttp, cgi-io (fail with missing lua.h) 2. Added configuration to disable problematic packages - Explicitly disable in .config: # CONFIG_PACKAGE_lucihttp is not set # CONFIG_PACKAGE_cgi-io is not set 3. Enabled use of pre-built packages from feeds - CONFIG_DEVEL=y - CONFIG_FEED_packages=y - CONFIG_FEED_luci=y 4. Updated dependency installation - Install lucihttp/cgi-io from feeds (for metadata) - But disable compilation to prevent SDK failures Result: - Local builds will no longer fail with "ninja: build stopped" - SDK uses pre-built dependencies instead of compiling - SecuBox packages (pure scripts) build successfully This matches the fix in .github/workflows/build-openwrt-packages.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- secubox-tools/local-build.sh | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/secubox-tools/local-build.sh b/secubox-tools/local-build.sh index b727386a..f3d1de42 100755 --- a/secubox-tools/local-build.sh +++ b/secubox-tools/local-build.sh @@ -459,21 +459,33 @@ FEEDS fi # Install critical dependencies explicitly + # Note: lucihttp and cgi-io are skipped - they fail to compile in SDK (missing lua.h) echo "" echo "📦 Installing LuCI and build dependencies..." - for dep in lua liblua luci-base lucihttp rpcd rpcd-mod-rrdns cgi-io libiwinfo ucode libucode rpcd-mod-luci; do + for dep in lua liblua luci-base rpcd rpcd-mod-rrdns libiwinfo ucode libucode rpcd-mod-luci; do echo " Installing $dep..." ./scripts/feeds install "$dep" 2>&1 | grep -v "WARNING:" || true done - # Build essential dependencies first + # Try to install lucihttp and cgi-io but don't fail if unavailable + # They will be disabled in configuration to prevent compilation failures + for dep in lucihttp cgi-io; do + echo " Installing $dep (will be disabled for compilation)..." + ./scripts/feeds install "$dep" 2>&1 | grep -v "WARNING:" || true + done + + # Build essential dependencies first (skip lucihttp and cgi-io - they fail in SDK) echo "" echo "🔨 Building essential dependencies..." - for dep in lua liblua lucihttp rpcd cgi-io; do + for dep in lua liblua rpcd; do echo " Building $dep..." make package/feeds/*/${dep}/compile V=s -j1 2>&1 | tail -5 || true done + # Note: lucihttp and cgi-io are skipped because they fail to compile in SDK + # Missing lua.h headers causes: ninja: build stopped: subcommand failed + # Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these + # Verify feeds echo "" echo "🔍 Verifying feed installation..." @@ -625,6 +637,21 @@ configure_packages() { done fi + # Disable problematic packages that fail to compile in SDK + # Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these + echo "" + echo "⚠️ Disabling packages that fail in SDK environment..." + echo "# CONFIG_PACKAGE_lucihttp is not set" >> .config + echo "# CONFIG_PACKAGE_cgi-io is not set" >> .config + print_info "lucihttp and cgi-io disabled (fail to compile: missing lua.h)" + + # Enable use of pre-built packages from feeds + echo "CONFIG_DEVEL=y" >> .config + echo "CONFIG_AUTOREBUILD=y" >> .config + echo "CONFIG_AUTOREMOVE=y" >> .config + echo "CONFIG_FEED_packages=y" >> .config + echo "CONFIG_FEED_luci=y" >> .config + make defconfig cd - > /dev/null