Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Building small erlang vm suitable for bundle with app.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Albin Stigö  
View profile  
 More options Dec 8 2011, 5:27 am
From: Albin Stigö <albin.st...@gmail.com>
Date: Thu, 8 Dec 2011 11:27:39 +0100
Local: Thurs, Dec 8 2011 5:27 am
Subject: [erlang-questions] Building small erlang vm suitable for bundle with app.
Hi,

I'm quite new to Erlang and this list so I hope I'm posting in the right place?

I would like to use Erlang code (couchdb) in an Mac OS X app I'm
developing and I would like to bundle it with my app. Exactly like the
Mac OS X version of Wings3D is bundling a version of erlang.

I was wondering if someone kind provide me with some ideas of how to
compile a smaller version of the Erlang VM without the developing
tools etc?

Cheers,
Albin
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ahmed Omar  
View profile  
 More options Dec 8 2011, 5:55 am
From: Ahmed Omar <spawn.th...@gmail.com>
Date: Thu, 8 Dec 2011 11:55:30 +0100
Local: Thurs, Dec 8 2011 5:55 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi Albin,
Yes it's the right place :)
What you are looking for is releases. You can create a release and include
the erlang runtime system (erts) executables within it. You can also
include any erlang app you have, like couchdb.

For more information about that i suggest you take a look at :
http://www.erlang.org/doc/design_principles/release_structure.html
http://learnyousomeerlang.com/release-is-the-word

--
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry Kolesnikov  
View profile  
 More options Dec 8 2011, 10:58 am
From: Dmitry Kolesnikov <dmkolesni...@gmail.com>
Date: Thu, 8 Dec 2011 17:58:39 +0200
Local: Thurs, Dec 8 2011 10:58 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi,

Yes, release is the right thing.
Just keep in mind that your release would contain platform dependent VM. If you create it on mac then you cannot run it on Linux. Thus you would need to run Linux in VirtualBox on your Mac to assemble a distributable releases.

On 8.12.2011, at 12.55, Ahmed Omar <spawn.th...@gmail.com> wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Watson  
View profile  
 More options Dec 8 2011, 12:04 pm
From: Tim Watson <watson.timo...@gmail.com>
Date: Thu, 8 Dec 2011 17:04:19 +0000
Local: Thurs, Dec 8 2011 12:04 pm
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

We do something similar to build parallel OTP for different architectures,
although our packaging system assembles the release for the system you run
it on, and then overwrites any native artefacts of the VM (i.e., shared
object files and headers) for the target OS/architecture if required. This
seems to work fine, although it's worth baring in mind that some releases
include other stuff besides erts that is platform dependant.

On 8 December 2011 15:58, Dmitry Kolesnikov <dmkolesni...@gmail.com> wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wrp  
View profile  
 More options Dec 12 2011, 10:15 pm
From: wrp <i3t...@gmail.com>
Date: Mon, 12 Dec 2011 19:15:02 -0800 (PST)
Local: Mon, Dec 12 2011 10:15 pm
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

On Dec 8, 2:55 am, Ahmed Omar <spawn.th...@gmail.com> wrote:

> What you are looking for is releases. You can create a release and include
> the erlang runtime system (erts) executables within it.
> For more information about that i suggest you take a look at...

The methods described at http://learnyousomeerlang.com/release-is-the-word
use systools and reltool, which result in rather large distributables.

"...with systools...the files are a bit large. The whole release takes
over 20 MB on disk..."

"...Some of our more general releases would weigh in at over 35 MB.
The one described above is reduced to less than 20 MB [with
reltool}... The size is still fairly large though. That's because of
ERTS, which itself takes 18.5 MB."""

However, http://www.erlang.org/faq/implementations.html says

"A 2 MB stripped Erlang system can include the beam emulator and
almost all of the stdlib, sasl, kernel, inets and runtime_tools
libraries, provided the libraries are compiled without debugging
information and are compressed..."

Are there detailed directions anywhere on building such small
distributables?
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benoit Chesneau  
View profile  
 More options Dec 13 2011, 2:15 am
From: Benoit Chesneau <bchesn...@gmail.com>
Date: Tue, 13 Dec 2011 08:15:16 +0100
Local: Tues, Dec 13 2011 2:15 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi albin,

You can use the rebared version of couchdb I've wroitten to do that. It
create a full Erlang release that you can eventually customize:

http://github.com/refuge/rcouch

& rebar template:

http://github.com/refuge/rcouch_template

hope it helps,

-benoît

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gustav Simonsson  
View profile  
 More options Dec 13 2011, 3:59 am
From: Gustav Simonsson <gustav.simons...@erlang-solutions.com>
Date: Tue, 13 Dec 2011 08:59:34 -0000 (GMT)
Local: Tues, Dec 13 2011 3:59 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi!

This is a scrappy half-completed bash script I used to generate
a small Erlang release. It's something I hope can eventually grow
into a more general and stable tool for generating Erlang releases.

It does contain some useful things for reducing the size of an
Erlang release.

Also thanks to Adam Lindberg for helping out with it.

https://github.com/Gustav-Simonsson/Stripped-Erlang/blob/master/minim...

Regards,
Gustav Simonsson

Sent from my PC


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dmitry kolesnikov  
View profile  
 More options Dec 14 2011, 3:22 am
From: dmitry kolesnikov <dmkolesni...@gmail.com>
Date: Wed, 14 Dec 2011 10:22:03 +0200
Local: Wed, Dec 14 2011 3:22 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi,

I have not yet spent too much time to investigate how to build 2MB
self-sustainable package but systools gives me about 14MB with possible
reduction to 7 - 9MB on debian 64bit.

as an example *.rel package contains following libraries:
{kernel, "2.14.5"},
{stdlib, "1.17.5"},
{sasl,   "2.1.10"},
{crypto, "2.0.4"},
{public_key, "0.13"},
{ssl,    "4.1.6"},
{inets,  "5.7.1"},
{compiler, "4.7.5"},
{syntax_tools, "1.6.7.1"},
{xmerl,    "1.2.10"},
{mochiweb, "2.3.0"}
...

systools:make_tar($$n, [{erts, code:root_dir()}]) %% do not put any extra
dirs here

most heavy components are VM by itself
-rwxr-xr-x   1 kolesnik  wheel   7.7M Oct 19 20:53 beam
-rwxr-xr-x   1 kolesnik  wheel   9.6M Oct 19 20:53 beam.smp

- Dmitry

On Tue, Dec 13, 2011 at 10:59 AM, Gustav Simonsson <

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gustav Simonsson  
View profile  
 More options Dec 14 2011, 3:41 am
From: Gustav Simonsson <gustav.simons...@erlang-solutions.com>
Date: Wed, 14 Dec 2011 08:41:42 -0000 (GMT)
Local: Wed, Dec 14 2011 3:41 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Yes, you can remove either the SMP or the non-SMP beam depending on your target architecture.
Also the only things you need to just run Erlang is ERTS and the stdlib and kernel libs.

If you want to reduce the disk usage as much as possibly you can read on methods
in chapter 3.2 and results in chapter 5.1 in the following thesis:
http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-156435

Regards,
Gustav Simonsson

Sent from my PC


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthias Lang  
View profile  
 More options Dec 14 2011, 7:35 pm
From: Matthias Lang <matth...@corelatus.se>
Date: Thu, 15 Dec 2011 01:35:17 +0100
Local: Wed, Dec 14 2011 7:35 pm
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

On Monday, December 12, wrp wrote:
> However, http://www.erlang.org/faq/implementations.html says

> "A 2 MB stripped Erlang system can include the beam emulator and
> almost all of the stdlib, sasl, kernel, inets and runtime_tools
> libraries, provided the libraries are compiled without debugging
> information and are compressed..."

> Are there detailed directions anywhere on building such small
> distributables?

That part of the FAQ was written about 10 years ago, when erts was
smaller than it is today. It's still possible to get below 3M without
pulling wild tricks, e.g. on an ARM system I have

   # du
   24      ./bin
   1019    ./lib
   1480    ./erts-5.8.4/bin
   1480    ./erts-5.8.4
   2523    .

Full list of files below.

The shrinking is done by judicious use of 'rm', plus this hack:

  http://erlang.org/pipermail/erlang-questions/2011-June/059489.html

Matt

--------------------
# ls -lR
.:
drwxrwxr-x    2 root     root             0 Dec 13 16:03 bin
drwxr-xr-x    3 root     root             0 Dec 13 16:03 erts-5.8.4
drwxr-xr-x    2 root     root             0 Dec 13 16:03 lib

./bin:
-rwxr-xr-x    1 root     root           857 Dec 12 15:00 erl
lrwxrwxrwx    1 root     root            25 Dec 13 16:03 run_erl -> ../erts-5.8.4/bin/run_erl
lrwxrwxrwx    1 root     root             6 Dec 13 16:03 run_test -> ct_run
-rwxr-xr-x    1 root     root          1159 Dec 12 15:00 start
-rw-r--r--    1 root     root          5372 Dec 12 15:00 start.boot
-rw-r--r--    1 root     root          6350 Dec 12 15:00 start.script
-rwxr-xr-x    1 root     root          1259 Dec 12 15:00 start_erl
-rw-r--r--    1 root     root          6535 Dec 12 15:00 start_sasl.boot
lrwxrwxrwx    1 root     root            24 Dec 13 16:03 to_erl -> ../erts-5.8.4/bin/to_erl

./erts-5.8.4:
drwxr-xr-x    2 root     root             0 Dec 13 16:03 bin

./erts-5.8.4/bin:
-rwxr-xr-x    1 root     root       1411656 Dec 12 15:00 beam
-rwxr-xr-x    1 root     root          9304 Dec 12 15:00 child_setup
-rwxr-xr-x    1 root     root           857 Dec 12 15:00 erl
-rwxr-xr-x    1 root     root         35168 Dec 12 15:00 erlexec
-rwxr-xr-x    1 root     root         32624 Dec 12 15:00 inet_gethost
-rwxr-xr-x    1 root     root         16068 Dec 12 15:00 run_erl
-rwxr-xr-x    1 root     root          7980 Dec 12 15:00 to_erl

./lib:
-rw-rw-r--    1 root     root         63577 Dec 12 15:00 erts-5.8.4.ez
-rw-rw-r--    1 root     root        311423 Dec 12 15:00 kernel-2.14.4.ez
-rw-rw-r--    1 root     root         39390 Dec 12 15:00 sasl-2.1.9.4.ez
-rw-rw-r--    1 root     root        628179 Dec 12 15:00 stdlib-1.17.4.ez
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Gopienko  
View profile  
 More options Dec 15 2011, 4:35 am
From: Andrew Gopienko <gopie...@gmail.com>
Date: Thu, 15 Dec 2011 16:35:30 +0700
Local: Thurs, Dec 15 2011 4:35 am
Subject: Re: [erlang-questions] Building small erlang vm suitable for bundle with app.

Hi,

You can also strip the executables and erlang beams (beam_lib:strip*).

-rwxr-xr-x 1 tdx tdx 1942300 2011-12-15 13:29 beam*
-rwxr-xr-x 1 tdx tdx 2134876 2011-12-15 13:29 beam.smp*

Andrew Gopienko

2011/12/14 dmitry kolesnikov <dmkolesni...@gmail.com>

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »