Static Erlang
Grzegorz Junka
list1@REDACTED
Wed Aug 5 10:08:25 CEST 2020
Hi Leonard,
I was hoping I could achieve that just by copying the folder with the
Erlang release around. I can use the package infrastructure but it's
more work, i.e. preparing the package definition. But yeah, this could
be a solution.
Thanks
Grzegorz
On 05/08/2020 01:11, Leonard B wrote:
> Hi Grzegorz,
>
> How about flipping the script.
>
> I'm not releasing on FreeBSD, but Debian.
>
> What we do do is build a release of the app/project on the target
> version. The release includes Erlang.
>
> We then build a Deb which defines the dependencies for that build/release.
>
> In short, Erlang is not a dependency since it's built and included in
> the package. The dependancies used to build the release, which are
> standard packages on the target platform are dependencies of my Deb.
>
> Maybe that makes sense?
>
> Kind regards,
> Leonard
>
> On Tue, Aug 4, 2020, 20:41 Grzegorz Junka <list1@REDACTED
> <mailto:list1@REDACTED>> wrote:
>
> Thanks Yao. I have a BSD-based system (FreeBSD) with just the base
> system installed. I can install additional packages but my aim is
> to be
> able to distribute the release to any similar system without
> having to
> install Erlang as a dependency on each one.
>
> GrzegorzJ
>
>
> On 05/08/2020 00:31, Yao Bao wrote:
> > Hello,
> >
> > I am not sure whether running a single standalone program is
> feasible nowadays, but some points might be helpful to think about it.
> >
> > The first one comes from the Appendix 3 (A Simple Execution
> Environment) from joe's book 'Programming Erlang, Second Edition',
> but this does not answer the 'linking statically' question.
> >
> > The second one depends on what you already have with your machine.
> > - If you have an Unix-like operating system as the basis, which
> means you have an usable kernel at hand, you need to build the
> standalone program into a format which the kernel can understand
> and can run it directly (without dynamic linking libraries).
> > - If you do not have an operating system as the basis, you have
> to build the standalone program into a format which the machine
> can understand directly, in this case, machine code.
> > - If the Erlang VM can be recognized as an application operating
> system, I think the BEAM might run Erlang applications directly.
> >
> > Cheers,
> > Yao
> >
> >> 在 2020年8月3日,07:12,Grzegorz Junka <list1@REDACTED
> <mailto:list1@REDACTED>> 写道:
> >>
> >> Is it possible to compile Erlang Beam statically so that when I
> am doing a release it doesn't require any dynamically loaded
> libraries on the host to which the release is being deployed? I
> was trying the various configure options but the compilation was
> failing (for various reasons, mostly missing or conflicting
> function signatures). I could try again and post exact errors but
> would prefer to start with a tried and tested set of options.
> >>
> >> GrzegorzJ
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200805/ffc9b6bf/attachment.htm>
More information about the erlang-questions
mailing list