Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm-eabi-gdb depends on libncurses.so.5 #34

Open
JeremyGrosser opened this issue Jun 7, 2022 · 3 comments
Open

arm-eabi-gdb depends on libncurses.so.5 #34

JeremyGrosser opened this issue Jun 7, 2022 · 3 comments

Comments

@JeremyGrosser
Copy link

...but Debian stable (bullseye) installs libncurses6 by default. A libncurses5 package is available, but Alire does not install it automatically.

alr exec arm-eabi-gdb bin/hello_pico
/home/synack/.config/alire/cache/dependencies/gnat_arm_elf_11.2.4_ba16d45c/bin/arm-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

sudo apt install libncurses5 fixes this error.

@Fabien-Chouteau
Copy link
Member

We could add an external dependency on libncurses5 in the gnat_* crates.

@JeremyGrosser
Copy link
Author

That would work, although I think it might be better if we could get ncurses statically linked so that we're less dependent on the host environment.

@JeremyGrosser
Copy link
Author

I looked into this a little bit and learned a few things:

  • ncurses 6.x is ABI compatible with 5.x, but adds some new features (not sure if gdb is using any of those, but I doubt it)
  • gdb depends on ncurses for the TUI feature, which the spec for gdb already disables on Windows
  • readline also links ncurses if it's available, so we get this dependency even without TUI
  • adding -static to LDFLAGS causes gdb's configure script to not detect ncurses at all
  • ncurses needs terminfo files as well, so even if we statically link it, we'll need to ship more stuff in the binary package

So, I think your suggestion of just adding a dependency on libncurses5 is the best option. Hopefully the distros maintain this compatibility package until gdb gets bumped up to libncurses6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants