Fix Docker macOS timestamp issues and improve build reproducibility
- Add rsync-based source sync for Docker builds to fix macOS VirtioFS timestamp inconsistencies that caused autoconf sanity checks to fail - Add config.sub wrapper (SHELL/CONFIG_SHELL) to support emscripten/wasm32 targets without modifying submodule files - Fix protobuf build to use native gcc/g++ for protoc instead of Emscripten - Add python PATH fix for macOS (Homebrew's python3 symlink) in wxWidgets build 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5b919ef66f
commit
dafef9c0a1
9 changed files with 1937 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ RUN apt-get update && apt-get install -y \
|
|||
swig \
|
||||
unixodbc-dev \
|
||||
ccache \
|
||||
rsync \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure ccache for Emscripten
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@ fi
|
|||
# Start container if not running
|
||||
docker compose -f docker/docker-compose.yml up -d
|
||||
|
||||
# Sync source code to container volume (fixes macOS Docker timestamp issues)
|
||||
# This ensures timestamps are consistent within the container filesystem
|
||||
echo "Syncing source code to container..."
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
rsync -a --delete --exclude='build-wasm' --exclude='output' /workspace-host/ /workspace/
|
||||
|
||||
# Run build command (without asyncify - handled on host due to memory requirements)
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
/workspace/scripts/kicad/build-pcbnew.sh "${ARGS[@]}"
|
||||
|
|
|
|||
|
|
@ -13,8 +13,11 @@ services:
|
|||
memory: 32G
|
||||
|
||||
volumes:
|
||||
# Source code (read-only - all modifications happen in build-wasm volume)
|
||||
- ..:/workspace:ro
|
||||
# Host source mounted read-only at staging location
|
||||
# (rsync'd to /workspace on container start to fix macOS timestamp issues)
|
||||
- ..:/workspace-host:ro
|
||||
# Synced source in Docker volume (consistent timestamps)
|
||||
- workspace-src:/workspace
|
||||
# Named volume for build cache (faster than bind mount on macOS)
|
||||
- kicad-build-cache:/workspace/build-wasm
|
||||
# Output directory for easy access to final WASM files
|
||||
|
|
@ -26,3 +29,4 @@ services:
|
|||
|
||||
volumes:
|
||||
kicad-build-cache:
|
||||
workspace-src:
|
||||
|
|
|
|||
|
|
@ -4,5 +4,17 @@ set -e
|
|||
# Source Emscripten environment
|
||||
source /emsdk/emsdk_env.sh 2>/dev/null
|
||||
|
||||
# Sync source from host to workspace volume
|
||||
# This fixes macOS Docker timestamp issues with bind mounts
|
||||
# (autoconf sanity checks fail when timestamps appear inconsistent)
|
||||
if [[ -d /workspace-host ]]; then
|
||||
echo "Syncing source code to container volume..."
|
||||
rsync -a --delete \
|
||||
--exclude='build-wasm' \
|
||||
--exclude='output' \
|
||||
/workspace-host/ /workspace/
|
||||
echo "Sync complete."
|
||||
fi
|
||||
|
||||
# Execute command or start shell
|
||||
exec "$@"
|
||||
|
|
|
|||
Loading…
Reference in a new issue