PlatformIO Community

Debug error shared library libncurses

I’m new on PlatformIO. Yesterday I installed code on my Manjaro Linux system and added the PlatformIO plugin.
I have build an Arduino like “blink” sketch for a ESP32 und successfully uploaded it to the ESP. So far nor bigger problem.
Today I tried to use the PIO debugger using a esp-prog and failed.

Here is my platformio.ini:

platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
upload_port = /dev/ttyUSB0
upload_speed = 921000
debug_tool = esp-prog
debug_port = /dev/ttyUSB2
debug_init_break = tbreak setup

In debug console I get these messages:

Preparing firmware for debugging...
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; 
framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 1.11.2 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex- 
arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
 - framework-arduinoespressif32 3.10004.200129 (1.0.4) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   4.7% (used 15452 bytes from 327680 bytes)
Flash: [==        ]  16.6% (used 217181 bytes from 1310720 bytes)
========================= [SUCCESS] Took 1.15 seconds 
undefinedpiogdb: error while loading shared libraries: cannot open 
shared object file: No such file or directory

I have read about some other problem’s with, but nothing in debug context.

How to get it run?


Maybe a library dependency hasn’t been properly installed or automatically installed at all for the GDB server.

For Manjaro linux you should get ncurses 5 by doing something like

sudo pacman -Syu libncurses5

(refer wiki).

there is no official support for libncurses 5 in arch linux based distributions, since they changed to version 6 some years ago.
I found a pkgbuild in AUR “ncurses5-compat-libs” but the package is broken too.

Which manifests itself in which error? Related to this?

it’s my fault…
When trying to install “ncurses5-compat-libs” the system installter gives me 2 options:

  1. lib32-ncurses5-compat-libs
  2. ncurses5-compat-libs (deprecated)
    Since I don’t want to install deprecated software I choose option 1.
    Then I run into the key error. After fixing that problem the package could be installed, but didn’t work.
    libncurses5 was still missing.
    Finally I have choosed option 2 and got it work…

Thank you for your support

Sorry for re-opening a topic with a solution, but I’m a bit confused. Could this be avoided in the future by having the platformio .deb package explicitly state a dependency on libncurses5?