sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.12k stars 194 forks source link

could not compile `sozu` #1016

Closed redat00 closed 1 year ago

redat00 commented 1 year ago

Hello everyone !

Was trying to install Sozu on a clean Debian host, but I'm not able to due to the following errors :

root@bookworm:~# CARGO_TARGET_DIR=/tmp/cargo-installgSFCBk cargo install sozu
    Updating crates.io index
  Installing sozu v0.15.9
    Updating crates.io index
   Compiling sozu v0.15.9
error: could not compile `sozu` (bin "sozu")

Caused by:
  process didn't exit successfully: `/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name sozu --edition=2021 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sozu-0.15.9/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=211 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="jemallocator"' -C metadata=2b8193b8fbc08928 -C extra-filename=-2b8193b8fbc08928 --out-dir /tmp/cargo-installgSFCBk/release/deps -L dependency=/tmp/cargo-installgSFCBk/release/deps --extern anyhow=/tmp/cargo-installgSFCBk/release/deps/libanyhow-94b7395c89edd8b1.rlib --extern async_dup=/tmp/cargo-installgSFCBk/release/deps/libasync_dup-bc9c1ecc042e5318.rlib --extern async_io=/tmp/cargo-installgSFCBk/release/deps/libasync_io-b1e1d5443c0bd96c.rlib --extern clap=/tmp/cargo-installgSFCBk/release/deps/libclap-80000646a1f0885f.rlib --extern futures=/tmp/cargo-installgSFCBk/release/deps/libfutures-0081453f476db1a5.rlib --extern futures_lite=/tmp/cargo-installgSFCBk/release/deps/libfutures_lite-71d887f1db86d303.rlib --extern hex=/tmp/cargo-installgSFCBk/release/deps/libhex-4f441a2b3d616433.rlib --extern jemallocator=/tmp/cargo-installgSFCBk/release/deps/libjemallocator-cf81775b138ad438.rlib --extern lazy_static=/tmp/cargo-installgSFCBk/release/deps/liblazy_static-b3eac7b1efe0daf0.rlib --extern libc=/tmp/cargo-installgSFCBk/release/deps/liblibc-2fefe96d4490f02d.rlib --extern log=/tmp/cargo-installgSFCBk/release/deps/liblog-e9c072abf79b5d2b.rlib --extern mio=/tmp/cargo-installgSFCBk/release/deps/libmio-e4dc29d1664d0a72.rlib --extern nix=/tmp/cargo-installgSFCBk/release/deps/libnix-98e4c5ee5cb4e809.rlib --extern nom=/tmp/cargo-installgSFCBk/release/deps/libnom-7fd66106e736d474.rlib --extern num_cpus=/tmp/cargo-installgSFCBk/release/deps/libnum_cpus-94ff6899ef336c5e.rlib --extern paw=/tmp/cargo-installgSFCBk/release/deps/libpaw-be9da80a5f67e5ba.rlib --extern prettytable=/tmp/cargo-installgSFCBk/release/deps/libprettytable-6fb9234b46c2604f.rlib --extern rand=/tmp/cargo-installgSFCBk/release/deps/librand-df36bda434596f18.rlib --extern regex=/tmp/cargo-installgSFCBk/release/deps/libregex-ad96e1dfc7063aa2.rlib --extern serde=/tmp/cargo-installgSFCBk/release/deps/libserde-50dabc93c9249455.rlib --extern serde_json=/tmp/cargo-installgSFCBk/release/deps/libserde_json-3f39e8381a2e6926.rlib --extern slab=/tmp/cargo-installgSFCBk/release/deps/libslab-72d753d30b7fd76f.rlib --extern smol=/tmp/cargo-installgSFCBk/release/deps/libsmol-e651e232ea189b6e.rlib --extern sozu_command_lib=/tmp/cargo-installgSFCBk/release/deps/libsozu_command_lib-ef62f05baa32c88a.rlib --extern sozu_lib=/tmp/cargo-installgSFCBk/release/deps/libsozu_lib-207f08fac80ef1c4.rlib --extern tempfile=/tmp/cargo-installgSFCBk/release/deps/libtempfile-f86e3e03aa4ab3af.rlib --extern termion=/tmp/cargo-installgSFCBk/release/deps/libtermion-ce51a3c87ff289af.rlib --extern time=/tmp/cargo-installgSFCBk/release/deps/libtime-8d2717f38ff38c42.rlib --extern x509_parser=/tmp/cargo-installgSFCBk/release/deps/libx509_parser-ee2856bcaa0685e5.rlib --cap-lints allow -L native=/tmp/cargo-installgSFCBk/release/build/jemalloc-sys-60c8f05012ce92d7/out/build/lib -L native=/tmp/cargo-installgSFCBk/release/build/ring-b696ee0c75f2af64/out` (signal: 9, SIGKILL: kill)
error: failed to compile `sozu v0.15.9`, intermediate artifacts can be found at `/tmp/cargo-installgSFCBk`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I'm unsure about what the actual error is, maybe I'm missing some packages required to build Sozu. I did install build-essential however.

Cargo version

root@bookworm:~# cargo --version
cargo 1.73.0 (9c4383fb5 2023-08-26)

Rustc version

root@bookworm:~# rustc --version
rustc 1.73.0 (cc66ad468 2023-10-03)

Thanks in advance for the help !

FlorentinDUBOIS commented 1 year ago

Hello @redat00, it seems to be an out of memory issue, could you compile it in a computer with more memory ?

redat00 commented 1 year ago

Hi ! Thanks, you were right, sorry I didn't see that.. Not used to building Rust app.

Works well now, was able to do what I wanted :) https://github.com/redat00/sozu-deb