Skip to content

Commit 19df216

Browse files
Copilotsofthack007
andcommitted
Fix missing QEMU dependencies - install libSDL2 and verify libraries
Added step to install required shared libraries before setting up QEMU: - libsdl2-2.0-0 (SDL2 library - required by QEMU) - libpixman-1-0 (pixel manipulation library) - libglib2.0-0 (GLib library) Enhanced setup-qemu.sh to verify dependencies after installation: - Checks for missing libraries with ldd - Shows QEMU version if successful - Provides clear error message with install commands if libraries missing This fixes the "error while loading shared libraries: libSDL2-2.0.so.0" error. Co-authored-by: softhack007 <[email protected]>
1 parent 314bf7f commit 19df216

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/scripts/setup-qemu.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,31 @@ fi
7171
# Make QEMU executable (try both possible locations)
7272
if [ -f "${QEMU_DIR}/qemu-system-xtensa" ]; then
7373
chmod +x ${QEMU_DIR}/qemu-system-xtensa
74-
echo "QEMU ESP32 setup complete"
75-
echo "QEMU binary: ${QEMU_DIR}/qemu-system-xtensa"
74+
QEMU_BIN="${QEMU_DIR}/qemu-system-xtensa"
7675
elif [ -f "${QEMU_DIR}/bin/qemu-system-xtensa" ]; then
7776
chmod +x ${QEMU_DIR}/bin/qemu-system-xtensa
7877
# Create symlink for easier access
7978
ln -sf bin/qemu-system-xtensa ${QEMU_DIR}/qemu-system-xtensa
80-
echo "QEMU ESP32 setup complete"
81-
echo "QEMU binary: ${QEMU_DIR}/bin/qemu-system-xtensa"
79+
QEMU_BIN="${QEMU_DIR}/bin/qemu-system-xtensa"
8280
else
8381
echo "ERROR: Could not find qemu-system-xtensa binary"
8482
exit 1
8583
fi
84+
85+
echo "QEMU ESP32 setup complete"
86+
echo "QEMU binary: ${QEMU_BIN}"
87+
88+
# Verify QEMU can run by checking for required libraries
89+
echo "Verifying QEMU dependencies..."
90+
if ! ldd "${QEMU_BIN}" | grep -q "not found"; then
91+
echo "All required libraries found"
92+
${QEMU_BIN} --version
93+
else
94+
echo "WARNING: Missing required libraries:"
95+
ldd "${QEMU_BIN}" | grep "not found"
96+
echo ""
97+
echo "Install missing dependencies with:"
98+
echo " sudo apt-get update"
99+
echo " sudo apt-get install -y libsdl2-2.0-0 libpixman-1-0 libglib2.0-0"
100+
exit 1
101+
fi

.github/workflows/qemu-e2e-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ jobs:
8888
- name: Install Playwright Browsers
8989
run: npx playwright install --with-deps chromium
9090

91+
- name: Install QEMU dependencies
92+
run: |
93+
sudo apt-get update
94+
sudo apt-get install -y libsdl2-2.0-0 libpixman-1-0 libglib2.0-0
95+
9196
- name: Setup QEMU ESP32
9297
run: |
9398
bash .github/scripts/setup-qemu.sh

0 commit comments

Comments
 (0)