Open rnowak opened 3 years ago
git clone https://github.com/erlang/otp.git --depth 1 -b OTP-24.0-rc2 otp-24.0-rc2
cd otp-24.0-rc2
./otp_build autoconf
./configure --prefix=/opt/erlang/24.0-rc2-emu
make
make FLAVOR=emu
You need to first build a normal system, then you can build the emu flavor. A patch to make this clearer in the documentation would be most welcome.
It seemingly builds fine with the above instructions; both make invocations go through without any errors. However, I don't seem to be able to start it as described.
$ /opt/erlang/24.0-rc2-emu/bin/erl -emu_flavor emu
erlexec: Invalid emulator type or flavor. Available combinations are:
-emu_flavor smp
Starting it with smp
seems to start the JIT version:
$ /opt/erlang/24.0-rc2-emu/bin/erl -emu_flavor smp
Erlang/OTP 24 [RELEASE CANDIDATE 2] [erts-12.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Eshell V12.0 (abort with ^G)
1> erlang:system_info(emu_flavor).
jit
Could be that it only works in the source tree and not when doing a make install
. It is really only meant to be a debugging feature to be able to build both. If you need a non-jit version, the best way is to build using --disable-jit
.
From within the source tree:
$ bin/erl -emu_flavor emu
Erlang/OTP 24 [RELEASE CANDIDATE 2] [erts-12.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Eshell V12.0 (abort with ^G)
1> erlang:system_info(emu_flavor).
emu
That works indeed.
I didn't realize this was meant to only be a debugging feature. "It is possible to have both the JIT and interpreter available at the same time." made it sound like this was intended for normal usage, at least to me.
Thank you very much for the help. I will see if I can suggest documentation improvements over the weekend.
I didn't realize this was meant to only be a debugging feature. "It is possible to have both the JIT and interpreter available at the same time." made it sound like this was intended for normal usage, at least to me.
Yes, it could have been clearer. My thought was that the fact that it is only mentioned in the internal documentation section of erts would imply this, but better so be extra clear on these things.
$ /opt/erlang/24.0-rc2-emu/bin/erl -emu_flavor emu erlexec: Invalid emulator type or flavor. Available combinations are: -emu_flavor smp
This is because beam.emu
is not installed in your $PREFIX/lib/erlang/erts-*/bin
. I could get around the problem by doing this:
./configure
make
make FLAVOR=emu
make install
make install FLAVOR=emu
Describe the bug Building with
make FLAVOR=emu
fails.To Reproduce
Expected behavior The documentation suggests that this should be possible: http://erlang.org/documentation/doc-12.0-rc2/erts-12.0/doc/html/BeamAsm.html#is-the-interpreter-still-available-
Affected versions OTP-24.0-rc2