[erlang-questions] sinan build fails: internal error in beam_asm

Elias Torres <>
Sun Feb 8 01:16:23 CET 2009


Hi Thomas,

http://erlang.org/doc/man/erl.html has all of the information you need
regarding command line arguments.

-pa simply adds your directories to the beginning of the code path.

When I write an application I simply use -s mod_name which calls by
default mod_name:start/0 which then call application:start(my_app) or
whatever.

I too tried faxien/sinan/etc at first and ended up with a non-fully
working setup that made me very uncomfortable because I didn't know
everything that was happening on my behalf.

Have you read Mitchell's tutorials? These might be very beneficial
since they build everything from the ground up and eventually will
lead you to a good starting template.

http://spawnlink.com/articles/bundling-erlybank-as-an-application/

Cheers,

-Elias

2009/2/7 Thomas Brian <>:
> Thanks, actually I already saw that documentation and knew about
> application:start(). I was looking for a simpler way to do that, because
> spawning a shell and typing that everytime is rather tedious.
> Also, my application -- as I would guess most erlang apps -- is a server, so
> having to spawn a shell is not very practical as I need to logout after I
> started the application.
> After some extensive search, I found that I could start my app with :
> erl -pa _build/development/apps/foo-0.1.0/ebin/ -boot
> _build/development/releases/0.1.0.0/testapp
> It seems weird to me that sinan does not provide a quick command such as
> "sinan run" to start the app. Moreover I couldn't find this command (erl -pa
> ... -boot ...) in any tutorial I read. My assumption was that this was a
> really basic task most people would need. Am I wrong in guessing that?
>
> Besides, sinan build still spits this cryptic message in my face on my
> development machine (Mac OS 10.5.6). I couldn't find anything interesting on
> google. I was able to get sinan to work on Ubuntu, but I'd much rather have
> it on my main OS.
>
> On Fri, Feb 6, 2009 at 3:17 PM, Hynek Vychodil <>
> wrote:
>>
>> May be this should be helpful:
>> http://www.erlang.org/doc/design_principles/part_frame.html
>> Starting and Stopping Applications:
>> http://www.erlang.org/doc/design_principles/applications.html#7.7
>>
>> 2009/2/6 Thomas Brian <>
>>>
>>> Hi,
>>> I'm trying to get a little bit more familiar with Erlang, and so far have
>>> only done the very basics: playing with the shell, writing a basic network
>>> server with gen_tcp and gen_server, etc.
>>> I am now interested in Sinan to help me build a bigger app. I started
>>> with sinan gen which builds what looks like a sensible template to me. But
>>> sinan build fails to compile anything :
>>> $ sinan build
>>> [build] start
>>> [build] Building
>>> /Users/Taum/Documents/Erlang/testapp/lib/foo/src/foo_sup.erl
>>> [build]
>>> /Users/Taum/Documents/Erlang/testapp/lib/foo/src/foo_sup.erl:none:error:internal
>>> error in beam_asm;
>>> crash reason: {{badmatch,{error,enoent}},
>>>                [{filename,absname,1},
>>>                 {compile,beam_asm,1},
>>>                 {compile,'-internal_comp/4-anonymous-1-',2},
>>>                 {compile,fold_comp,3},
>>>                 {compile,internal_comp,4},
>>>                 {compile,internal,3}]}
>>>
>>> On a side note, I'm also having a very hard time finding basic
>>> documentation about how to manage an app in Erlang/OTP: how to get started,
>>> run it, etc. Are there any good ressources out there I might have overlooked
>>> ?
>>> Cheers,
>>> Thomas
>>> _______________________________________________
>>> erlang-questions mailing list
>>> 
>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>> --
>> --Hynek (Pichi) Vychodil
>>
>> Analyze your data in minutes. Share your insights instantly. Thrill your
>> boss.  Be a data hero!
>> Try Good Data now for free: www.gooddata.com
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list