alire-project / GNAT-FSF-builds

Builds of the GNAT Ada compiler from FSF GCC releases
MIT License
32 stars 9 forks source link

gdb depends on libpython3.8 #51

Closed JeremyGrosser closed 1 month ago

JeremyGrosser commented 11 months ago

After switching to the gnat-fsf-13.1.0 toolchain, arm-eabi-gdb stops working on Debian bookworm, because libpython3.8.so.1.0 is unavailable. Python 3.11 is the release included with Debian stable.

synack@polar ~/src/rp2040_hal/tests(master) $ eval $(alr printenv)
synack@polar ~/src/rp2040_hal/tests(master) $ arm-eabi-gdb
arm-eabi-gdb: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory
JeremyGrosser commented 11 months ago

I've confirmed that adding --without-python to the gdb configure flags removes the dependency on libpython3.8. I was unable to find an option for static linking. https://github.com/alire-project/GNAT-FSF-builds/compare/main...JeremyGrosser:GNAT-FSF-builds:gdb-without-python

Fabien-Chouteau commented 10 months ago

Thanks for the report @JeremyGrosser.

I don't think I want to disable python for the builds as it brings many useful features. Maybe there's a way to disable it at run-time?

reznikmm commented 8 months ago

Workaround :wrench:

To make gdb from gnat_native_13.2.0_788a01f9 work I've rebuilt libpython3.8 for my Ubuntu 22.04. This is rather simple (I used a docker to have a clean build env).

reznikmm commented 7 months ago

python-3.8.patch

godunko commented 7 months ago

Another workaround for Ububtu 22.04 is to add external repository and to install libpython3.8 package.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install libpython3.8
yrashk commented 2 months ago

I want to add a suggestion here. It's possible to use RPATH with ($ORIGIN on Linux and @loader_path on macOS) to ship a shared library side-by-side.

Fabien-Chouteau commented 1 month ago

Hello here, so I decided to disable python support in the next builds (14.1.3). I don't see a good way to provide python and it was never enabled for our Windows builds anyway.

The workaround, if Python support is really important for you, will be to use the distrib GDB