mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
Build fails #1543
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pepa65 on GitHub.
Subject of the issue
Build fails
Your environment
9824d94a1cfrom githubcargo build -j 1 --release --features sqlite --verboseSteps to reproduce
Expected behaviour
Build successful
Actual behaviour
Error
Relevant logs
All steps green until:
@pepa65 commented on GitHub:
Yes, 1.43.0+dfsg1+llvm-1
exp1ubuntu218.04.1 here...I installed rustup (had to be an insecure snap) and did
rustup default nightly.Then the same command seems to lead to the same error... I probably need to use a different command?
@BlackDex commented on GitHub:
Please follow: https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary
And use the link to the rustup install there.
Also, the root of the bitwarden_rs source has a rust-toolchain file which should trigger cargo to download and install that version.
9824d94a1c/rust-toolchain (L1)@pepa65 commented on GitHub:
I tried
rustup run nightly cargo build -j 1 --release --features sqlite --verboseand got:@BlackDex commented on GitHub:
It looks like you are using the stable version of rust instead of the nightly. That will not work for the master branch. It should work for the async branch, but that one is not synced with master, and thus misses some features/fixes.
@pepa65 commented on GitHub:
I purged all rust from my system and started with
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shfollowed byrustup override set nightlyand then I didrustup run nightly cargo build -j 1 --release --features sqlite --verbose:@pepa65 commented on GitHub:
OK, that's what I thought... This system has only 1GB of RAM and I hadn't needed to setup any swap before, but with 2GB of swap it finishes the build!! Sorry for the noise here, I guess this project is more geared towards docker and not really expected to just build on its own, and I missed the excellent wiki... (Which would deserve a mention in the readme, because so few projects have one!)
@BlackDex commented on GitHub:
Hmm, could you check your host system logs and dmesg. It kinda looks like you have not enough memory because of the sigkill which comes by.
@mqus commented on GitHub:
I also want to chime in and say that I think that this server is perfectly suited for compiling and running baremetal. I compiled it on a rasperry pi 3 multiple times in the past, although I'm not sure how much memory it needed while compiling(i had 10gig swap attached) it was always working after 2-3 hours. And the final binary needs much less memory to work with so this is not a big issue for runtime performance.
@BlackDex commented on GitHub:
Well it should build on most systems just fine, i think nobody has tried it yet in a low memory system. So, good to know, now we can mention this in the wiki. And I'll check if we can find a nice spot to mention the wiki in the readme.