Fix component build issues

- Add binary detection logic for RFS build to handle different binary names
- Remove non-existent 'vendored-openssl' feature from mycelium build
- Add debugging output to show actual build results
This commit is contained in:
2025-08-16 20:23:25 +02:00
parent 99485106d3
commit 23180a1b0e

View File

@@ -59,12 +59,29 @@ build_rust_component() {
# Build with musl target for static linking
cargo build --release --target x86_64-unknown-linux-musl
# Install binary to Alpine root
mkdir -p "$ALPINE_ROOT$install_path"
cp "target/x86_64-unknown-linux-musl/release/$binary_name" "$ALPINE_ROOT$install_path/"
chmod +x "$ALPINE_ROOT$install_path/$binary_name"
# Debug: Check what was actually built
echo " Checking build results..."
ls -la target/x86_64-unknown-linux-musl/release/ | grep -v "\.d$" | grep -v "\.rlib$" || true
echo " Success: $install_path/$binary_name installed to Alpine root (musl static)"
# Try to find the actual binary (might have different name)
local actual_binary=""
if [ -f "target/x86_64-unknown-linux-musl/release/$binary_name" ]; then
actual_binary="$binary_name"
else
# Look for executable files that might be our binary
actual_binary=$(find target/x86_64-unknown-linux-musl/release/ -maxdepth 1 -type f -executable ! -name "*.d" | head -1 | xargs basename 2>/dev/null || echo "")
fi
if [ -n "$actual_binary" ] && [ -f "target/x86_64-unknown-linux-musl/release/$actual_binary" ]; then
# Install binary to Alpine root
mkdir -p "$ALPINE_ROOT$install_path"
cp "target/x86_64-unknown-linux-musl/release/$actual_binary" "$ALPINE_ROOT$install_path/$binary_name"
chmod +x "$ALPINE_ROOT$install_path/$binary_name"
echo " Success: $install_path/$binary_name installed to Alpine root (musl static, actual binary: $actual_binary)"
else
echo " Error: No executable binary found in target/x86_64-unknown-linux-musl/release/"
return 1
fi
return 0
}
@@ -142,7 +159,8 @@ build_mycelium_component() {
. ~/.cargo/env
# Build with musl target for static linking from myceliumd directory
cargo build --release --target x86_64-unknown-linux-musl --features vendored-openssl
# Note: Removed --features vendored-openssl as it doesn't exist in current version
cargo build --release --target x86_64-unknown-linux-musl
# Debug: Check what was actually built
echo " Checking build results..."