Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] Running sic on a managed webserver #1737

Closed
felixranesberger opened this issue Nov 13, 2023 · 3 comments
Closed

[HELP] Running sic on a managed webserver #1737

felixranesberger opened this issue Nov 13, 2023 · 3 comments
Labels
C-question Category: questions

Comments

@felixranesberger
Copy link

Hi, I want to run sic on my managed webserver, where a lot of default dependencies are not available.

The sic-x86_64-unknown-linux-gnu-v0.22.4.tgz release does not work, so I think I need a x86_64-unknown-linux-musl binary, because musl doesn't link the dependencies?

I'm pretty new to rust and tried to follow the following blog article, but to no success.
https://betterprogramming.pub/cross-compiling-rust-from-mac-to-linux-7fad5a454ab1

Do you think I can solve this issue by running a musl build?

Thanks for your help in advance!

@felixranesberger felixranesberger changed the title Running sic on a managed webserver [HELP] Running sic on a managed webserver Nov 13, 2023
@felixranesberger
Copy link
Author

This is the error I get, when running the sic-x86_64-unknown-linux-gnu-v0.22.4.tgz binary.

Screenshot 2023-11-13 at 10 02 09

@foresterre
Copy link
Owner

foresterre commented Nov 14, 2023

Probably musl can work.

For this, make sure you have the musl tools installed.
On Ubuntu (not sure about mac), you can install these with apt install musl-tools.
Then, you need the musl target for your current Rust toolchain: rustup target add x86_64-unknown-linux-musl.
Finally, build a sic binary by running: cargo build --release --target x86_64-unknown-linux-musl

For your convenience (but feel free to build your own of course!), I made a build with musl (latest commit though!).

sic-x86_64-unknown-linux-musl-0.22.4+7f5da4.zip

If you do want a version with an older glibc, you could also try to build on the webserver itself, or use a docker image. Considering the MSRV of sic is 1.66, you could for example try one of the official Rust 1.66.1 docker images. I couldn't quickly find an image which had glibc 2.{32, 33, 34}:

  • rust:1.71-slim has debian/glibc 2.31-13+deb11u6
  • rust:1.72-slim has debian/glibc 2.36-9+deb12u1

@foresterre foresterre added the C-question Category: questions label Nov 14, 2023
@felixranesberger
Copy link
Author

Due to the old glibc version (2.31), we had to build a musl version inside a docker container (as you suggested).
It works for now, but I'll make sure that my hoster updates the outdated version and then I'll switch to your version.

Thanks for the quick response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: questions
Projects
None yet
Development

No branches or pull requests

2 participants