[erlang-questions] Creating an application that is portable across versions of CentOS

Jim Rosenblum jim.rosenblum@REDACTED
Sat Dec 20 18:05:05 CET 2014


Thanks for everyone's replies. I have a better understanding of expectations and things to look at. Thanks. 

Sent from my iPhone

> On Dec 20, 2014, at 4:11 AM, Loïc Hoguin <essen@REDACTED> wrote:
> 
> The beam files are portable. The VM itself is not. As a first guess I would look to see if there are libc incompatibilities between the CentOS versions which would make loading the executables fail. Another possible issue is crypto, if you didn't compile it statically.
> 
> If that fails I would use file or ld or other on the erl or erlexec executable to figure out what the problem is. Running erl directly might also give a better error message.
> 
>> On 12/20/2014 04:30 AM, Jim wrote:
>> I thought one of the value propositions of Erlang was its portability? Both are amd64 architectures. What expectations should one have regarding portability of beam files?
>> 
>> Sent from my iPad
>> 
>>>> On Dec 19, 2014, at 5:19 PM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
>>>> 
>>>> On Fri, Dec 19, 2014 at 4:55 PM, jim rosenblum wrote:
>>>> I have a standard OTP application in which I use Rebar to generate a
>>>> release.
>>>> When I tar up the appropriate release directory, I can explode it on
>>>> another CentOS 6.2 machine, and it will run with no problems. But
>>>> when I explode it on a CentOS 5.2 machine, it will not run giving
>>>> the following output:
>>>> 
>>>> #bin/jc console
>>>> Exec: /root/test/jc/erts-6.2/bin/erlexec -boot
>>>> /root/test/jc/releases/1.0.0/jc -mode embedded -config
>>>> /root/test/jc/releases/1.0.0/sys.config -args_file
>>>> /root/test/jc/releases/1.0.0/vm.args -- console
>>>> Root: /root/test/jc
>>>> bin/jc: line 224: /root/test/jc/erts-6.2/bin/erlexec: cannot execute
>>>> binary file
>>>> bin/jc: line 224: /root/test/jc/erts-6.2/bin/erlexec: Success
>>>> 
>>>> Should this work? If so, can someone share the tricks to
>>>> portability.
>>> 
>>> Just to be sure, both CentOS installations are amd64, right?
>>> 
>>> If so, maybe the erlexec binary built on or for CentOS 6.2 is
>>> incompatible with 5.2's system libs or missing extra libs not
>>> installed on the 5.2 machine.
>>> 
>>> Also, assuming you've built or are using Erlang for CentOS 6.2, your
>>> chances of using a release from CentOS 5.2 on the CentOS 6.2 machine
>>> are most likely higher.
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> 
> -- 
> Loïc Hoguin
> http://ninenines.eu



More information about the erlang-questions mailing list