emqx / emqtt-bench

Lightweight MQTT benchmark tool written in Erlang
https://www.emqx.com
Apache License 2.0
515 stars 132 forks source link

error:~/emqtt-bench$ make /home/deploy/emqtt-bench/scripts/ensure-rebar3.sh 3.19.0-emqx-1 /home/deploy/emqtt-bench/rebar3 compile /usr/bin/env: ‘escript’: No such file or directory Makefile:12: recipe for target 'compile' failed make: *** [compile] Error 127 #213

Closed q534953428 closed 1 year ago

q534953428 commented 1 year ago
image

cd emqtt-bench/ make

~/emqtt-bench$ make /home/deploy/emqtt-bench/scripts/ensure-rebar3.sh 3.19.0-emqx-1 /home/deploy/emqtt-bench/rebar3 compile /usr/bin/env: ‘escript’: No such file or directory Makefile:12: recipe for target 'compile' failed make: *** [compile] Error 127

q534953428 commented 1 year ago

I tried otp_src_20.3/ and otp_src_22.3 and it didn't work

q534953428 commented 1 year ago

Ask for advice

id commented 1 year ago

@q534953428 looks like escript is not in $PATH. Please make sure that bin directory of Erlang/OTP distribution is in the $PATH.

q534953428 commented 1 year ago

您好,来信已经收到,我尽快给您回复。

q534953428 commented 1 year ago
image

How do I check?

id commented 1 year ago

@q534953428 how did you install Erlang/OTP? what does which erl say? Could you run ls in the directory where you have erl?

q534953428 commented 1 year ago
image

wget http://erlang.org/download/otp_src_22.3.tar.gz tar xzf otp_src_22.3.tar.gz cd otp_src_22.3 ./configure --prefix=/home/erlang --without-javac
make & make install ln -s /home/erlang/bin/erl /usr/local/bin/erl export PATH=$PATH:/home/erlang/bin

thalesmg commented 1 year ago

Does your distribution have Erlang available? It might be simpler to install from that.

Also, note that OTP 22 is quite old by now, emqtt-bench supports OTP 24 and higher.

q534953428 commented 1 year ago

你的发行版有 Erlang 可用吗?从那里安装可能更简单。

另外请注意,OTP 22 现在已经很老了,emqtt-bench 支持 OTP 24 及更高版本。

ok,我试试OTP 24

q534953428 commented 1 year ago

A new error message has been reported

Submodule path 'submodules/openssl/wycheproof': checked out '2196000605e45d91097147c9c71f26b72af58003' ./build.sh: 18: ./build.sh: cmake: not found Makefile:11: recipe for target 'build-nif' failed make[1]: *** [build-nif] Error 127 make[1]: Leaving directory '/home/deploy/emqtt-bench/_build/default/lib/quicer' ===> Hook for compile failed!

Makefile:12: recipe for target 'compile' failed make: *** [compile] Error 1

image
id commented 1 year ago

@q534953428 try this

BUILD_WITHOUT_QUIC=1 make
q534953428 commented 1 year ago

BUILD_WITHOUT_QUIC=1 make

image

Thank you but still fail

id commented 1 year ago

@q534953428 it's again the old error about escript. How did you manage to solve it previously?

id commented 1 year ago

Also if you have docker, it might be easier to build binaries using our docker image. For example, for Debian 11 it will look like this:

rm -rf _build
docker run -it --rm -v $(pwd):/w -w /w ghcr.io/emqx/emqx-builder/5.0-33:1.13.4-24.3.4.2-3-debian11 make

We have emqx/emqx-builder images available for many different linux distros, see https://github.com/emqx/emqx-builder/pkgs/container/emqx-builder%2F5.0-33/versions?filters%5Bversion_type%5D=tagged.

q534953428 commented 1 year ago

@q534953428这又是关于 的旧错误escript。你以前是怎么解决的?

The original otp22, now I use the new otp24, the screenshot above

id commented 1 year ago

A new error message has been reported

Submodule path 'submodules/openssl/wycheproof': checked out '2196000605e45d91097147c9c71f26b72af58003' ./build.sh: 18: ./build.sh: cmake: not found Makefile:11: recipe for target 'build-nif' failed make[1]: *** [build-nif] Error 127 make[1]: Leaving directory '/home/deploy/emqtt-bench/_build/default/lib/quicer' ===> Hook for compile failed!

Makefile:12: recipe for target 'compile' failed make: *** [compile] Error 1

image

@q534953428 here you don't have problem with escript. How did you solve it?

q534953428 commented 1 year ago

报告了新的错误消息 子模块路径'submodules/openssl/wycheproof':签出'2196000605e45d91097147c9c71f26b72af58003'./build.sh:18:./build.sh:cmake:未找到Makefile:11:目标'build-nif'的配方失败[1] : [build-nif] Error 127 make[1]: Leaving directory '/home/deploy/emqtt-bench/_build/default/lib/quicer' ===> Hook for compile failed! Makefile:12: 目标“编译”的配方失败 make: [编译] 错误 1

图像

@q534953428在这里,您对 escript 没有问题。你是怎么解决的?

Upgrade otp24, try again and this is the result

id commented 1 year ago

Yes, I understand. So can you run this command on otp24 where you have escript?

BUILD_WITHOUT_QUIC=1 make`
q534953428 commented 1 year ago

是的我明白。那么你可以在你拥有的 otp24 上运行这个命令吗escript

BUILD_WITHOUT_QUIC=1 make`
image
q534953428 commented 1 year ago

是的我明白。那么你可以在你拥有的 otp24 上运行这个命令吗escript

BUILD_WITHOUT_QUIC=1 make`

escript

After an error is reported, it is an old error

id commented 1 year ago

@q534953428

The problem is that you linked erl to /usr/local/bin, but not the rest of erlang binaries.

ln -s /home/erlang/bin/erl /usr/local/bin/erl

Try this:

export PATH=$PATH:/home/erlang/bin
BUILD_WITHOUT_QUIC=1 make
q534953428 commented 1 year ago

No, I guess I'll have to use docker. Thank you

q534953428 commented 1 year ago

换成dorker后可以,我想可能master代码有些兼容问题。谢谢回答!It can be changed to dorker. I think there may be some compatibility issues with the master code. Thank you for your answer