EMQX compilation getting failed on riscv #12894
-
i tried to compile emqx with specified erlang versions: TRIAL 1OTP/erlang - v25.0 ---> emqx v5.0.0 but in offcial doc and on github its given as "EMQX 4.4 requires OTP 24. EMQX 5.0 ~ 5.3 can be built with OTP 24 or 25. EMQX 5.4 and newer can be built with OTP 24 or 25." reference : https://github.com/emqx/emqx TRIAL 2
full logs are given at last. TRIAL 3emqx 4.4 is getting compiled with OTP-23 but i need to port newer version of emqx ..kindly help, if this is an known issue.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hello, Thanks for trying to run our code on an interesting new architecture. I don't think anyone has tried this before. Getting EMQX run on riskV is probably going to be quite challenging. First of all, Erlang doesn't support JIT compilation on RiskV: erlang/otp#7498 so the code will have to run via bytecode emulator. The performance won't be on par with AMD64 and AArch64. The good news is that the bytecode is harware-independent. The bad news is that EMQX relies on a number of native libraries. From the top of my head I can remember the following:
While QUIC and JQ may be disabled, if rocksDB NIF incompatible with RiskV, it's rather tough luck.
It looks like the rebar3 binary that we use is incompatible with your OTP version and/or system. You need to compile https://github.com/emqx/rebar3 manually on your architecture and OTP version and place the resulting binary in the EMQX project root directory. |
Beta Was this translation helpful? Give feedback.
-
Hi @ieQu1 , |
Beta Was this translation helpful? Give feedback.
-
---------------------------------------------EMQX porting updated version on RISCV ------------------------------ Porting erlang/OTP which is required for emqx to compile $ git clone https://github.com/erlang/otp.git $ git checkout OTP-26.2.4 $ ./configure $ make –j$(nproc) $ make install Porting emqx $ git clone https://github.com/emqx/emqx.git $ git checkout v5.6.0 $ make –j$(nproc) Once the build is completed , enter the below command to start emqx shell $ _build/emqx/rel/emqx/bin/emqx console |
Beta Was this translation helpful? Give feedback.
The OTP version to build the official packages can be tracked here: https://github.com/emqx/emqx/blob/master/.github/workflows/build_slim_packages.yaml#L30
The format of the tag is
5.3-2:1.15.7-26.2.1-2-ubuntu22.04' which reads as
builder_version:elixir_version-otp_version-distro`. You can search the history of this file to find what OTP version was used for each EMQX tag.