[erlang-questions] Copying applications between different OTP versions
Kirill Zaborski
qrilka@REDACTED
Mon Jun 25 11:46:05 CEST 2007
So the only step I need is to correct rel-file and make new boot-file?
And that's it? (I have no code in C, just plain Erlang)
Thanks.
Regards,
Kirill.
On 6/25/07, Kenneth Lundin <kenneth.lundin@REDACTED> wrote:
Hi,
>
>
> On 6/25/07, Kirill Zaborski <qrilka@REDACTED> wrote:
> > No, you missed the point - in the last crash I was using R11B-5 with
> > the beam and boot files (and also stdlib, kernel and mnesia ) compiled
> > or copied from R11B.
> R11B-5 contain the Erlang VM and all applications like stdlib, kernel,
> mnesia,...
> You can run your application written in Erlang and compiled with R11B
> together with
> the R11B-5 system but you must not copy stdlib, kernel, mnesia from
> the R11B system and try to run them on R11B-5. And you have no reason
> to do that since they are bundled together with the R11B-5 system.
>
> Regarding boot scripts that you have for R11B you have to update those with the
> version of stdlib, kernel,mensia etc. that are delivered with R11B-5.
>
> If you have implemented linked in drivers (in C) for R11B you have to
> recompile these with the header files provided with R11B-5.
>
> Note that I have not tried to figure out exactly what causes the crash
> you get. I just
> try to explain how you should do to avoid problems because I get the
> impression that you are doing things the wrong way and that this is
> why you have problems.
>
> /Kenneth (Erlang/OTP team at Ericsson)
> > Maybe I do something wrong but I do not see compatibility - erl
> > crashes instead (with the output specified about beam/beam_load.c)
> > To solve the problem I have recompiled the code and created new boot script.
> > But is it possible to install my app on system newer than the system
> > used for development? I think it is but I do not understand how to do
> > it right. Right now I
> > 1. copy erts/bin folder to bin,
> > 2. modify erl script (to use new paths)
> > 3. create lib folder with the libs (from older OTP version) needed for
> > my application in it.
> > 4. copy my boot file (myapp.boot) somewhere
> > 5. run app using <new path>/bin/erl -boot <path to bootfile>/myapp
> > What do i do wrong?
> > BTW what is the normal way to upgrade OTP installation? Can I do it on
> > the running system?
> >
> > Regards,
> > Kirill.
> >
> > On 6/25/07, Kenneth Lundin <kenneth.lundin@REDACTED> wrote:
> > Hi,
> > >
> > > OTP versions are backwards compatible (at least 2 major versions back)
> > > which means for example that
> > > Erlang code developed (compiled, tested) with R10-B can be used on
> > > a R11B system, even without recompiling.
> > >
> > > You are trying the other way around , i.e. running code developed with R11B
> > > on a R10B system and that is not supported at all, it might work for some cases
> > > but is safe.
> > >
> > > When it comes to the Erlang distribution protocol the principle is to keep it
> > > compatible at least 2 major releases back which means that:
> > >
> > > An OTP R11B based node can communicate with other nodes running
> > > OTP R10B or R9C.
> > > The next upcoming major release, OTP R12B will be able to communicate with
> > > R11B and R10B nodes.
> > >
> > > /Regards Kenneth (The Erlang/OTP team at Ericsson)
> > >
> > > On 6/24/07, Kirill Zaborski <qrilka@REDACTED> wrote:
> > > > OK, I understand that.
> > > > I installed the latest version R11B-5 on target system, made an erlang
> > > > installation erts/bin folder copy put releases and lib folder from the
> > > > release I made run my boot script it was made with R11B and it seems like
> > > > libraries from R11B are not compatible with R11B-5 I receive the following
> > > > crash:
> > > >
> > > > {error_logger,{{2007,6,25},{0,34,39}},"~s~n",["beam/beam_load.c(1148):
> > > > Error loading function erl_ddll:module_info/1: op int_code_end: :
> >
> > > > exported function loaded_drivers/0 redefines BIF
> > "]}
> > > > {error_logger,{{2007,6,25},{0,34,39}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{'EXIT',{undef,[{erl_ddll,start_link,[]},{supervisor,do_start_child,2},{supervisor,start_children,3},{supervisor,init_children,2},{gen_server,init_it,6},{proc_lib,init_p,5}]}}},{offender,[{pid,undefined},{name,ddll_server},{mfa,{erl_ddll,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
> > > > {error_logger,{{2007,6,25},{0,34,39}},crash_report,[[{pid,<0.7.0>},{registered_name,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},{initial_call,{application_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,erl_reply,auth,boot_server,code_server,disk_log_server,disk_log_sup,erl_prim_loader,error_logger,file_server,file_server_2,fixtable_server,global_group,global_name_server,heart,init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_server,ddll_server,erl_epmd,inet_db,pg2],undefined,{kernel,[]},[application,application_controller,application_master,application_starter,auth,code,code_aux,packages,code_server,dist_util,erl_boot_server,erl_distribution,erl_prim_loader,erl_reply,erlang,error_handler,error_logger,file,file_server,old_file_server,file_io_server,prim_file,global,global_group,global_search,group,heart,hipe_unified_loader,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,kernel,kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_sup,disk_log,disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,erts_debug,gen_tcp,gen_udp,prim_inet,inet,inet_db,inet_dns,inet_parse,inet_res,inet_tcp,inet_udp,pg2,seq_trace,wrap_log_reader,zlib,otp_ring0],[],infinity,infinity},normal]}},{ancestors,[<
> > > > 0.6.0>]},{messages,[{'EXIT',<0.8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,21},{reductions,2063}],[]]}
> > > > {error_logger,{{2007,6,25},{0,34,39}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
> > > > {"Kernel pid
> > > > terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
> > > >
> > > > So I must always have the same OTP version on development and target system?
> > > > And then what is the reason to redistribute OTP parts with application
> > > > releases?
> > > > Maybe I miss some important part of release handling but at the moment it
> > > > looks somewhat inconsistent to me.
> > > >
> > > > Regards,
> > > > Kirill
> > > >
> > > >
> > > > On 6/24/07, Ulf Wiger <ulf@REDACTED> wrote:
> > > > > The .rel and .boot files have path names with explicit version
> > > > > numbers in them, so the loader will not be able to find the
> > > > > files, if you use a boot file with a different version of OTP.
> > > > >
> > > > > BR,
> > > > > Ulf W
> > > > >
> > > > > 2007/6/24, Kirill Zaborski < qrilka@REDACTED>:
> > > > > > Do I understand right that I can not copy my application to an older OTP
> > > > > > installation? E.g. If I make my app (boot-files and so on) with the
> > > > latest
> > > > > > OTP R11B-5 and the target system has R10B-10 (just a bit older than 1
> > > > year).
> > > > > > If I run my boot file I get
> > > > > > {"init terminating in do_boot",{'cannot load',error_handler,get_file}}
> > > > > >
> > > > > > System Principles in OTP documentation uses target_system.erl but which
> > > > is
> > > > > > not a part of OTP and I wonder why?
> > > > > > And also it is useful for creating target system in the same OS and what
> > > > if
> > > > > > I run a Windows workstation and production code should run on some kind
> > > > of
> > > > > > Unix?
> > > > > > As I understand to be able to install an application I need to have
> > > > access
> > > > > > to releases and lib directories of Erlang system so I copy myapp.tar.gz
> > > > and
> > > > > > then run release_handler:unpack_release(ReleaseName)
> > > > and
> > > > > > release_handler:install_release(Vsn). Am I right?
> > > > > >
> > > > > > Regards,
> > > > > > Kirill.
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > erlang-questions mailing list
> > > > > > erlang-questions@REDACTED
> > > > > > http://www.erlang.org/mailman/listinfo/erlang-questions
> > > > > >
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > erlang-questions mailing list
> > > > erlang-questions@REDACTED
> > > > http://www.erlang.org/mailman/listinfo/erlang-questions
> > > >
> > >
> >
>
More information about the erlang-questions
mailing list