Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2018 22:54:18 +0100
From:      Dave Cottlehuber <dch@skunkwerks.at>
To:        Mark Felder <feld@FreeBSD.org>
Cc:        freebsd-erlang@freebsd.org
Subject:   Re: OTP 21 for Elixir
Message-ID:  <1545083658.3844726.1611810712.3E70D623@webmail.messagingengine.com>
In-Reply-To: <1543169033.1614100.1588217512.255D59F1@webmail.messagingengine.com>
References:  <1543082061.2469181.1587532960.27FCA82A@webmail.messagingengine.com> <1543154636.3838455.1588079696.6FEBA2CC@webmail.messagingengine.com> <1543169033.1614100.1588217512.255D59F1@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, Nov 25, 2018, at 08:03, Dave Cottlehuber wrote:
> > ```
> > $ export PATH=/usr/local/lib/erlang21/bin:$PATH
> > $ mix ...
> 
> Elixir will not currently compile with lang/erlang-runtime21; I assume 
> because erlc is not in $PATH. I haven't had time to dig into the 
> specifics of the elixir-runtime ports. Are they complete but just 
> lacking symlinks of binaries into ${PREFIX}/bin ? If so I think we might 
> be able to fix this easier.
> 
> 
> -- 
>   Mark Felder

Hi Mark,

Just following up on this, apologies if this is all obvious to you already.

- normally people create an "OTP release" for distributing applications (e.g. databases/couchdb2 and net/rabbitmq)
- these releases are byte code + erlang runtime + sometimes DLLs (aka NIFs)
- the elixir mix compiler (built under OTP 19) will happily build a release for a newer OTP release (e.g. OTP 21) if that erlc is in the PATH as above
- the resulting release can be run independently of the OTP19 + elixir originally used to build with

I'm only aware of a couple of obscure cases where the OTP build used for Elixir has any bearing on the ability to build and run elixir apps using a newer OTP runtime, so you should be fine with prepending the Elixir path where-ever required.

https://svnweb.freebsd.org/ports/head/databases/couchdb2/files/couchdb2.in?view=markup#l39 is a pretty solid example of doing this, (although it includes a hack to force Erlang to use the existing erlang package release in patch-rel_reltool.config).

If you need more info let me know, happy to help.

Regarding the ports, it's reasonably common to have multiple OTP versions installed concurrently and softlinking them doesn't feel right to me.

A+
Dave



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1545083658.3844726.1611810712.3E70D623>