For playing with distributed stuff, I’m using a bunch of Ubuntu ‘machines’ running under VMWare Server. There’s no particular reason for using Ubuntu other than that I happened to have a VM image (Ubuntu-6.06.1-desktop-i386) kicking around already, and it’s not really necessary to compile as packages are available, but I prefer it that way. Anyway, for reference, here is a quick guide to compiling Erlang from the starting point of a basic Ubuntu installation:
- From your home directory, get the Erlang source: wget http://www.erlang.org/download/otp_src_R11B-5.tar.gz
- Unpack it: tar -xzf otp_src_R11B-5.tar.gz
- Get a working gcc: sudo apt-get install build-essential
- Get the ncurses development libraries: sudo apt-get install libncurses5-dev
- Get m4: sudo apt-get install m4
- Optionally, get the ssl libraries: sudo apt-get install libssl-dev
- Go into the erlang source directory: cd otp_src_R11B-5
- Run the configuration script: ./configure
- Compile it all: make
- Install it: sudo make install
The above should all go smoothly, leaving you with a working Erlang setup. To confirm this, type erl to get an Erlang prompt.
-
Yeah… to be sure I build from R11-5 source and confirm that building is working fine.
But, it is not the case for R12-1. The error after ‘make’ is below:
januarvs@kubuntuku:~/otp_src_R12B-1$ make
cd erts/emulator && ERL_TOP=/home/januarvs/otp_src_R12B-1 make generate depend
make[1]: Entering directory `/home/januarvs/otp_src_R12B-1/erts/emulator’
make -f i686-pc-linux-gnu/Makefile generate
make[2]: Entering directory `/home/januarvs/otp_src_R12B-1/erts/emulator’
gcc -g -O3 -I/home/januarvs/otp_src_R12B-1/erts/i686-pc-linux-gnu -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS -Ibeam -Isys/unix -Isys/common -Ii686-pc-linux-gnu/opt/plain -Ii686-pc-linux-gnu -Izlib -Ihipe -I../include/internal -I../include/internal/i686-pc-linux-gnu -c hipe/hipe_mkliterals.c -o obj/i686-pc-linux-gnu/opt/plain/hipe_mkliterals.o
hipe/hipe_mkliterals.c:388: error: \u2018X86_LEAF_WORDS\u2019 undeclared here (not in a function)
hipe/hipe_mkliterals.c:389: error: \u2018X86_NR_ARG_REGS\u2019 undeclared here (not in a function)
make[2]: *** [obj/i686-pc-linux-gnu/opt/plain/hipe_mkliterals.o] Error 1
make[2]: Leaving directory `/home/januarvs/otp_src_R12B-1/erts/emulator’
make[1]: *** [generate] Error 2
make[1]: Leaving directory `/home/januarvs/otp_src_R12B-1/erts/emulator’
make: *** [depend] Error 2
januarvs@kubuntuku:~/otp_src_R12B-1$I tried to build without hipe, by submitting ‘configure –disable-hipe’ but still not lucky.
-
Any ideas what package we need for wx to work? It’s included in R13B01.
Thanks
Nina

6 comments
Comments feed for this article
Trackback link: http://ciarang.com/posts/compiling-erlang-on-ubuntu/trackback