On Tue, Jul 28, 2009 at 3:44 AM, Robert
Bradshaw<rober...@math.washington.edu> wrote:
>
> On Jul 27, 2009, at 5:22 PM, David Kirkby wrote:
>
>>
>> I noticed that several packages build Sage with the -g option to ,
>> which adds debugging information. This has 3 downsides
>>
>> 1) The binaries are slower
>> 2) The binaries are bigger
>> 3) Possibly takes longer to compile - I've not verified this, but I
>> suspect it does.
>
> Just a sec, is there any empirical evidence for the above? (1) seems
> like the most severe, but as far as I understand, there is no speed
> impact on the resulting binaries (it just generates symbol tables).
> (2) seems like the biggest issue, but is is a 10% increase? Double
> the size? More? Sage is big, but HD space is relatively cheap. As for
> (3), it the only ones who care about this are those who compile from
> source, and those are the ones more likely to want the debug symbols.
> Again, some some hard numbers would be good.
>
> I've found cases where it's very useful to be able to fire up gdb and
> see where something's going on, often I don't now ahead of time where
> I'm going to be looking for a segfault. Debugging symbols are
> especially useful because it's open source, so one can actually see
> the code in question (even if one has no intent on modifying it). I
> think any step backwards in developer friendliness should be taken
> with caution.

That's an extremely good point.  I regularly do

 sage -gdb

and see what happens any time I get a segfault.  The segfault
instructions even tell one to type "sage -gdb".  The resulting
tracebacks would suck without debugging symbols.

Also, I have to say that nearly Sage install I work with on a daily
basis (say on my laptops) was built as a binary somewhere else.

>
>> I think it would be a good idea to remove the -g flag in general. As
>> far as I am aware, there is the SAGE_DEBUG variable, which should be
>> set to 1 for debugging. I'm doing this from memory, not testing it as
>> I write, but
>>
>> #!/bin/bash
>> debug="${SAGE_DEBUG-0}"
>>
>> if [ x$debug = "x1" ] ; then
>>   CFLAGS="$CFLAGS -g"
>> fi
>> should add -g only when the environment variable SAGE_DEBUG is set
>> to 1.
>
> As an alternative, what about using the strip command for bdist?
> People who compile from source would get symbols, but the binary
> downloads would be smaller for people who don't care.
>
> - Robert
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to