Existing installation of ports/gdb is broken since the recent math/mpfr update:
Shared object "libmpfr.so.4" not found, required by "gdb"
Can you please give me more information?
which FreeBSD version?
are you using packages or ports?
the output of ldd /usr/local/bin/gdb would be useful as well
I am using the port on 11.1-STABLE.
ldd output is:
libreadline.so.7 => /usr/local/lib/libreadline.so.7 (0x801d81000)
libncursesw.so.8 => /lib/libncursesw.so.8 (0x801fd1000)
libutil.so.9 => /lib/libutil.so.9 (0x802230000)
libm.so.5 => /lib/libm.so.5 (0x802444000)
libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x802670000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x80289a000)
libmpfr.so.6 => /usr/local/lib/libmpfr.so.6 (0x802ac4000)
libkvm.so.7 => /lib/libkvm.so.7 (0x802d3c000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x802f4a000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80321a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80343a000)
libc.so.7 => /lib/libc.so.7 (0x803649000)
libthr.so.3 => /lib/libthr.so.3 (0x8039f5000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x803c1d000)
libelf.so.2 => /lib/libelf.so.2 (0x803e9e000)
but I rebuilt the port since I had the problem and the dependency before that was libmpfr.so.4, from the mpfr port version at gdb's build time.
According to the gdb release notes :
January 31st, 2018: GDB 8.1 Released!
Changes in this release include:
Target floating-point arithmetic emulation during expression evaluation (requires MPFR 3.1 or later);
It seems the last point was missed when the port was updated to 8.1. I suppose I was unlucky to already have the mpfr port for other reasons as otherwise gdb's autoconf would have silently skipped this feature...
Anyway, from version 8.1 on, the port needs to take care of this (and possibly provide an option to disable the feature ?)
A commit references this bug:
Date: Wed May 2 13:04:53 UTC 2018
New revision: 468827
devel/gdb: Add mpfr as dependency
Add mpfr as dependency to emulate target floating-point arithmetic during
expression evaluation when the target uses different floating-point
formats than the host
Reported by: email@example.com
I've added mpfr as dependency.
Doing so, gdb is always able to emulate target floating-point arithmetic during expression evaluation when the target uses different floating-point formats than the host
Thanks for reporting.