Update to GDB 11.2?

Chris Johns chrisj at rtems.org
Sun Feb 27 22:52:34 UTC 2022


On 26/2/22 1:07 am, Joel Sherrill wrote:
> On Thu, Feb 24, 2022 at 11:53 PM Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
> 
>> On 24/02/2022 14:53, Sebastian Huber wrote:
>>> On 24/02/2022 14:40, Joel Sherrill wrote:
>>>> On Thu, Feb 24, 2022, 5:50 AM Sebastian Huber
>>>> <sebastian.huber at embedded-brains.de
>>>> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>>>>
>>>>     Hello,
>>>>
>>>>     we still use GDB 10 for the RTEMS 6 tool suite. I noticed some build
>>>>     problems for this version. Should we update to the latest GDB 11.2
>>>>     release?
>>>>
>>>>
>>>> If it solves build problems and doesn't introduce others, sure. I tend
>>>> to want to bump to the latest  versions.
>>>
>>> Ok, I started a build on Linux using GDB 11.2. If this works, I will
>>> update the RSB.
>>
>> It didn't help to fix the build issues on macOS. Now all GDB builds seem
>> to fail with:
>>
>> checking whether to use MPFR... auto
>> checking for libmpfr... no
>> configure: WARNING: MPFR is missing or unusable; some features may be
>> unavailable.
>> checking whether to use python... /usr/bin/python2
>> checking for python... no
>> configure: error: no usable python found at /usr/bin/python2
>>
> 
> Is this a lack of Python2 or Python2 development libraries?
> 
> The message used to confuse the two.
> 
> Either way, the requirement for Python 2 at this point  isn't great.

I do not believe this is a Python 2 or 3 issue. I dug into the error recently
and came to the conclusion you cannot embed the MacOS shipped Python any more
when using Xcode as the tool chain. Apple has a file called:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libpython2.7.tbd

This file defines the clients that can be linked to this library and used and
gdb is not one. This seems to limit the role and purpose of the OS built python
and this is the first time I have encountered this. It is not clear to me if you
can link to this library with a different linker so I am confused why this is
has been done. I will raise a developers bug about this with Apple.

MacOS installers are available for Python on python.org and given time I will
look at adding support for these. I am wondering if we move to these versions of
Python and away from the MacOS version?

Python embedded in gdb is important when using C++. GCC ships with a set of
pretty printers that aids using the `std` containers. I am in the process of
looking at the auto-start support we need to have these automatically loaded and
available.

Chris


More information about the devel mailing list