arm-none-eabi-gdb on 64b debian(mint) - libncurses.so.5: cannot open shared object file

Asked by John Morrison on 2013-04-14

after getting 32 bit support for 64bit debian(mint)

vbmint ~ $ sudo apt-get install ia32-libs

and got openocd to work, tried to get gdb working, and after adding the appropriate PATH

vbmint ~ $ arm-none-eabi-gdb
arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

I made sure the libncurses5 existed, and it claims to have multi-arch support.
After a variety of wasted life missteps, that are useless to report, it appears that, libncursesw.so.5.9 that libncurses5 installs is a working i386 lib, so the following fix works

vbmint ~ $ cd /lib/i386-linux-gnu
vbmint /lib/i386-linux-gnu $ sudo ln -sf libncursesw.so.5.9 libncurses.so.5

then -

vbmint ~ $ arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130312-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)

It may be useful to someone that libncurses5 installs a symlink for libncurses.so.5 which points to libncurses.so.5.9 in /lib/x86_64-linux-gnu, adding this location to LD_LIBRARY_PATH generates the following

vbmint ~ $ arm-none-eabi-gdb
arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64

Thought I would share, hopefully save someone some time. SOLVED(ish)!

Question information

Language:
German (Germany) Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Joey Ye
Solved:
2013-04-16
Last query:
2013-04-16
Last reply:
2013-04-15
Best Joey Ye (jinyun-ye) said : #1

John,

Thanks for sharing. We didn't encounter this problem on 64 bit Ubuntu, where the package was validated.

- Joey

John Morrison (draxcascone) said : #2

Thanks Joey Ye, that solved my question.

Similarly, on Ubuntu 13.10:

sudo apt-get install lib32ncurses5

This was all that was needed to get gdb running in the eclipse-nios2 environment as supplied by Altera, for live debugging of a soft-core Nios processor on an FPGA