Let's talk about +debug

Blair Zajac blair at orcaware.com
Thu Apr 19 12:33:58 PDT 2012


On 04/19/2012 12:27 PM, Daniel J. Luke wrote:
> On Apr 19, 2012, at 2:50 PM, Blair Zajac wrote:
>>> It doesn't make sense to me as a base feature, though.
>>
>> Sure it does, many other distro's provide debugging support.  On my Ubuntu 11.10 system, there's this number of packages with debugging symbols:
>
> we're not like other distros ;-)

:)

> but it should be - adding that variant to every port makes it (like +universal) something that we then have to support for every port (or explicitly turn off for ports where it doesn't work).
>
> While it might work for most things, I'm sure there are ports where it won't work to build debug versions (so they'll all need special attention).

Maybe instead of adding code to a port as a portgroup, it's a 
post-process step run by MacPorts main that looks for all *.dylib, *.so 
and executables, gets the debugging symbols from them and drops them 
into ${prefix}/lib/debug.  This way it's not associated with the port 
itself.

In fact, this seems much cleaner.  Instead of making it a +debug option, 
it can be a macports.conf option.

> Additionally, every extra variant makes things harder to test.
>
>>> The vast majority of people using MacPorts don't care about debugging symbols (and aren't going to experience any benefit from them) - adding an automatic variant that may or may not work to every port seems like overkill.
>>
>> You don't know that until you want or need them.
>
> Most of our end-users aren't developers, don't use gdb, don't understand what a backtrace is, and aren't going to benefit from having +debug available on 'all' ports.\

Same logic applies to Ubuntu and Fedora, doesn't mean it isn't useful, 
otherwise, why would they have done the work.

Blair




More information about the macports-dev mailing list