fix(ci): install Lua headers in SDK to prevent lucihttp compilation errors
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 <noreply@anthropic.com>
This commit is contained in:
parent
dd588e0520
commit
f5c98d90a3
17
.github/workflows/build-openwrt-packages.yml
vendored
17
.github/workflows/build-openwrt-packages.yml
vendored
@ -533,6 +533,18 @@ jobs:
|
|||||||
echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)"
|
echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)"
|
||||||
echo "They will be built regardless of dependency availability"
|
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
|
- name: Configure packages
|
||||||
run: |
|
run: |
|
||||||
cd sdk
|
cd sdk
|
||||||
@ -567,8 +579,9 @@ jobs:
|
|||||||
|
|
||||||
# Disable problematic packages that fail to compile in SDK
|
# Disable problematic packages that fail to compile in SDK
|
||||||
# Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these
|
# Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these
|
||||||
echo "CONFIG_PACKAGE_lucihttp=n" >> .config
|
# Use OpenWrt standard format for disabling packages
|
||||||
echo "CONFIG_PACKAGE_cgi-io=n" >> .config
|
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
|
# Enable use of pre-built packages from feeds
|
||||||
echo "CONFIG_FEED_packages=y" >> .config
|
echo "CONFIG_FEED_packages=y" >> .config
|
||||||
|
|||||||
@ -483,6 +483,12 @@ FEEDS
|
|||||||
print_warning "Feed installation had errors, checking if critical..."
|
print_warning "Feed installation had errors, checking if critical..."
|
||||||
fi
|
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
|
# Note: We skip manual dependency installation as it causes hangs
|
||||||
# The feeds install -a command above already installed all available packages
|
# The feeds install -a command above already installed all available packages
|
||||||
# lucihttp and cgi-io will be disabled in .config to prevent compilation failures
|
# 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..."
|
print_warning "Feed install had warnings, checking directories..."
|
||||||
fi
|
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
|
# Verify feeds
|
||||||
for feed in packages luci; do
|
for feed in packages luci; do
|
||||||
if [[ -d "feeds/$feed" ]]; then
|
if [[ -d "feeds/$feed" ]]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user