Longan Nano, debug lib missing under debian 9,

Hi, I get this error message from the debugger screen

Processing sipeed-longan-nano (platform: gd32v; framework: gd32vf103-sdk; board: sipeed-longan-nano)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/gd32v/sipeed-longan-nano.html
PLATFORM: GigaDevice GD32V 1.1.2 > Sipeed Longan Nano
HARDWARE: GD32VF103CBT6 108MHz, 32KB RAM, 128KB Flash
DEBUG: Current (sipeed-rv-debugger) External (altera-usb-blaster, gd-link, jlink, rv-link, sipeed-rv-debugger, um232h)
PACKAGES: toolchain-gd32v 9.2.0, framework-gd32vf103-sdk 1.0.0
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in debug mode
Checking size .pio/build/sipeed-longan-nano/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
DATA: [= ] 7.0% (used 2310 bytes from 32768 bytes)
PROGRAM: [ ] 4.9% (used 6472 bytes from 131072 bytes)
========================= [SUCCESS] Took 0.84 seconds =========================
undefinedpiogdb: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory

I can program the chip ok, using the jtag debugger (sipeed usb-jtag/ttl), thou there are warnings/errors
but I get the “undefinedpiogdb: error while loading shared libraries: libmpfr.so.6:”
While there is a libmpfr.so.4 and libmpfr.so.4.1.5 on the Debian 9, there is no libmpfr.so.6, and
checking the gnu website for libmpfr the lestest version is 4.0.2. So where dose libmpfr.so.6, come from ?


1 Like

Checking some more, I found out Debian 10, has libmpfr.so.6, but 9 only has libmpfr.so.4,
You can not install libmpfr.so.6 on debian 9, with out all hell breaking lose.
so the fix… which appears to work, for Debian 9 is to soft link to libmpfr.so.4
IE: to get debug working on debain 9.
sudo su; cd /usr/lib/x86_64-linux-gnu; ln -s libmpfr.so libmpfr.so.6

1 Like

works for me too \o/