Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 10:44:05PM +0200, Stefano Zacchiroli wrote: I pinger vorlon on this on IRC. He suggested to get in touch with d-policy for this, explaining why OCaml libraries should be in our opinion be handled differently than other libraries. I argued with him that the reason why it is so is that we are talking only about -dev libraries and hence space on the non-developer user is not wasted. I haven't yet prepared the mail for -policy though. Anyone willing to do so before please step forward, possibly Cc-ing this list. Otherwise I'll do so in the next few days. In the end it seems to me there's no need for that. According to my reading of the appropriate chapters of the standard Debian policy the following apply: - binaries should be stripped per default, with support for DEB_BUILD_OPTIONS for overriding that - *shared* libraries should be stripped - nothing is said about stripping *static* libraries and in fact my tests on the *.a files I have in my /usr/lib/ confirm that *.a are not stripped So, with my tiny change to our policy, we are aligned with the standard policy. Hence, no need to contact -policy. Now it's mass bug reporting time, we need a tool able to recognize if a -dev ocaml library contains debugging information and if not we need to report the bug against the library ... Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time signature.asc Description: Digital signature
Bug#415194: libextlib-ocaml-dev: No debugging information
[ Ob: debian-ocaml-maint, look at the end of this mail ] tags 415194 + wontfix thanks On Fri, Mar 16, 2007 at 06:55:27PM -0400, Ivan Jager wrote: The bytecode files are currently compiled without debugging support. This makes it hard to debug other code that might be called by it. Eg, a function passed to List.iter. In the Debian folklore of libraries (at large, not OCaml-specific) that's a feature, not a bug. Indeed usually libraries do not contain debugging symbols and where is deemed appropriate an extra -dbg library package is built containing debugging information. Since the standard libraries are compiled with debugging support it seems like it would make sense to do the same for others. Yes, it might be slightly slower, but anyone who cares about speed will probably be compiling native code anyways. In the specific case of OCaml libraries I think we never discussed the issue and therefore I think the standard libraries just happen to be compiled that way (probably because they are compiled that way upstream) without any particular reason. So, at the moment I'm tagging this bug report as wontfix, but diverting the more general question of should we mandate inclusion of debugging symbols in OCaml bytecode libraries? to the debian-ocaml-maint mailing list. On one hand we should be consistent with the general library philosophy of not including debugging symbols in packages other than -dbg. On the other it is true that a user willing to have performances will use native code libraries, but is still true that native code libraries are not available everywhere ... Lenny-discussion time guys :) Thanks for your bug report. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time signature.asc Description: Digital signature
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, 2007-04-09 at 11:58 +0200, Stefano Zacchiroli wrote: [bytecode with debug?] Is it still possible to use the debugger and get a backtrace etc if there are no debugging symbols in these libraries? If not .. it defeats an important use of these libraries for people who do have a native code compiler but want to use bytecode to aid debugging. [BTW: I don't use the bytecode compiler or debuggers, but i do occasionally use the toplevel interpreter for experiments] -- John Skaller skaller at users dot sf dot net Felix, successor to C++: http://felix.sf.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 09:25:34PM +1000, skaller wrote: Is it still possible to use the debugger and get a backtrace etc if there are no debugging symbols in these libraries? Of course not, but this is not the point. Indeed, the same argument can be made for C libraries, but for C libraries the default is not to ship debugging symbols, why OCaml should make a difference from this point of view? That's the question we should find an answer for (or alternatively remove the debugging symbols from all OCaml libraries...). Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 9, 2007 at 14:47:40 +0200, Stefano Zacchiroli wrote: On Mon, Apr 09, 2007 at 09:25:34PM +1000, skaller wrote: Is it still possible to use the debugger and get a backtrace etc if there are no debugging symbols in these libraries? Of course not, but this is not the point. Indeed, the same argument can be made for C libraries, but for C libraries the default is not to ship debugging symbols, why OCaml should make a difference from this point of view? That's the question we should find an answer for (or alternatively remove the debugging symbols from all OCaml libraries...). OCaml libraries are static, so if there is a way to take a library compiled with -g and link a program with it that results in an executable without debugging symbols, then I think we should do that, because that means you would decide at link time whether you want your program to carry debugging symbols, and library packages are only useful for developers anyway. Cheers, Julien -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 11:58:03AM +0200, Stefano Zacchiroli wrote: [ Ob: debian-ocaml-maint, look at the end of this mail ] tags 415194 + wontfix thanks On Fri, Mar 16, 2007 at 06:55:27PM -0400, Ivan Jager wrote: The bytecode files are currently compiled without debugging support. This makes it hard to debug other code that might be called by it. Eg, a function passed to List.iter. In the Debian folklore of libraries (at large, not OCaml-specific) that's a feature, not a bug. Indeed usually libraries do not contain debugging symbols and where is deemed appropriate an extra -dbg library package is built containing debugging information. Since the standard libraries are compiled with debugging support it seems like it would make sense to do the same for others. Yes, it might be slightly slower, but anyone who cares about speed will probably be compiling native code anyways. In the specific case of OCaml libraries I think we never discussed the issue and therefore I think the standard libraries just happen to be compiled that way (probably because they are compiled that way upstream) without any particular reason. So, at the moment I'm tagging this bug report as wontfix, but diverting the more general question of should we mandate inclusion of debugging symbols in OCaml bytecode libraries? to the debian-ocaml-maint mailing list. On one hand we should be consistent with the general library philosophy of not including debugging symbols in packages other than -dbg. On the other it is true that a user willing to have performances will use native code libraries, but is still true that native code libraries are not available everywhere ... One interesting question here, is what is the cost of adding those debugging symbols ? Is this cost a performance hit, or only a size increase ? Is anyone familiar with how debugging is implemented in ocaml ? Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 02:54:29PM +0200, Julien Cristau wrote: OCaml libraries are static, so if there is a way to take a library compiled with -g and link a program with it that results in an executable without debugging symbols, then I think we should do that, because that means you would decide at link time whether you want your program to carry debugging symbols, and library packages are only useful for developers anyway. I made some tests, have a look at this: [EMAIL PROTECTED]:~/t$ ls -l total 104 -rw-r--r-- 1 zack zack 173 2007-04-09 15:06 a.cmi -rw-r--r-- 1 zack zack 1055 2007-04-09 15:06 a.cmo -rw-r--r-- 1 zack zack 1055 2007-04-09 15:05 a.cmo_debug -rw-r--r-- 1 zack zack 227 2007-04-09 15:04 a.cmo_no_debug -rw-r--r-- 1 zack zack44 2007-04-09 15:04 a.ml -rwxr-xr-x 1 zack zack 48575 2007-04-09 15:05 a.out_debug_all -rwxr-xr-x 1 zack zack 12025 2007-04-09 15:04 a.out_no_debug_all -rwxr-xr-x 1 zack zack 12025 2007-04-09 15:06 a.out_no_debug_main -rw-r--r-- 1 zack zack 135 2007-04-09 15:06 main.cmi -rw-r--r-- 1 zack zack 176 2007-04-09 15:06 main.cmo -rw-r--r-- 1 zack zack10 2007-04-09 15:04 main.ml How I generated them (simplified from the actual commands, but hopefully enough to get the figure): - ocamlc -c -g a.ml - a.cmo_debug - ocamlc -g a.cmo_debug main.ml - a.out_debug_all - ocamlc -c a.ml - a.cmo_no_debug - ocamlc a.cmo_no_debug main.ml - a.out_no_debug_all - ocamlc a.cmo_debug main.ml - a.out_no_debug_main So, apparently, Julien's guess is right: it is indeed possible to link without debugging information OCaml objects which have been previously linked with debugging information. To be sure a bit of investigation in the source code of the compiler will be needed though (volunteers?). If this is confirmed I propose to amend our policy to state that OCaml libraries should be compiled forcibly with -g. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time signature.asc Description: Digital signature
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, 2007-04-09 at 14:47 +0200, Stefano Zacchiroli wrote: On Mon, Apr 09, 2007 at 09:25:34PM +1000, skaller wrote: Is it still possible to use the debugger and get a backtrace etc if there are no debugging symbols in these libraries? Of course not, but this is not the point. Indeed, the same argument can be made for C libraries, but for C libraries the default is not to ship debugging symbols, why OCaml should make a difference from this point of view? A strong form of my previous statement is: bytecode has no use *other* than debugging I have native code compiler, why would I bother with bytecode except to work around the fact the Ocaml debugger doesn't work with native code? Of course, I don't believe such a strong statement is correct, it isn't representative of what other people do, and it isn't an argument for or against including debugging symbols, so much as a data point for your consideration. The situation IS different to C because there is a coupling: bytecode -- debugging native code --- performance which doesn't exist in C. For example I might build two versions of an executable: A) the production version, native code, -unsafe, fast B) the debug version, bytecode, safe and if I have problems with (A) then try (B). Such a model favours bytecode with debug symbols .. there's no use in that model for bytecode without debug symbols. But still not an argument here -- just a data point for consideration. -- John Skaller skaller at users dot sf dot net Felix, successor to C++: http://felix.sf.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, 2007-04-09 at 15:12 +0200, Stefano Zacchiroli wrote: So, apparently, Julien's guess is right: it is indeed possible to link without debugging information OCaml objects which have been previously linked with debugging information. Of course native code (I mean C) is just the same. You can run strip on object files and executables, and it also has no impact on performance .. not even much on load time: if the OS isn't completely brain dead the pages for the library will be mmaped right off the disk and the RAM for the mmaped debug symbols won't be allocated unless they're used. So again .. the situation is quite similar to C, yet Debian has a policy not to ship the debug symbols. In the old days perhaps this made sense, but not on a modern 64 bit machine, where you have heaps of both address and disk space (compared to program code sizes anyhow). So either Debian is out of touch .. or there are additional reasons like running Linux on a mobile phone or cost of downloading a complete Debian installation being blown up: Ubuntu tries to fit the whole desktop environment on a single CD. Again .. simply a data point .. this time on the opposite side of the argument compared to my last one (to show I'm neutral :). -- John Skaller skaller at users dot sf dot net Felix, successor to C++: http://felix.sf.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
I am a victim of abuse.. a person put my email in much mailing list... PLEASE UNSUBSCRIBE ME Guia Artistica www.guiaartistica.com.ar -Mensaje original- De: Stefano Zacchiroli [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 09 de Abril de 2007 06:58 a.m. Para: Ivan Jager; Debian Ocaml Maint ML CC: [EMAIL PROTECTED] Asunto: Bug#415194: libextlib-ocaml-dev: No debugging information [ Ob: debian-ocaml-maint, look at the end of this mail ] tags 415194 + wontfix thanks On Fri, Mar 16, 2007 at 06:55:27PM -0400, Ivan Jager wrote: The bytecode files are currently compiled without debugging support. This makes it hard to debug other code that might be called by it. Eg, a function passed to List.iter. In the Debian folklore of libraries (at large, not OCaml-specific) that's a feature, not a bug. Indeed usually libraries do not contain debugging symbols and where is deemed appropriate an extra -dbg library package is built containing debugging information. Since the standard libraries are compiled with debugging support it seems like it would make sense to do the same for others. Yes, it might be slightly slower, but anyone who cares about speed will probably be compiling native code anyways. In the specific case of OCaml libraries I think we never discussed the issue and therefore I think the standard libraries just happen to be compiled that way (probably because they are compiled that way upstream) without any particular reason. So, at the moment I'm tagging this bug report as wontfix, but diverting the more general question of should we mandate inclusion of debugging symbols in OCaml bytecode libraries? to the debian-ocaml-maint mailing list. On one hand we should be consistent with the general library philosophy of not including debugging symbols in packages other than -dbg. On the other it is true that a user willing to have performances will use native code libraries, but is still true that native code libraries are not available everywhere ... Lenny-discussion time guys :) Thanks for your bug report. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, 9 Apr 2007, Stefano Zacchiroli wrote: On Mon, Apr 09, 2007 at 09:25:34PM +1000, skaller wrote: Is it still possible to use the debugger and get a backtrace etc if there are no debugging symbols in these libraries? Of course not, but this is not the point. Indeed, the same argument can be made for C libraries, but for C libraries the default is not to ship debugging symbols, why OCaml should make a difference from this point of view? That's the question we should find an answer for (or alternatively remove the debugging symbols from all OCaml libraries...). You can still get a partial backtrace, like in C, but it's a bit less useful than in C. One reason is tha lack of disasm. A bigger problem is polymorphism. Without debugging symbols in *every* function in the backtrace, it's not generally possible to infer the type of a polymorphic variable, so ocamldebug can't print it. So the big difference in my mind is that for C you usually don't need debugging symbols for the libraries unless you are debugging the libraries themselves. In Ocaml you need debugging symbols for the library if you are debugging any function that is being called by the library, and, due to the increased use of higher order functions, that happens a lot. Ivan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 11:58:03AM +0200, Stefano Zacchiroli wrote: So, at the moment I'm tagging this bug report as wontfix, but diverting the more general question of should we mandate inclusion of debugging symbols in OCaml bytecode libraries? to the debian-ocaml-maint mailing list. On one hand we should be consistent with the general library philosophy of not including debugging symbols in packages other than -dbg. On the other it is true that a user willing to have performances will use native code libraries, but is still true that native code libraries are not available everywhere ... I've just commit a change to our policy which mandates the compilation of bytecode libraries with -g and forbid it for bytecode programs. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time signature.asc Description: Digital signature
Bug#415194: libextlib-ocaml-dev: No debugging information
On Mon, Apr 09, 2007 at 07:51:41PM +0200, Stefano Zacchiroli wrote: I've just commit a change to our policy which mandates the compilation of bytecode libraries with -g and forbid it for bytecode programs. I pinger vorlon on this on IRC. He suggested to get in touch with d-policy for this, explaining why OCaml libraries should be in our opinion be handled differently than other libraries. I argued with him that the reason why it is so is that we are talking only about -dev libraries and hence space on the non-developer user is not wasted. I haven't yet prepared the mail for -policy though. Anyone willing to do so before please step forward, possibly Cc-ing this list. Otherwise I'll do so in the next few days. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time signature.asc Description: Digital signature
Bug#415194: libextlib-ocaml-dev: No debugging information
Package: libextlib-ocaml-dev Version: 1.5-6 Severity: normal Tags: patch The bytecode files are currently compiled without debugging support. This makes it hard to debug other code that might be called by it. Eg, a function passed to List.iter. Since the standard libraries are compiled with debugging support it seems like it would make sense to do the same for others. Yes, it might be slightly slower, but anyone who cares about speed will probably be compiling native code anyways. Here's a pretty trivial patch: diff -ru extlib.orig/install.ml extlib-1.5/install.ml --- extlib.orig/install.ml 2007-03-16 18:46:27.0 -0400 +++ extlib-1.5/install.ml 2007-03-16 18:47:41.0 -0400 @@ -160,7 +160,7 @@ if !autodoc not (Sys.file_exists doc_dir) then run (sprintf mkdir %s doc_dir); run (sprintf ocamlc -c %s (m_list .mli)); if !autobyte then begin - List.iter (fun m - run (sprintf ocamlc -c %s.ml m)) modules; + List.iter (fun m - run (sprintf ocamlc -g -c %s.ml m)) modules; run (sprintf ocamlc -a -o extLib.cma %s extLib.ml (m_list .cmo)); List.iter (fun m - remove (m ^ .cmo)) modules; remove extLib.cmo; -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-2-amd64 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages libextlib-ocaml-dev depends on: ii ocaml-findlib 1.1.2pl1-1 Management tool for OCaml programm ii ocaml-nox [ocaml-nox-3.09.2] 3.09.2-9 ML language implementation with a libextlib-ocaml-dev recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]