Skip to content

Commit 1da5382

Browse files
committed
Fix Docker container dependencies and improve LaTeX error reporting
Docker improvements: - Add pkg-config, libcairo2-dev, libgirepository1.0-dev to system dependencies - Add pycairo to Python dependencies in Docker image - Replace runtime dependency installation with verification step Build script improvements: - Enhanced LaTeX error reporting with categorized error analysis - Show critical errors, undefined control sequences, and missing files - Provide clearer debugging information for LaTeX compilation failures These changes should resolve: - pycairo installation failures in CI - Bikeshed warnings about missing pycairo - Better debugging for LaTeX compilation issues
1 parent c40daef commit 1da5382

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

.github/workflows/build-deploy.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,14 @@ jobs:
131131
echo "🔍 Running comprehensive schema validation..."
132132
python3 ../../../.github/scripts/validate-schemas.py
133133
134-
- name: Fix container dependencies
134+
- name: Verify container dependencies
135135
run: |
136-
echo "🔧 Installing missing container dependencies..."
137-
pip3 install -r /usr/local/lib/python3.10/dist-packages/requirements.txt || echo "⚠️ Requirements file not found, continuing..."
138-
pip3 install pycairo || echo "⚠️ pycairo installation failed, attempting build anyway..."
136+
echo "🔍 Verifying container dependencies..."
137+
echo "Python packages:"
138+
pip3 list | grep -E "(pycairo|bikeshed|jsonschema|pydantic)"
139+
echo "System packages:"
140+
dpkg -l | grep -E "(pkg-config|libcairo2-dev|libgirepository)"
141+
echo "✅ Container dependencies verified"
139142
140143
- name: Build documentation (HTML and PDF)
141144
working-directory: drafts/current/specifications

drafts/current/specifications/build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,35 @@ build_pdf() {
347347
echo " PDF was generated successfully despite warnings"
348348
else
349349
print_error "❌ LaTeX compilation failed on pass $pass (exit code: $LATEX_EXIT_CODE)"
350+
echo ""
351+
echo "🔍 LaTeX Error Analysis:"
352+
echo "========================"
353+
354+
# Show critical errors first
355+
if grep -q "^! \|Emergency stop\|Fatal error" "build/latex-pass$pass.log" 2>/dev/null; then
356+
echo "Critical LaTeX errors:"
357+
grep -A3 -B1 "^! \|Emergency stop\|Fatal error" "build/latex-pass$pass.log" | head -20
358+
echo ""
359+
fi
360+
361+
# Show undefined control sequence errors
362+
if grep -q "Undefined control sequence" "build/latex-pass$pass.log" 2>/dev/null; then
363+
echo "Undefined control sequence errors:"
364+
grep -A2 -B1 "Undefined control sequence" "build/latex-pass$pass.log" | head -10
365+
echo ""
366+
fi
367+
368+
# Show missing file errors
369+
if grep -q "File.*not found\|No file" "build/latex-pass$pass.log" 2>/dev/null; then
370+
echo "Missing file errors:"
371+
grep -A1 -B1 "File.*not found\|No file" "build/latex-pass$pass.log" | head -10
372+
echo ""
373+
fi
374+
350375
echo "Last 20 lines of log:"
351376
tail -20 "build/latex-pass$pass.log"
377+
echo ""
378+
echo "💡 Full log available at: build/latex-pass$pass.log"
352379
exit 1
353380
fi
354381

tools/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ RUN apt-get update && apt-get install -y \
1717
pandoc \
1818
git \
1919
curl \
20+
pkg-config \
21+
libcairo2-dev \
22+
libgirepository1.0-dev \
2023
&& rm -rf /var/lib/apt/lists/*
2124

2225
# Upgrade pip and install Python dependencies
2326
RUN pip install --upgrade pip && \
24-
pip install bikeshed jsonschema pydantic[email] requests
27+
pip install bikeshed jsonschema pydantic[email] requests pycairo
2528

2629
# Initialize Bikeshed spec database (this takes time, so cache it in image)
2730
RUN bikeshed update

0 commit comments

Comments
 (0)