LemmyNet / lemmy-docs

Documentation for Lemmy
https://join-lemmy.org/docs/en/index.html
GNU Affero General Public License v3.0
79 stars 89 forks source link

Cargo compile fails on lemmy_db_schema #217

Open chenew opened 1 year ago

chenew commented 1 year ago

Ubuntu 22.04 Rust 1.70.0 Postgres 15

Followed the instructions from "Install from Scratch". On the step to cargo install lemmy_server ..., it compiles a bunch of packages successfully until "lemmy_db_schema".

   Compiling lemmy_db_schema v0.17.4
error: could not compile `lemmy_db_schema` (lib)

Caused by:
  process didn't exit successfully: `rustc --crate-name lemmy_db_schema --edition=2021 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lemmy_db_schema-0.17.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=265 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C debuginfo=0 --cfg 'feature="activitypub_federation"' --cfg 'feature="bcrypt"' --cfg 'feature="deadpool"' --cfg 'feature="diesel"' --cfg 'feature="diesel-async"' --cfg 'feature="diesel-derive-newtype"' --cfg 'feature="diesel_ltree"' --cfg 'feature="diesel_migrations"' --cfg 'feature="full"' --cfg 'feature="lemmy_utils"' --cfg 'feature="once_cell"' --cfg 'feature="regex"' --cfg 'feature="serde_json"' --cfg 'feature="sha2"' -C metadata=4aebb56fff010900 -C extra-filename=-4aebb56fff010900 --out-dir /tmp/cargo-installxsktRt/release/deps -C strip=symbols -L dependency=/tmp/cargo-installxsktRt/release/deps --extern activitypub_federation=/tmp/cargo-installxsktRt/release/deps/libactivitypub_federation-897bc86130f0be37.rmeta --extern async_trait=/tmp/cargo-installxsktRt/release/deps/libasync_trait-a5469525ef2c8d0e.so --extern bcrypt=/tmp/cargo-installxsktRt/release/deps/libbcrypt-5b6fe4bbb6a3cb6f.rmeta --extern chrono=/tmp/cargo-installxsktRt/release/deps/libchrono-90f352445bd2c7a6.rmeta --extern deadpool=/tmp/cargo-installxsktRt/release/deps/libdeadpool-afa48ca0e9998a5a.rmeta --extern diesel=/tmp/cargo-installxsktRt/release/deps/libdiesel-33aae6d4e2913303.rmeta --extern diesel_async=/tmp/cargo-installxsktRt/release/deps/libdiesel_async-86ad5045e89fef94.rmeta --extern diesel_derive_newtype=/tmp/cargo-installxsktRt/release/deps/libdiesel_derive_newtype-18d428c08a926744.so --extern diesel_ltree=/tmp/cargo-installxsktRt/release/deps/libdiesel_ltree-f78daa44c42bcb02.rmeta --extern diesel_migrations=/tmp/cargo-installxsktRt/release/deps/libdiesel_migrations-e0dd6b65aab17c6b.rmeta --extern futures=/tmp/cargo-installxsktRt/release/deps/libfutures-cbe1ce8ae49b0ba8.rmeta --extern lemmy_utils=/tmp/cargo-installxsktRt/release/deps/liblemmy_utils-75badd6e66e1590e.rmeta --extern once_cell=/tmp/cargo-installxsktRt/release/deps/libonce_cell-39e43f7c04723f8f.rmeta --extern regex=/tmp/cargo-installxsktRt/release/deps/libregex-8bfbba12b3e662d4.rmeta --extern serde=/tmp/cargo-installxsktRt/release/deps/libserde-5df69ce05adb09fc.rmeta --extern serde_json=/tmp/cargo-installxsktRt/release/deps/libserde_json-e7fb33bbaefe9d16.rmeta --extern sha2=/tmp/cargo-installxsktRt/release/deps/libsha2-708facd98676a9a5.rmeta --extern strum=/tmp/cargo-installxsktRt/release/deps/libstrum-b1f9c5a0a38b0da5.rmeta --extern strum_macros=/tmp/cargo-installxsktRt/release/deps/libstrum_macros-491bc64612bddd26.so --extern tokio=/tmp/cargo-installxsktRt/release/deps/libtokio-456249e922c315f3.rmeta --extern tracing=/tmp/cargo-installxsktRt/release/deps/libtracing-d8a3440694d9ac22.rmeta --extern tracing_error=/tmp/cargo-installxsktRt/release/deps/libtracing_error-e64e01a5c50bf7ab.rmeta --extern typed_builder=/tmp/cargo-installxsktRt/release/deps/libtyped_builder-6130c85b6f8c1c69.so --extern url=/tmp/cargo-installxsktRt/release/deps/liburl-acc46009b4b0e7fb.rmeta --cap-lints allow -L native=/tmp/cargo-installxsktRt/release/build/ring-8750db4682fe8a29/out -L native=/usr/lib/x86_64-linux-gnu` (signal: 9, SIGKILL: kill)
error: failed to compile `lemmy_server v0.17.4`, intermediate artifacts can be found at `/tmp/cargo-installxsktRt`

Rebuilt server several times and from different hosting providers. Also tried using Ubuntu 20.04.

RocketDerp commented 1 year ago

I was able to compile 17.3 using the "from scratch" instructions, but 17.4 failed to compile for me too.

I ended up doing a git checkout of the code and that compiled fine. Not sure what is goin going on. I have same versions as you do. See issue #213