From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: Will Newton <will.newton@gmail.com>,
Johan Oudinet <johan.oudinet@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/erlang: do not hard-code the Erlang Interface Version (EI_VSN)
Date: Wed, 15 Feb 2023 07:29:56 +0100 [thread overview]
Message-ID: <20230215062956.GA2718518@scaer> (raw)
In-Reply-To: <4f51a196-e922-1e9e-6fbb-e81b35dc9f73@mind.be>
Arnout, All,
On 2023-02-14 22:30 +0100, Arnout Vandecappelle spake thusly:
> On 10/02/2023 22:55, Yann E. MORIN wrote:
[--SNIP--]
> >Although both the host and target erlang are the same, we still look
> >into the corresponding file to extract the version. This is so that it
> >would be easier if in the future we ever manage to rely on a
> >system-installed erlang that could have a EI_VSN different from the
> >target one.
This ^^^ [0] ...
[--SNIP--]
> >@@ -36,9 +36,9 @@ ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
> > HOST_ERLANG_DEPENDENCIES += host-autoconf
> > HOST_ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
> >-# Whenever updating Erlang, this value should be updated as well, to the
> >-# value of EI_VSN in the file lib/erl_interface/vsn.mk
> >-ERLANG_EI_VSN = 3.13.2.2
> >+# Return the EIV (Erlang Interface Version, EI_VSN)
> >+# $(1): base directory, i.e. either $(HOST_DIR) or $(STAGING_DIR)/usr
> >+erlang_ei_vsn = `sed -r -e '/^erl_interface-(.+)/!d; s//\1/' $(1)/lib/erlang/releases/$(ERLANG_RELEASE)/installed_application_versions`
> Since this is only used by rebar-package, I think it should move to pkg-rebar.mk.
I also thought about that, but the knowledge where the file is installed
is in erlang, so it makes sense that erlang exports away its own
version, like the variable was set previously.
That's also what we do for AUTOCONF, AUTORECONF, AUTOMAKE et al: they
are defined in their respective packages, but used in the
autotools-package infra.
> > # The configure checks for these functions fail incorrectly
> > ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
> >diff --git a/package/pkg-rebar.mk b/package/pkg-rebar.mk
> >index e4e3f3bb6c..4b993dd970 100644
> >--- a/package/pkg-rebar.mk
> >+++ b/package/pkg-rebar.mk
> >@@ -32,10 +32,10 @@ REBAR_TARGET_DEPS_DIR = $(STAGING_DIR)/usr/share/rebar/deps
> > #
> > REBAR_HOST_DEPS_ENV = \
> > ERL_COMPILER_OPTIONS='{i, "$(REBAR_HOST_DEPS_DIR)"}' \
> >- ERL_EI_LIBDIR=$(HOST_DIR)/lib/erlang/lib/erl_interface-$(ERLANG_EI_VSN)/lib
> >+ ERL_EI_LIBDIR=$(HOST_DIR)/lib/erlang/lib/erl_interface-$(call erlang_ei_vsn,$(HOST_DIR))/lib
... [0] explains this ^^^, and ...
> Since we support only one erlang version, we could just as well put
> $(wildcard $(HOST_DIR)/lib/erlang/lib/erl_interface-*/lib)
... [0] answers that, I believe. ;-)
> or does that directory not necessarily exist yet after erlang has been installed?
The directory does exist, as erl_interface is installed by erlang (it is
kind of part of its stdlib, I'd say), and thus is registered by erlang
itself.
Regards,
Yann E. MORIN.
> Regards,
> Arnout
>
>
> > REBAR_TARGET_DEPS_ENV = \
> > ERL_COMPILER_OPTIONS='{i, "$(REBAR_TARGET_DEPS_DIR)"}' \
> >- ERL_EI_LIBDIR=$(STAGING_DIR)/usr/lib/erlang/lib/erl_interface-$(ERLANG_EI_VSN)/lib
> >+ ERL_EI_LIBDIR=$(STAGING_DIR)/usr/lib/erlang/lib/erl_interface-$(call erlang_ei_vsn,$(STAGING_DIR)/usr)/lib
> > ################################################################################
> > # Helper functions
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-02-15 6:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 21:55 [Buildroot] [PATCH] package/erlang: do not hard-code the Erlang Interface Version (EI_VSN) Yann E. MORIN
2023-02-14 21:30 ` Arnout Vandecappelle
2023-02-15 6:29 ` Yann E. MORIN [this message]
2023-08-10 21:16 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230215062956.GA2718518@scaer \
--to=yann.morin.1998@free.fr \
--cc=arnout@mind.be \
--cc=buildroot@buildroot.org \
--cc=johan.oudinet@gmail.com \
--cc=will.newton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox