Raspberry Pi

480 views
Skip to first unread message

Hilmer

unread,
May 24, 2012, 4:31:51 AM5/24/12
to erlang-embedded
Hi

I have been watching the videos on running Erlang (which I love) on
the Pi (of which I own one).
So I would like to do that my self. I'm not too familiar with setting
up a cross-compiler (although I have done it once years ago).

Is the recipe for compiling Erlang for the Pi the one mentioned here:
https://github.com/esl/erlang-embedded
Or is this bitbake/OpenEmbedded route for other that Pi architectures.
I see the last change was more than a year ago.

To at least do something.
I tried to build a minimal Erlang using this script:
https://github.com/Gustav-Simonsson/Stripped-Erlang
But it does give me handful of errors after building Erlang along this
line:
Error: no such file "Compressing appmon-2.1.14.1"
...
And before them:
strip:erts-5.9.1/bin/erl.src: File format not recognized
strip:erts-5.9.1/bin/start_erl.src: File format not recognized
strip:erts-5.9.1/bin/start.src: File format not recognized

How small should the stripped Erlang be roughly?
My resulting tar.gz is around 17M.

What do you recommend to get Erlang flying on my Pi

Best
Søren

Hilmer

unread,
Jun 20, 2012, 6:19:31 AM6/20/12
to erlang-...@googlegroups.com
Okay

I got a lot further, managed to set up a cross-compilation for the Pi, and cross-compiled the ncurses library needed by Erlang.

And this succeeds until step (4): make install DESTDIR=<TEMPORARY_PREFIX>
When I issue that command it fails after a while with:

/usr/bin/install -c -d ./for_pi/usr/local/lib/erlang/lib/mnesia-4.7/examples/bench
(cd bench; /usr/bin/install -c -m 644 \
          Makefile \
          README \
          bench.erl \
          bench.hrl \
          bench_generate.erl \
          bench_populate.erl \
          bench_trans.erl \
          bench.config1 \
          bench.config2 \
          bench.config3 \
          bench.config4 \
          bench.config5 \
          bench.config6 \
          bench.config7 \
          ./for_pi/usr/local/lib/erlang/lib/mnesia-4.7/examples/bench)
/usr/bin/install: target `./for_pi/usr/local/lib/erlang/lib/mnesia-4.7/examples/bench' is not a directory
make[4]: *** [release_spec] Error 1
make[4]: Leaving directory `/home/sh/erlang/minimal_erlang/otp_src_R15B01/lib/mnesia/examples'
make[3]: *** [release] Error 2
make[3]: Leaving directory `/home/sh/erlang/minimal_erlang/otp_src_R15B01/lib/mnesia/examples'
make[2]: *** [release] Error 2
make[2]: Leaving directory `/home/sh/erlang/minimal_erlang/otp_src_R15B01/lib/mnesia'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/sh/erlang/minimal_erlang/otp_src_R15B01/lib'
make: *** [install.libs] Error 2

and my supplied DESTDIR contains nothing but empty directories.

Any ideas what I can do to get past this?

--Søren

Patrick Connors

unread,
Jun 23, 2012, 2:44:18 PM6/23/12
to erlang-...@googlegroups.com
I'm planning on using Pi as an Erlang server for a couple projects.

I just received my Pi this week. I installed the default Debian Squeeze image.
Once I got SSH enabled, I did:
  sudo apt-get update --fix-missing
  sudo apt-get install erlang --fix-missing
and waited. When the dust settled, I had a working Erlang shell.

Now to run the test suite. I'll post results when I have them.

Thanks whoever did the work!

 - Patrick Connors

Patrick Connors

unread,
Jun 23, 2012, 4:09:25 PM6/23/12
to erlang-...@googlegroups.com
Aaand I just noticed that doing it this way gets me version 14, not 15.
For my purposes, this should be OK, but your mileage may vary.

Hilmer

unread,
Jun 29, 2012, 9:56:29 AM6/29/12
to erlang-...@googlegroups.com
Nice, but I would really like to know how to cross-compile erlang my self.

The Pi is just a first :-)

But thanks for the information
  Søren


On Saturday, June 23, 2012 10:09:25 PM UTC+2, Patrick Connors wrote:
Aaand I just noticed that doing it this way gets me version 14, not 15.
For my purposes, this should be OK, but your mileage may vary.

thanos

unread,
Dec 31, 2012, 1:09:44 PM12/31/12
to erlang-...@googlegroups.com
This posting might give you some good hints...
thanos
Reply all
Reply to author
Forward
0 new messages