Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-28 Thread Ralf Wildenhues
* Barrett, Brian W wrote on Tue, Jul 27, 2010 at 11:02:31PM CEST: > (since AC_PROG_CC will add -g if CFLAGS is empty). If CFLAGS is not set. If you './configure CFLAGS=', then it will not modify that. Going back into lurking mode ;-) Ralf

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Kenneth Lloyd
Wise decision. "Platform heals" went out with the '80's. Ken -Original Message- From: devel-boun...@open-mpi.org [mailto:devel-boun...@open-mpi.org] On Behalf Of Jeff Squyres Sent: Tuesday, July 27, 2010 5:40 PM To: Open MPI Developers Subject: Re: [OMPI devel] [OM

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Jeff Squyres
In good email tradition, this thread went downhill. :-) So Brian and I got on the phone and had a good long discussion about it. The short version is that we need to ask those who know about compilers and debuggers to figure out what the Right Thing to do is. I'm not going to hold up 1.5.0 fo

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Jeff Squyres
Actually, it occurs to me that my commit doesn't even fix the case that it was intended to fix -- @#$%@#$%%@#$ !!! The main point of the patch was to fix totalview support. I did this by examining CFLAGS. But because CFLAGS doesn't always contain -g, we use $DEBUGGER_CFLAGS (setup in orte/con

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
Finally (and then I'm done), I mis-spoke in this thread a bit. -gstabs+ is a problem. -gstabs really just defaults to GSTABS, which is what the default was in 10.3, so of course it works. But -gstabs+ is the weird one and I'm not sure I understand why it causes problems. And, it's not Apple

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Ralph Castain
I do sympathize with the "the user said to do it" argument as that is in keeping with our approach elsewhere. IIRC, what Jeff had implemented does print out a warning if we override the flag, so this would only be a minor change that might help alert people to what is going on. I would also sugg

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
Ok, so there is some middle ground I would dislike but not hate enough to object to. How about having a AC_MSG_WARN if we find -g in the CFLAGS/CXXFLAGS on OS X version 10.4 or later? Users get educated, I can still make executables that are debugabble for my weird environment, and this thread

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
Unfortunately, there really is no middle ground. THe only option is to ask Apple to fix -g to mean -gstabs on OS X. I'm cross compiling from one version to another, so running an executable won't work. Looking at the three or four ways that you can specify a target version won't work (especia

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Ralph Castain
Can I offer a middle ground? I believe we have been burned enough with the -g vs -gstabs situation on OSX that it merits defaulting "appropriately". So... Can we detect if gstabs is actually supported by the OS vs the compiler? If not, can we add logic that checks the OS target version and "does

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
On Jul 27, 2010, at 3:13 PM, Jeff Squyres wrote: > On Jul 27, 2010, at 5:02 PM, Barrett, Brian W wrote: > >> Yes, but say I'm using a custom built version of gcc that doesn't do -gstabs >> quite right. Now you've screwed me. > > The configure test checks to see if -gstabs+ is accepted by the

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Jeff Squyres
On Jul 27, 2010, at 5:02 PM, Barrett, Brian W wrote: > Yes, but say I'm using a custom built version of gcc that doesn't do -gstabs > quite right. Now you've screwed me. The configure test checks to see if -gstabs+ is accepted by the compiler. > I'm a firm believer that our configure script

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
Yes, but say I'm using a custom built version of gcc that doesn't do -gstabs quite right. Now you've screwed me. I'm a firm believer that our configure script should do what the user says, as exactly as possible. Changing AC behavior a little bit is a gray area, but one I'm almost ok with (si

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Jeff Squyres
My thought was that if you specified "-g", you probably wanted -gstabs+. Indeed, for years, I didn't know that -gstabs+ was required on OS X to make debugging symbols work in gdb... On Jul 27, 2010, at 3:43 PM, Barrett, Brian W wrote: > Sorry for not replying sooner, I was on vacation the las

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-27 Thread Barrett, Brian W
Sorry for not replying sooner, I was on vacation the last couple of days. Ew - why do it that way? If I as a user specified -g, I sure don't want that to magically become -gstabs. Overriding Autoconf's addition of -g with -gstabs+ is fine, but overriding what the user says is just wrong. Bria

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-26 Thread Jeff Squyres
Ok; a commit is queued up for the trunk tonight that should do this: - If we're on Darwin - And -g is in CFLAGS already - Then do a test compile to see if -gstabs+ works - If it does, then add it to CFLAGS - Then double check and uniq-ify CFLAGS (to ensure -gstabs+ wasn't in there already)

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-25 Thread Ralph Castain
I can't speak for totalview, but as a developer on Darwin, adding -gstabs+ enables the clean use of gdb and would help immensely! On Jul 15, 2010, at 8:14 AM, Jeff Squyres wrote: > Resurrecting this orphaned discussion... > > Peter: so what exactly do you need? -gstabs or -gstabs+ when compil

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-07-15 Thread Jeff Squyres
Resurrecting this orphaned discussion... Peter: so what exactly do you need? -gstabs or -gstabs+ when compiling these files on Darwin? (or, more specifically, whenever the back-end compiler supports one/both of these flags) On Jun 9, 2010, at 11:43 PM, Paul H. Hargrove wrote: > > > Jeff S

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-06-09 Thread Paul H. Hargrove
Jeff Squyres wrote: On Jun 4, 2010, at 5:02 PM, Peter Thompson wrote: It was suggested by our CTO that if these files were compiled as to produce STABS debug info, rather than DWARF, then the debug info would be copied into the executables and shared libraries, and we would then be able to

Re: [OMPI devel] [OMPI users] Debug info on Darwin

2010-06-09 Thread Jeff Squyres
On Jun 4, 2010, at 5:02 PM, Peter Thompson wrote: > It was suggested by our CTO that if these files were compiled as to > produce STABS debug info, rather than DWARF, then the debug info would > be copied into the executables and shared libraries, and we would then > be able to debug with Open MPI