espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.69k stars 7.29k forks source link

error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or director (IDFGH-12094) #13152

Open diplfranzhoepfinger opened 9 months ago

diplfranzhoepfinger commented 9 months ago

Answers checklist.

General issue report

error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or director

franz@franz-Ubuntu:~/master/esp-idf$ . ./export.sh
Detecting the Python interpreter
Checking "python3" ...
Python 3.11.6
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Not using an unsupported version of tool cmake found in PATH: 3.27.4. To use it, run '/usr/bin/python3 /home/franz/master/esp-idf/tools/idf_tools.py export --prefer-system'
ERROR: tool qemu-xtensa version esp_develop_8.1.3_20231206 is installed, but returned non-zero exit code (127) with error message:
/home/franz/.espressif/tools/qemu-xtensa/esp_develop_8.1.3_20231206/qemu/bin/qemu-system-xtensa: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

ERROR: tool qemu-riscv32 version esp_develop_8.1.3_20231206 is installed, but returned non-zero exit code (127) with error message:
/home/franz/.espressif/tools/qemu-riscv32/esp_develop_8.1.3_20231206/qemu/bin/qemu-system-riscv32: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

franz@franz-Ubuntu:~/master/esp-idf$ 

same issue here: https://github.com/espressif/idf-eclipse-plugin/issues/898

not happening with esp-idf https://github.com/espressif/esp-idf/releases/tag/v5.1.2

only happens on master

GTCLive commented 8 months ago

This is so odd. A full week went by and the linux & plugin ide development environment remain broken without a single follow-up, acknowledgement and/or neither a complain. Makes you wonder if anyone dev espressif products on the linux side, so odd and worrying...

igrr commented 8 months ago

Sorry for the inactivity folks, part of the team is currently away due to the Chinese New Year. We'll be more active next week.

On the topic of the issue, could you please try installing libsdl-2.0 and see if that fixes the issue?

https://github.com/espressif/esp-idf/blob/4d90eedb6ef32ff949c6f298a3d845f9f07bac92/tools/docker/Dockerfile#L25

(that's a new dependency introduced by QEMU, we'll try to fix it before v5.3 release. Installing the library should fix the problem in the meantime.)

GTCLive commented 8 months ago

Updating master and installing libslirp0 seems to resolve both the dependency and qemu error. Grateful for passing on the dockerfile, @igrr. Great pointers!

diplfranzhoepfinger commented 8 months ago
sudo apt install libslirp0
diplfranzhoepfinger commented 8 months ago

espressif/idf-eclipse-plugin#898

diplfranzhoepfinger commented 8 months ago
OK

Executing /usr/bin/python3 /home/franz/esp-idf-v5.2/tools/idf_tools.py export --format=key-value
Not using an unsupported version of tool cmake found in PATH: 3.27.4. To use it, run '/usr/bin/python3 /home/franz/esp-idf-v5.2/tools/idf_tools.py export --prefer-system'
WARNING: tool qemu-xtensa version esp_develop_8.1.3_20231206 is installed, but returned non-zero exit code (127) with error message:
/home/franz/.espressif/tools/qemu-xtensa/esp_develop_8.1.3_20231206/qemu/bin/qemu-system-xtensa: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

WARNING: tool qemu-riscv32 version esp_develop_8.1.3_20231206 is installed, but returned non-zero exit code (127) with error message:
/home/franz/.espressif/tools/qemu-riscv32/esp_develop_8.1.3_20231206/qemu/bin/qemu-system-riscv32: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

OPENOCD_SCRIPTS=/home/franz/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
ESP_ROM_ELF_DIR=/home/franz/.espressif/tools/esp-rom-elfs/20230320/
IDF_PYTHON_ENV_PATH=/home/franz/.espressif/python_env/idf5.2_py3.11_env
ESP_IDF_VERSION=5.2
PATH=/home/franz/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/franz/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/franz/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/franz/.espressif/tools/esp-clang/16.0.1-fe4f10a809/esp-clang/bin:/home/franz/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:/home/franz/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/franz/.espressif/tools/cmake/3.24.0/bin:/home/franz/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/franz/.espressif/tools/ninja/1.11.1/:/home/franz/.espressif/python_env/idf5.2_py3.11_env/bin:/home/franz/esp-idf-v5.2/tools:$PATH
IDF_DEACTIVATE_FILE_PATH=/tmp/tmpgg6095nyidf_377683
Configured CDT Build Environment variables. You can check Preferences > C/C++ > Build > Environment
diplfranzhoepfinger commented 8 months ago
sudo apt install libsdl2-dev
diplfranzhoepfinger commented 4 months ago

https://github.com/espressif/esp-idf/pull/13949