I'm attempting to run dialyzer on my code on Ubuntu 9.10 with the Erlang
version (R13B01) that ships with Ubuntu. Dialyzer tells me I need to build
my plt file. When I attempt to do so by running the command:
dialyzer --build_plt -r
/usr/lib/erlang/lib/{compiler-*,kernel-*,dialyzer-*,erts-*,stdlib-*}/ebin
I get the error message, 'dialyzer: Could not get abstract code for
file...'. Searching online it seems that the debug info has been stripped
out of the beam files of the Erlang shipped with Ubuntu to reduce the size
as per: https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/385093.
Do I need to download/compiler Erlang myself with the debug info to use
dialyzer or am I missing something here (can I find the debug info somewhere
else)?
Thanks,
Jeremy
does this work ? ...
$ dialyzer --build_plt --apps compiler kernel dialyzer erts stdlib
~Michael
________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org
I think you should do yourself a favour and scrap the Ubuntu Erlang
package and instead go for installing yourself the source version of
R13B03, which builds .beam files with debug_info in them (as it should).
Besides the ability to run dialyzer on your code, you will end up with a
better/newer Erlang system. The installation process itself should be
trivial.
Kostis
> Do I need to download/compiler Erlang myself with the debug info to use
> dialyzer or am I missing something here (can I find the debug info
> somewhere else)?
I run myself into exactly the same situation a few weeks ago. I might be
mistaken but I think you need to either download the sources and compile
Erlang yourself (with the proper configuration), or else download the .deb files
from another distribution which may be packaged with different compilation
options. The latter is what I did, specifically Debian package files.
Regards,
--
Laura M. Castro
MADS Group - Computer Science Department
University of A Corunna
http://www.madsgroup.org/staff/laura/index_en.html
The Ubuntu default Erlang install is located at:
/usr/{bin, lib/erlang, etc}
and the version I built myself goes to
/usr/local/{bin, lib/erlang, etc}
so there's no conflict on the install.
In the future when I download a newer Erlang version, compile it and install
it again, do I need to manually delete the old install (if I want the same
location) or will the new version do the right thing on make install and
just overwrite the current install?
Thanks,
Jeremy
2009/12/18 Laura Milagros Castro Souto <lca...@udc.es>
> In the future when I download a newer Erlang version, compile it and install
> it again, do I need to manually delete the old install (if I want the same
> location) or will the new version do the right thing on make install and
> just overwrite the current install?
>
You don't really need to manually delete it (at least not in my
empirical experience), but what you'll find is that the
/usr/local/lib/erlang/lib directory will continue to acquire more and
more subdirectories, since they're named by the version of the library,
so the new ones won't overwrite the old ones. Erlang will always
correctly select the newest one, so it's more of a tidiness issue than
any problem with functionality.
I don't have a nice solution for this, unfortunately - there doesn't
seem to be an 'uninstall' make target...anyone got a suggestion?
Cheers,
Bernard
Why does Dialyzer not support building plt from source code? It would be
an easy solution to install the packaged OTP sources and generate the
plt from them.
> Besides the ability to run dialyzer on your code, you will end up with a
> better/newer Erlang system. The installation process itself should be
> trivial.
You have a point here, but using packaged software has its own
advantages too, and Erlang packages in Debian are getting better and
better. (Maybe there will be packages built with debug_info sometime,
who knows.)
Laszlo
Regards,
Zoltan.
It does. But I doubt that the Ubuntu erlang package includes the source
code for libs.
> It would be
> an easy solution to install the packaged OTP sources and generate the
> plt from them.
>
>> Besides the ability to run dialyzer on your code, you will end up with
>> a better/newer Erlang system. The installation process itself should
>> be trivial.
>
> You have a point here, but using packaged software has its own
> advantages too, and Erlang packages in Debian are getting better and
> better. (Maybe there will be packages built with debug_info sometime,
> who knows.)
In Debian yes. In Ubuntu not. Apparently, the Ubuntu people who
decided distributing erlang without debug_info do not fully understand
the consequences of their action (and their excuse is lame). Somebody
who cares about Ubuntu should tell them.
Kostis
That's great, how can I do that? "dialyzer --src --build_plt" says "Byte
code compiled with debug_info is needed to build the PLT" (at least
versions 1.9.2 and 2.1.0).
> But I doubt that the Ubuntu erlang package includes the source
> code for libs.
Well, it doesn't, but at least there is a separate erlang-src package
which contains all the sources. (So much for preserving disk
space/bandwidth by excluding debug_info...)
Laszlo
According to the change logs the patch that disables debug info in
Ubuntu 9.10 was inherited from Debian:
http://packages.debian.org/changelogs/pool/main/e/erlang/erlang_13.b.2.1-dfsg-1/changelog
http://changelogs.ubuntu.com/changelogs/pool/main/e/erlang/erlang_13.b.1-dfsg-2ubuntu1/changelog
/Mikael
* Restored debug info in beam files for default build. It's better to use
more space than to ship broken modules (debugger, dialyzer)...
However Ubuntu (obviously) is still without them. I posted a question on the
Ubuntu bug related to this asking if they've included them anywhere else as
an alternative as they discussed this in the issue.
Jeremy
https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/498558
<https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/498558>Jeremy
I believe you that it is capable to support it, but it doesn't do so.
The "--src" and "--build_plt" options are simply not accepted together.
(I have tried it before asking, really.)
> The problem, however, is that you also need to provide all includes,
> defines and such that exists in the Makefiles.
Thanks, this explains all.
Hi Lovei!
I made a PPA with the Ubuntu Erlang package rebuilt with debug info a
few minutes ago.
https://edge.launchpad.net/~erlang-dev/+archive/ppa
If you go to that page it will explain how to add the PPA to your
Ubuntu system, you should then be able to update and get a rebuilt
erlang package installed that included debug info.
I have no experience using Dialyzer myself, so I haven't confirmed
that the package works although I expect it to. If you or someone else
can confirm that the package works and actually contains the debug
info I'd appreciate that.
> In Debian yes. In Ubuntu not. Apparently, the Ubuntu people who decided
> distributing erlang without debug_info do not fully understand the
> consequences of their action (and their excuse is lame). Somebody who cares
> about Ubuntu should tell them.
Wow Kostis that's a rather rude comment. What is the lame excuse that
you are talking about? From my firsthand knowledge of the situation in
both Debian and Ubuntu as it evolved (and speaking as the manager of
the dev team that petitioned to have Erlang included in the default
Ubuntu install), the Ubuntu developers do understand the consequences,
which are that building a smaller runtime made the erlang packages
small enough that we could fit them and CouchDB onto the LiveCD and
ship CouchDB installed by default for all desktop Ubuntu installs. I
realize this creates an inconvenience for Erlang developers who aren't
building Erlang from source, and just never got around to setting up
an alternate PPA. I do care about making Erlang development easy on
Ubuntu (although I am not an official Ubuntu developer), which is why
I'm working on setting up this PPA at 11:45 PM on a saturday night.
Jeremy, although I first noticed this discussion because of following
erlang-questions, I really appreciate you submitting that bug report
to Ubuntu and including all the details. I think the bug should be
closed as wontfix, and I hope the PPA that I set up helps solve the
problem. In fact, I'm open to working on getting newer releases of
Erlang into that or a similar PPA to make life even better for people
who are doing erlang development work on Ubuntu. My full response in
the bug is available here:
https://bugs.edge.launchpad.net/ubuntu/+source/erlang/+bug/498558/comments/2
--
Elliot Murphy | https://launchpad.net/~statik/
Also where would one locate the general information about the Ubuntu Erlang
packages? I'd be great if the info on adding the Erlang dev ppa were
available wherever the normal documentation is for this. Had these ppa been
available earlier where would I have looked to know of it's existence? Where
can I get info on updates?
Thanks a lot. Your quick responses and support on this are much appreciated!
A bit of work, but worth it I think, especially since all the work
Sergei is doing in debian can be reused.
In the last day or two Sergei uploaded r13b3 to debian. Tonight i
merged that to Ubuntu Lucid, and asked for a review (since I'm not an
Ubuntu developer I can propose changes but they have to be reviewed
and uploaded by an Ubuntu core dev).
I also built r13b3 for Karmic (9.10), and it's testbuilding in my
personal PPA now:
https://edge.launchpad.net/~statik/+archive/ppa/+packages
If that works ok it can be copied to the erlang-dev PPA I showed you earlier.
> Also where would one locate the general information about the Ubuntu Erlang
> packages? I'd be great if the info on adding the Erlang dev ppa were
> available wherever the normal documentation is for this. Had these ppa been
> available earlier where would I have looked to know of it's existence? Where
> can I get info on updates?
Thats a good question. I just created https://wiki.ubuntu.com/Erlang
with some basic info on it, you are welcome to extend this page as you
see fit.
> Thanks a lot. Your quick responses and support on this are much appreciated!
I'm happy to help. None of us working on Ubuntu have time to do
everything we want to do, so it's always nice to be able to fix
something quickly and help make things better. Since so much cool
software is being written in Erlang now, we definitely need more
people to learn how to package Erlang software for both Debian and
Ubuntu - if anyone wants to get involved, it would be most welcome.
-elliot