[erlang-questions] distel-mode with *.beam files separate from source

Mats Cronqvist mats.cronqvist@REDACTED
Fri May 23 14:44:42 CEST 2008


Paul Fisher wrote:
> On Fri, 2008-05-23 at 10:55 +0200, Mats Cronqvist wrote:
>   
>> Paul Fisher wrote:
>>     
>>>     top/
>>>         bld/
>>>             erlang/
>>>                 application/
>>>                     ebin/
>>>                         *.app files
>>>                         *.beam files
>>>                     src/ -> top/project/application/
>>>         project/
>>>             application/
>>>                 *.app files
>>>                 *.erl files
>>>
>>> Basically, the idea is that project/* is under version control and then
>>> the erlang applications are built into the top/bld/erlang/ directory
>>> outside of version control in order to not pollute the project/*
>>> structure with *.beam files, as well as aid in packaging.
>>>
>>> Problem is that even though the erlang node has
>>> top/bld/erlang/application/ebin in the path, distel mode does not appear
>>> to try ../src/ based on the module location reported by the node.
>>>       
>>   could be that the OTP filelib functions don't follow links.
>>   are you using the GNU autotools to build out-of-tree?
>>     
>
> Did a little digging and from the bottom distel:find_source/1 certainly
> seems to find the source file (by the
> path /top/project/application/source.erl) correctly, so maybe there is
> something else going one unrelated to the source tree, or possibly
> tangentially related.  Here is the actual error I get in the
> *erl-output* buffer that is created when I toggle on interactive:
>
> ** Invalid beam file or no abstract code:
> "/top/project/application/source.erl"

  this in all likelihood means that the beam does not contain any debug 
info.
  try "erlc +debug_info" (the erlc equivalent of cc -g)

  the int man page (http://erlang.org/doc/man/int.html) says this;
"The interpreter needs both the source code and the object code, and the 
object code *must* include debug information. That is, only modules 
compiled with the option debug_info set can be interpreted."

  how you're supposed to get from the error message to finding that 
piece of doc is unclear. probably includes sacrificing chickens inside 
pentagrams (at least that's how i did it.)

  mats



More information about the erlang-questions mailing list