Closed Ryahn closed 1 year ago
Hi @Ryahn, I will try to reproduce it with docker. I think it would be nice if we add a matric to the workflows to test compilation with different OS versions and rustic. In fact @WarmBeer opened this an issue https://github.com/torrust/torrust-tracker/issues/70 to compile binaries for different targets for the releases.
I'm using:
Hi @Ryahn, I'm trying to reproduce your error but in the meantime, I think the most likely problem is that you do not have: libsqlite3-dev
. See prerequisites here.
@Ryahn could you run cargo build --verbose
to see if we get a more detailed error?
Running `rustc --crate-name axum_client_ip --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C linker-plugin-lto -C debuginfo=1 -C debug-assertions=on -C metadata=adf3b8cc086e3966 -C extra-filename=-adf3b8cc086e3966 --out-dir /root/torrust-tracker/target/debug/deps -L dependency=/root/torrust-tracker/target/debug/deps --extern axum=/root/torrust-tracker/target/debug/deps/libaxum-d522ab48147e76b9.rmeta --extern forwarded_header_value=/root/torrust-tracker/target/debug/deps/libforwarded_header_value-33dc02f483df1291.rmeta --extern serde=/root/torrust-tracker/target/debug/deps/libserde-5c209eb49ec1a5b4.rmeta --cap-lints allow`
error[E0658]: `let...else` statements are unstable
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/rudimental.rs:178:9
|
178 | let Ok(fv) = ForwardedHeaderValue::from_forwarded(header_value) else {return Vec::new()};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `axum-client-ip` due to previous error
Caused by:
process didn't exit successfully: `rustc --crate-name axum_client_ip --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C linker-plugin-lto -C debuginfo=1 -C debug-assertions=on -C metadata=adf3b8cc086e3966 -C extra-filename=-adf3b8cc086e3966 --out-dir /root/torrust-tracker/target/debug/deps -L dependency=/root/torrust-tracker/target/debug/deps --extern axum=/root/torrust-tracker/target/debug/deps/libaxum-d522ab48147e76b9.rmeta --extern forwarded_header_value=/root/torrust-tracker/target/debug/deps/libforwarded_header_value-33dc02f483df1291.rmeta --extern serde=/root/torrust-tracker/target/debug/deps/libserde-5c209eb49ec1a5b4.rmeta --cap-lints allow` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
My enviroment: Debian bookworm (testing) rustc 1.63.0 cargo 1.65.0
Running `rustc --crate-name axum_client_ip --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C linker-plugin-lto -C debuginfo=1 -C debug-assertions=on -C metadata=adf3b8cc086e3966 -C extra-filename=-adf3b8cc086e3966 --out-dir /root/torrust-tracker/target/debug/deps -L dependency=/root/torrust-tracker/target/debug/deps --extern axum=/root/torrust-tracker/target/debug/deps/libaxum-d522ab48147e76b9.rmeta --extern forwarded_header_value=/root/torrust-tracker/target/debug/deps/libforwarded_header_value-33dc02f483df1291.rmeta --extern serde=/root/torrust-tracker/target/debug/deps/libserde-5c209eb49ec1a5b4.rmeta --cap-lints allow` error[E0658]: `let...else` statements are unstable --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/rudimental.rs:178:9 | 178 | let Ok(fv) = ForwardedHeaderValue::from_forwarded(header_value) else {return Vec::new()}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information For more information about this error, try `rustc --explain E0658`. error: could not compile `axum-client-ip` due to previous error Caused by: process didn't exit successfully: `rustc --crate-name axum_client_ip --edition=2021 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-client-ip-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C linker-plugin-lto -C debuginfo=1 -C debug-assertions=on -C metadata=adf3b8cc086e3966 -C extra-filename=-adf3b8cc086e3966 --out-dir /root/torrust-tracker/target/debug/deps -L dependency=/root/torrust-tracker/target/debug/deps --extern axum=/root/torrust-tracker/target/debug/deps/libaxum-d522ab48147e76b9.rmeta --extern forwarded_header_value=/root/torrust-tracker/target/debug/deps/libforwarded_header_value-33dc02f483df1291.rmeta --extern serde=/root/torrust-tracker/target/debug/deps/libserde-5c209eb49ec1a5b4.rmeta --cap-lints allow` (exit status: 1) warning: build failed, waiting for other jobs to finish...
My enviroment: Debian bookworm (testing) rustc 1.63.0 cargo 1.65.0
Hi @starblazr rust 1.68 is the stable channel since 2023-03-09. let...else
statements are already stable. And that is a dependency. If we want to support rust 1.63 we might need to change other dependencies. I would steak to the stable version. If you cannot update rust maybe you can use docker. Anyway, we need to define an official policy for supporting older rust versions.
cc @torrust/torrust-developers
Hi @Ryahn,
I've created this repo:
https://github.com/josecelano/torrust-tracker-on-ubuntu-focal
I've tried with docker, but I can't reproduce your problem. It's working fine.
Make sure you have at least these dependencies:
apt-get -y install build-essential libsqlite3-dev
If you can run cargo build --verbose
and put the output here that may help find your problem.
@josecelano lokks like it's working now. I found that once I created a 4G swapfile, it didn't produce any errors. I wasn't getting any out of memory errors. Might have been something with the OS template with the host I am using.
@josecelano lokks like it's working now. I found that once I created a 4G swapfile, it didn't produce any errors. I wasn't getting any out of memory errors. Might have been something with the OS template with the host I am using.
Same for me, with the docker container, I had to increase the resources. Maybe we should include a "minimum resources needed" list on the app requirements.
We could also add a "troubleshooting" section on the documentation.
cc @torrust/torrust-developers
Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal
rustc 1.68.0 (2c8cc3432 2023-03-06) binary: rustc commit-hash: 2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74 commit-date: 2023-03-06 host: x86_64-unknown-linux-gnu release: 1.68.0 LLVM version: 15.0.6
cargo 1.68.0 (115f34552 2023-02-26)
process didn't exit successfully:...(signal: 9, SIGKILL: kill)