GDB and MacOS 11.4/BigSur

Sam Warner samuel.r.warner@me.com
Tue Jun 29 00:29:03 GMT 2021


Hi,
   I need a bit of help to speed things along.

   On macOS, zsh installs an SDK, which apparently is partially needed - yet - it produces build errors.  (Attached build.log, and config.with.szh.SDKs.log)
   Meanwhile, if I temporarily remove the SDK of zsh, then ‘./configure’ fails. (Attached config.without.szh.SDKs.log)

  I was about to start setting up LD and INCLUDE environment variables, yet I think this is already handled by “./configure"

   I’m a bit lost.  Any suggestions?

Sam



> On Jun 28, 2021, at 5:03 PM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Never mind - found it - https://sourceware.org/gdb/wiki/Internals%20Testsuite <https://sourceware.org/gdb/wiki/Internals%20Testsuite> 
> 
>> On Jun 28, 2021, at 2:51 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>> 
>> Hi,
>>  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
>>  (Using gcc-11 from home-brew)
>> 
>> Sam
>> 
>> 
>>> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca <mailto:simon.marchi@polymtl.ca>> wrote:
>>> 
>>> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>>>> Hi Simon,
>>>> 
>>>>  Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>>>> 
>>>>  My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
>>> 
>>> I don't know what symbol-server is, I can't help you with that.
>>> 
>>> To build gdb, you normally just need to run these commands at the
>>> top-level:
>>> 
>>> ./configure
>>> make all-gdb
>>> 
>>> The built gdb will be at gdb/gdb.  But there are some additional quirks
>>> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
>>> you need to install that.  You need GNU make to build (the make that
>>> comes with macOS is not GNU make).  You can install those using Macports
>>> (or Brew, I guess) or by building them by hand.  You can then probably
>>> get by using the commands:
>>> 
>>> ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>>> gmake
>>> 
>>> Update /opt/local to point where your libgmp is installed.  gmake refers
>>> to GNU make, when installed through Macports.
>>> 
>>> Simon
>> 
> 



More information about the Gdb mailing list