spiral-modules / roadrunner-binary

💾 High-performance PHP application server, load-balancer and process manager written in Golang. RR2 releases repository.
MIT License
44 stars 25 forks source link

[BUG] v2.5.0 binary for linux #118

Closed cappuc closed 2 years ago

cappuc commented 2 years ago

I tried this code:

./vendor/bin/rr get-binary

On first run it gave this warning and downloaded v2.4.2:

Environment:
   - Version:          2.*
   - Stability:        stable
   - Operating System: linux
   - Architecture:     amd64

 [WARNING] unknown/unknown v2.5.0 does not contain available assembly (further search in progress)

On next runs the warning disappeared and it downloaded v2.5.0 but when running rr it gives this error: sh: ./rr: not found.

I tested it on alpine linux inside docker container

cappuc commented 2 years ago

With 2.5.0-beta.2 it works With 2.5.0-rc.1 and 2.5.0-rc.2 it gives the same error: sh: ./rr: not found

rustatian commented 2 years ago

Hey @cappuc . I restarted the build a few minutes ago, so now everything should be ok. Could you please retry the download?

cappuc commented 2 years ago

I retried but it gives the same error. Maybe the file is cached on github cdn and it downloads the old build?

rustatian commented 2 years ago

@cappuc What version of the roadrunner-cli do you use?

cappuc commented 2 years ago

./vendor/bin/rr --version RoadRunner CLI 2.5.0

rustatian commented 2 years ago

@cappuc I mean this one: https://github.com/spiral/roadrunner-cli, there is no 2.5 version.

cappuc commented 2 years ago

the latest: v2.0.11

cappuc commented 2 years ago

The problem is not in the download: the binary is downloaded and ./rr file exists but when launching it with sh it gives sh: ./rr: not found error

rustatian commented 2 years ago

You need to do chmod +x rr

cappuc commented 2 years ago

I found the problem:

The rr binary requires /lib64/ld-linux-x86-64.so.2 library and is not present in alpine by default Installing libc6-compat package resolves the problem

rustatian commented 2 years ago

For the alpine, please, use the musl version: https://github.com/spiral/roadrunner-binary/releases/download/v2.5.0/roadrunner-2.5.0-unknown-musl-amd64.zip

cappuc commented 2 years ago

For the alpine, please, use the musl version: https://github.com/spiral/roadrunner-binary/releases/download/v2.5.0/roadrunner-2.5.0-unknown-musl-amd64.zip

Without installing libc6-compat it doesn't work

rustatian commented 2 years ago

For the alpine, please, use the musl version: https://github.com/spiral/roadrunner-binary/releases/download/v2.5.0/roadrunner-2.5.0-unknown-musl-amd64.zip

Without installing libc6-compat it doesn't work

Yeah, because it's not a fully static build. Go needs to link some OS libs for the user/net packages (and some others). I just wanted to say, that for the alpine we have a different binary.