From f5c98d90a33ee0c6a7ff18dd84b8b02888fede95 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Thu, 1 Jan 2026 18:44:37 +0100 Subject: [PATCH] fix(ci): install Lua headers in SDK to prevent lucihttp compilation errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lucihttp package fails to compile in SDK environment with: fatal error: lua.h: No such file or directory Root cause: Even with CONFIG_PACKAGE_lucihttp disabled, if lucihttp is pulled as a dependency, it tries to compile but lacks Lua headers. Solution: 1. Install lua package in SDK which provides the required headers 2. Use standard OpenWrt format for disabling packages: "# CONFIG_PACKAGE_lucihttp is not set" instead of "=n" 3. lucihttp won't be compiled since it's disabled, but if somehow triggered as dependency, lua.h will be available Changes: - GitHub Actions workflow: Added "Install Lua in SDK" step - local-build.sh: Added lua installation after feeds install - Both: Changed to OpenWrt standard disable format This prevents the SDK build failure while keeping our packages (PKGARCH:=all scripts) working correctly. Fixes: #lucihttp-build-error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/build-openwrt-packages.yml | 17 +++++++++++++++-- secubox-tools/local-build.sh | 11 +++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-openwrt-packages.yml b/.github/workflows/build-openwrt-packages.yml index 5e954a0d..8358daf5 100644 --- a/.github/workflows/build-openwrt-packages.yml +++ b/.github/workflows/build-openwrt-packages.yml @@ -533,6 +533,18 @@ jobs: echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)" echo "They will be built regardless of dependency availability" + - name: Install Lua in SDK + run: | + cd sdk + + echo "📦 Installing Lua headers in SDK to prevent lucihttp compilation errors..." + + # Install lua package which provides headers needed by lucihttp + # This prevents lua.h missing error but we still don't want lucihttp compiled + ./scripts/feeds install lua + + echo "✅ Lua installed" + - name: Configure packages run: | cd sdk @@ -567,8 +579,9 @@ jobs: # Disable problematic packages that fail to compile in SDK # Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these - echo "CONFIG_PACKAGE_lucihttp=n" >> .config - echo "CONFIG_PACKAGE_cgi-io=n" >> .config + # Use OpenWrt standard format for disabling packages + echo "# CONFIG_PACKAGE_lucihttp is not set" >> .config + echo "# CONFIG_PACKAGE_cgi-io is not set" >> .config # Enable use of pre-built packages from feeds echo "CONFIG_FEED_packages=y" >> .config diff --git a/secubox-tools/local-build.sh b/secubox-tools/local-build.sh index f6945294..b932f50b 100755 --- a/secubox-tools/local-build.sh +++ b/secubox-tools/local-build.sh @@ -483,6 +483,12 @@ FEEDS print_warning "Feed installation had errors, checking if critical..." fi + # Install Lua to provide headers (prevents lua.h missing error in lucihttp) + echo "" + echo "📦 Installing Lua package for headers..." + ./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true + print_info "Lua installed (provides headers to prevent lucihttp compilation errors)" + # Note: We skip manual dependency installation as it causes hangs # The feeds install -a command above already installed all available packages # lucihttp and cgi-io will be disabled in .config to prevent compilation failures @@ -1052,6 +1058,11 @@ setup_openwrt_feeds() { print_warning "Feed install had warnings, checking directories..." fi + # Install Lua to provide headers (prevents lua.h missing error in lucihttp) + echo "" + print_info "Installing Lua package for headers..." + ./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true + # Verify feeds for feed in packages luci; do if [[ -d "feeds/$feed" ]]; then