[erlang-questions] determining what erts version a .beam wascompiled with

Logan, Martin <>
Thu Jan 24 00:30:12 CET 2008


How accessible is this; if I am running R10B-x will I be able to run beam_lib:chunks on a beam file compiled for R11B-x in most cases?

-----Original Message-----
From:  [mailto:] On Behalf Of Kenneth Lundin
Sent: Wednesday, January 23, 2008 5:09 AM
To: Bengt Kleberg
Cc: 
Subject: Re: [erlang-questions] determining what erts version a .beam wascompiled with

Hi,

The interesting version info is the compiler version and that is what
you get in the example below.

You can also get the same info by loading the module and
calling M:module_info().

/Kenneth Erlang/OTP team Ericsson

On 1/23/08, Bengt Kleberg <> wrote:
> beam_lib:chunks/2 works for me:
>
> 3> ls().
> be_lib.beam
> ok
> 4> beam_lib:chunks( "be_lib.beam", [compile_info]).
> {ok,{be_lib,
>         [{compile_info,
>              [{options,
>                   [{cwd,"/home/dev_patches"},
>                    {outdir,"/home/dev_patches"}]},
>               {version,"4.3.7"},
>               {time,{2005,8,22,15,2,36}},
>               {source,"/home/dev_patches/be_lib.erl"}]}]}}
> 5>
>
>
> bengt
> Those were the days...
>    EPO guidelines 1978: "If the contribution to the known art resides
>    solely in a computer program then the subject matter is not
>    patentable in whatever manner it may be presented in the claims."
>
>
> On 01/23/08 00:18, Lennart Öhman wrote:
> > I believe there is a version attribute in the module_info tag 'compile'
> > telling at least the version of the compiler application used. I guess
> > this is actually more accurate since it must be for which beam object
> > code has been generated that is of interest. Not necessarily which
> > runtime system was used when compiling.
> > But I further guess that you must inspect this information using some
> > beam_lib function, because otherwise you must call the module_info
> > function and that means you have to load the module. But if it is
> > incompatible (younger than) to your runtime system at hand, that can
> > be difficult.
> >
> > Best Regards
> > Lennart
> >
> > ---------------------------------------------------------------------------
> > Lennart Öhman                   phone   : +46-8-587 623 27
> > Sjöland & Thyselius Telecom AB  cellular: +46-70-552 6735
> > Hälsingegatan 43, 10th floor    fax     : +46-8-667 8230
> > SE-113 31 STOCKHOLM, SWEDEN     email   : 
> > ________________________________________
> > From:  [mailto:] On Behalf Of Logan, Martin
> > Sent: den 22 januari 2008 19:05
> > To: 
> > Subject: [erlang-questions] determining what erts version a .beam was compiled with
> >
> > Does anyone know whether it is possible to tell by inspecting some .beam object code what erts vsn it was compiled on?
> >
> > Cheers,
> > Martin
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list

http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list