GDB 6.8 via Mac Ports?

Darren Weber dweber at
Fri Jun 5 11:38:09 PDT 2009

Hi Kendall,

I put this Portfile together in the hope that the build and install would be
smooth.  It's not.  I'm a novice at building gdb, so I have a lot to learn
about why this is failing.  It may be that the automatic detection of the
target architecture is wrong, it currently detects

checking build system type... i386-apple-darwin9.7.0
checking host system type... i386-apple-darwin9.7.0

The main concern is this:

checking build system type... i386-apple-darwin9.7.0
checking host system type... i386-apple-darwin9.7.0
checking target system type... i386-apple-darwin9.7.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... /usr/bin/gcc-4.0
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc-4.0 accepts -g... yes
checking for /usr/bin/gcc-4.0 option to accept ANSI C... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++-4.0 accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
*** This configuration is not supported in the following subdirectories:
     bfd opcodes gdb sim
    (Any other directories should still work fine.)

So what is happening is the build and install is working, but only
partially.  It would be preferable that the build fails at this point, but
it does not!

I'm very sorry to waste your time, I wish this was working!  I think the
main thing to get right is the target platform identifier.  I looked into it
briefly, but it's not resolved yet.  I would hope that if the target
platform is identified correctly (and fully supported by gdb 6.8), the port
will be functional.

If you have the motivation and patience to look into it, I can advise you on
how to play around with the Porfile.  The first thing to do is to run port
in debug mode, i.e.:

sudo port -d destroot gdb

This will provide a lot of information on what port is doing.  The destroot
target does the configure and build, then runs make install with a custom
DESTDIR.  MacPorts uses that DESTDIR, called destroot, as a way to parse the
files in the port, install the files into
/opt/local/var/macports/software/gdb/ and then activate the port with hard
links in /opt/local to the files in the software/gdb installation.

The destroot path for this port is


The pitiful truth is that the only files currently installed there are:


If you want to build everything custom, without MacPorts, you can copy the
distfile into your build path from


I hope we can fix this one!  I've created a new trac ticket on this issue:

Take care,

On Fri, Jun 5, 2009 at 10:56 AM, Kendall Bennett
<KendallB at>wrote:

>  Hi Darren,
> I am trying to get an updated version of GDB installed to see if it will
> solve some problems I have found with the one distributed by Apple (seems to
> have issues with breakpoints in some C++ programs, specifically Qt4 stuff).
> Anyway, I tested gdb 6.8 on Windows and it seems to not have these issues,
> so the Mac Ports version of gdb 6.8 seemed like a good option.
> Anyway, I did the installed and ran into a snag during the activation,
> saying the following:
> --->  Activating gdb
> Error: port activate failed: Image error: /opt/local/share/info/
> is being used by the active autoconf port.  Please
> deactivate this port first, or use 'port -f activate gdb' to force the
> activation.
> I have both tried deactivating autoconf and activating gdb, and leaving
> autoconf activated and forcing the activation of gdb, but there does not
> appear to be any gdb binary located anywhere under the /opt/local tree? I
> was expecting it to show up on /opt/local/bin, but there is nothing there,
> and searching the /opt/local directory does not find anything resembling a
> gdb binary?
> What am I missing here?
> Regards,
> *Kendall Bennett, CEO
> *A Main Hobbies
> 424 Otterson Drive, Suite 160
> Chico, CA 95928
> 1-800-705-2215 (Toll-Free)
> 1-530-894-0797 (Int'l & Local)
> 1-530-894-9049 (Fax)
> **
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list