I need a working gdb w/gcc, g++ and gfortran on 10.6

Mannucci, Anthony J (335G) anthony.j.mannucci at jpl.nasa.gov
Mon Jun 14 00:46:31 PDT 2010

I am not really answering your question but raising other questions, such as: does macports install gcc via a full build or are binaries used in the install?

I am not expert enough to know the details here, but it appears that debug information may have been left in the gcc libraries and distribution. That suggests to me the gcc install is based on binaries. Not sure, and not sure if this is standard for macports or not.

I have installed gfortran binaries on top of Apple's gcc. These are available from various places, however, the provided libraries might have debug information and need to be stripped of that using the "strip -d" command. The otool command is useful to determine which dynamic libraries are being accessed and may need to be stripped.

To summarize: I have no experience with macports gcc builds. Thanks for providing the information that certain of the builds have gfortran. (macports does provide g95, an alternate open source compiler). If we get information about how macports builds gcc, perhaps we can understand the error you speak of. Other than that, you might try binary gfortran builds. These work with gdb only after "stripping" in my opinion.

Other caveats: gdb v6.X (supplied by Apple) is the only one I can get to work with gcc/gfortran. You might need to use the -gdwarf-2 compiler option with gfortran to get proper operation. I have used cgdb with good success on gfortran codes.


On 6/8/10 7:00 AM, "macports-users-request at lists.macosforge.org" <macports-users-request at lists.macosforge.org> wrote:

Send macports-users mailing list submissions to
        macports-users at lists.macosforge.org

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
        macports-users-request at lists.macosforge.org

You can reach the person managing the list at
        macports-users-owner at lists.macosforge.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of macports-users digest..."

Today's Topics:

   1. I need a working gdb w/gcc, g++ and gfortran on 10.6
      (Robert McLay)


Message: 1
Date: Mon, 7 Jun 2010 10:32:03 -0500
From: Robert McLay <mclayrt at austin.utexas.edu>
To: "macports-users at lists.macosforge.org"
        <macports-users at lists.macosforge.org>
Subject: I need a working gdb w/gcc, g++ and gfortran on 10.6
Message-ID: <4C0D10F3.8070207 at austin.utexas.edu>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed

As far as I can tell the only compiler and gdb combination that works is
the one that comes with Xcode.  Namely gcc/g++ 4.2.1.   That is fine as
long as I don't need gfortran.  I can build gcc43, gcc44 and gcc45 which
do come with gfortran but I can not get any of them to work with gdb.  I
have tried the xcode version and I've built gdb 7.1.  gdb 7.1 fails the
same way that the xcode gdb fails:  It prints a long list of files it
can not find and dies.  There is a ticket 22198 which reports this
problem.  I have found no fix for this ticket.

How does anyone do development on this system w/o being able to run the
debugger?  I have one colleague who uses gcc43 and the xcode gdb works
fine for him.   Yet there are others (like ticket 22198 and others on
the boost mailing list) where it doesn't work for them.  Is this a well
known issue?  It is not in the FAQ.

Thanks for any insight
R. McLay


macports-users mailing list
macports-users at lists.macosforge.org

End of macports-users Digest, Vol 46, Issue 8

Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
 Mail-Stop 138-308,                     Tel > (818) 354-1699
 Jet Propulsion Laboratory,              Fax > (818) 393-5115
 California Institute of Technology,     Email > Tony.Mannucci at jpl.nasa.gov
 4800 Oak Grove Drive,                   http://genesis.jpl.nasa.gov
 Pasadena, CA 91109

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100614/7cfddef3/attachment.html>

More information about the macports-users mailing list