Bug#532757: Stripped debug info breaks erlang-dialyzer

2009-08-13 Thread Sergei Golovan
On Thu, Aug 13, 2009 at 2:10 PM, Michael Pitidis wrote:
>
> Distributing erlang with stripped debug info breaks dialyzer (and probably any
> application which extracts abstract code from beam files). Dialyzer requires a
> persistent lookup table (plt), containing analysis information from any
> dependencies. Any non-trivial erlang program uses several library functions
> from erlang-base, therefore it's a very common scenario to build a plt from
> some of these libraries.

I know that dialyzer and debugger don't work when the debug info is
stripped from beam files.

The idea of removing debug info was to reduce the size of the packages
making them more usable in embedded environment and fit small-size
media (needed for UbuntuOne project).

So, now I'm a bit unsure which way to prefer - restore debug info in
beams or leave dialyzer and debugger broken. Building set of -dbg
packages (installable simultaneously) seem to be too complicated
(technically it's possible to point erlang root to an alternative
directory, but it'd be hard to make other packages installed to
/usr/lib/erlang/lib work with that setup).

Cheers!
-- 
Sergei Golovan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#532757: Stripped debug info breaks erlang-dialyzer

2009-08-13 Thread Michael Pitidis
Package: erlang
Version: 1:13.b.1-dfsg-5
Severity: normal


Hello,

Distributing erlang with stripped debug info breaks dialyzer (and probably any
application which extracts abstract code from beam files). Dialyzer requires a
persistent lookup table (plt), containing analysis information from any
dependencies. Any non-trivial erlang program uses several library functions
from erlang-base, therefore it's a very common scenario to build a plt from
some of these libraries.

Example output follows:


$ dialyzer
  Checking whether the PLT /home/mike/.dialyzer_plt is up-to-date...
dialyzer: Could not find the PLT: /home/mike/.dialyzer_plt
Use the options:
   --build_plt   to build a new one; or
   --add_to_plt  to add to an existing PLT
For example (in an installed Erlang/OTP system):
   dialyzer --build_plt -r $ERL_TOP/lib/erts-5.7/ebin\
   $ERL_TOP/lib/kernel/ebin\
   $ERL_TOP/lib/stdlib/ebin\
   $ERL_TOP/lib/mnesia/ebin\
   $ERL_TOP/lib/crypto/ebin
Note that building a PLT such as the above may take 20 mins or so

$ dialyzer --build_plt -r 
/usr/lib/erlang/lib/{compiler-*,kernel-*,dialyzer-*,erts-*,stdlib-*}/ebin

dialyzer: Could not get abstract code for file:
/usr/lib/erlang/lib/compiler-4.6.2/ebin/beam_asm.beam (please recompile it with 
+debug_info)

$ dialyzer --src --build_plt -r 
/usr/lib/erlang/lib/{compiler-*,kernel-*,dialyzer-*,erts-*,stdlib-*}/src 

dialyzer: {dialyzer_error,"Byte code compiled with debug_info is needed to 
build the PLT"}
[{dialyzer_options,check_output_plt,1},
 {dialyzer_options,postprocess_opts,1},
 {dialyzer_options,build,1},
 {dialyzer_cl_parse,cl,1},
 {dialyzer_cl_parse,start,0},
 {dialyzer,plain_cl,0},
 {init,start_it,1},
 {init,start_em,1}]


Dialyzer users are forced to rebuild erlang as per the README.Debian file.
Providing separate -dbg packages or something similar would prove more
convenient, unless there's a workaround I'm unaware of.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages erlang depends on:
ii  erlang-appmon1:13.b.1-dfsg-5 Erlang/OTP application monitor
ii  erlang-asn1  1:13.b.1-dfsg-5 Erlang/OTP modules for ASN.1 suppo
ii  erlang-base-hipe 1:13.b.1-dfsg-5 Erlang/OTP HiPE enabled virtual ma
ii  erlang-common-test   1:13.b.1-dfsg-5 Erlang/OTP application for automat
ii  erlang-corba 1:13.b.1-dfsg-5 Erlang/OTP applications for CORBA 
ii  erlang-crypto1:13.b.1-dfsg-5 Erlang/OTP cryprographic modules
ii  erlang-debugger  1:13.b.1-dfsg-5 Erlang/OTP application for debuggi
ii  erlang-dev   1:13.b.1-dfsg-5 Erlang/OTP development libraries a
ii  erlang-dialyzer  1:13.b.1-dfsg-5 Erlang/OTP discrepancy analyzer ap
ii  erlang-docbuilder1:13.b.1-dfsg-5 Erlang/OTP application for buildin
ii  erlang-edoc  1:13.b.1-dfsg-5 Erlang/OTP module for generating d
ii  erlang-et1:13.b.1-dfsg-5 Erlang/OTP event tracer applicatio
ii  erlang-eunit 1:13.b.1-dfsg-5 Erlang/OTP module for unit testing
ii  erlang-gs1:13.b.1-dfsg-5 Erlang/OTP graphics system
ii  erlang-ic1:13.b.1-dfsg-5 Erlang/OTP IDL compiler
ii  erlang-inets 1:13.b.1-dfsg-5 Erlang/OTP Internet clients and se
ii  erlang-inviso1:13.b.1-dfsg-5 Erlang/OTP trace tool
ii  erlang-megaco1:13.b.1-dfsg-5 Erlang/OTP implementation of Megac
ii  erlang-mnesia1:13.b.1-dfsg-5 Erlang/OTP distributed relational/
ii  erlang-observer  1:13.b.1-dfsg-5 Erlang/OTP application for investi
ii  erlang-odbc  1:13.b.1-dfsg-5 Erlang/OTP interface to SQL databa
ii  erlang-os-mon1:13.b.1-dfsg-5 Erlang/OTP operating system monito
ii  erlang-parsetools1:13.b.1-dfsg-5 Erlang/OTP parsing tools
ii  erlang-percept   1:13.b.1-dfsg-5 Erlang/OTP concurrency profiling t
ii  erlang-pman  1:13.b.1-dfsg-5 Erlang/OTP process manager
ii  erlang-public-key1:13.b.1-dfsg-5 Erlang/OTP public key infrastructu
ii  erlang-reltool   1:13.b.1-dfsg-5 Erlang/OTP release management tool
ii  erlang-runtime-tools 1:13.b.1-dfsg-5 Erlang/OTP runtime tracing/debuggi
ii  erlang-snmp  1:13.b.1-dfsg-5 Erlang/OTP SNMP applications
ii  erlang-ssh   1:13.b.1-dfsg-5 Erlang/OTP implementation of SSH p
ii  erlang-ssl   1:13.b.1-dfsg-5 Erlang/OTP implementation of SSL
ii  erlang-syntax-tools  1:13.b.1-dfsg-5 Erlang/OTP modules for handling ab
ii  erlang-test-server   1:13.b.1-dfsg-5 Erlang/OTP server for automated ap
ii  erlang-toolbar   1:13.b.1-dfsg-5 Erlang/OTP graphical toolbar
ii