All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Hunleth <fhunleth@troodon-software.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v6 16/16] ejabberd: new package.
Date: Thu, 5 Feb 2015 09:25:20 -0500	[thread overview]
Message-ID: <CA+-urNQHoD3ozLxeR-h+8K0fDuCQThQUjOiBHWJ0kb08UsgteA@mail.gmail.com> (raw)
In-Reply-To: <20150205085525.140473af@free-electrons.com>

On Thu, Feb 5, 2015 at 2:55 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Frank Hunleth,
>
> On Wed, 4 Feb 2015 16:17:25 -0500, Frank Hunleth wrote:
>
>> I'm not going to claim to be an Erlang expert, but I can add some
>> information. Applications that use lager need to enable Lager's parse
>> transform on the host Erlang compiler. The parse transform extracts
>> things like module, function, and line number information whenever
>> lager:warn, lager:info, etc. are called, so that it can be included in
>> the log messages. The parse transform actually has to be compiled for
>> the host. When you're not cross-compiling, it doesn't look as weird.
>
> Ok, thanks for the explanation.
>
>> Also, I should say that I've been quietly watching the various Erlang
>> patches on the mailing list. What I've seen looks pretty good. I do
>> use Erlang with Buildroot, but I use the Erlang Release tools to
>> generate the final images. This makes for smaller root filesystems
>> (Erlang's libraries are huge and largely irrelevant to most apps) and
>> is more compatible with how Erlang people do things. However, it's
>> definitely not how I think that things should be done in the Buildroot
>> project. I think that you guys are doing it right, so if I work a
>> project that just needs ejabberd or another Erlang app, then I'm going
>> to switch over to this framework. Thanks for doing this!
>
> Is there a way of doing the same as those Erlang Release tools, and
> make sure only the really used libraries are kept?

It might be possible. Almost all Erlang applications use a framework
called OTP. I actually think that you can ignore applications that
don't use OTP since they're almost exclusively toy apps. OTP requires
that each application and library have or generate a .app file that
lists all of its dependencies and some other info. This .app file also
contains information used at run-time, so it's guaranteed to be
installed. If you knew the top level Erlang applications that you
wanted, you could construct the dependency graph through all of the
libraries and either include or exclude them in the final image. The
Erlang release tools do this, but their goal is to copy everything
they need to a "release" directory. It's kind of like copying just the
stuff you need from staging to the target directory, but probably
enough different that the Erlang release tools can't be used as is. I
also suspect that there are enough subtle differences between how
Erlang projects set up their directory structures to make this a
non-trivial effort, but I haven't looked deeply into it.

Frank

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

  reply	other threads:[~2015-02-05 14:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  9:32 [Buildroot] [PATCH v6 00/16] ejabberd: XMPP server Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 01/16] package/erlang: export EI_VSN so other packages can use it Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 02/16] package/pkg-rebar: new infrastructure Johan Oudinet
2015-02-03  9:28   ` Thomas Petazzoni
2015-02-24 17:07     ` Johan Oudinet
2015-02-24 18:09       ` Frank Hunleth
2015-01-12  9:32 ` [Buildroot] [PATCH v6 03/16] docs/manual: add documentation for the pkg-rebar infrastructure Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 04/16] erlang-goldrush: new package Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 05/16] erlang-lager: " Johan Oudinet
2015-02-03  9:29   ` Thomas Petazzoni
2015-01-12  9:32 ` [Buildroot] [PATCH v6 06/16] erlang-p1-zlib: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 07/16] erlang-p1-yaml: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 08/16] erlang-p1-xml: " Johan Oudinet
2015-02-03  9:29   ` Thomas Petazzoni
2015-01-12  9:32 ` [Buildroot] [PATCH v6 09/16] erlang-p1-utils: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 10/16] erlang-p1-tls: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 11/16] erlang-p1-stun: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 12/16] erlang-p1-stringprep: " Johan Oudinet
2015-02-03  9:54   ` Thomas Petazzoni
2015-01-12  9:32 ` [Buildroot] [PATCH v6 13/16] erlang-p1-sip: " Johan Oudinet
2015-02-03  9:55   ` Thomas Petazzoni
2015-01-12  9:32 ` [Buildroot] [PATCH v6 14/16] erlang-p1-iconv: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 15/16] erlang-p1-cache-tab: " Johan Oudinet
2015-01-12  9:32 ` [Buildroot] [PATCH v6 16/16] ejabberd: " Johan Oudinet
2015-02-03  9:56   ` Thomas Petazzoni
2015-02-03 10:35     ` Johan Oudinet
2015-02-03 11:32       ` Thomas Petazzoni
2015-02-04 21:17         ` Frank Hunleth
2015-02-05  7:55           ` Thomas Petazzoni
2015-02-05 14:25             ` Frank Hunleth [this message]
2015-02-03  9:26 ` [Buildroot] [PATCH v6 00/16] ejabberd: XMPP server Thomas Petazzoni
2015-02-03  9:56   ` Johan Oudinet

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=CA+-urNQHoD3ozLxeR-h+8K0fDuCQThQUjOiBHWJ0kb08UsgteA@mail.gmail.com \
    --to=fhunleth@troodon-software.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.