On Tue, Mar 22, 2022 at 01:24:37AM +0100, Theo Buehler wrote:
> On Mon, Mar 21, 2022 at 07:51:32PM -0400, aisha wrote:
> > Hi,
> >   I've made some more headway on porting vaultwarden.
> > Upstream recently (two commits after 1.24.0) updated the code to build on 
> > rust stable.
> > I've back ported the two commits as patches and attached the port. It also 
> > needs some vendored dependencies, which I've hosted on my server.
> > 
> > Unfortunately, the build is failing still with some cryptic errors, which I 
> > don't understand. Some relevant code is here for easy lookup, full errorlog 
> > at end.
> 
> The port builds fine here. The (do-)install target will need a bit of
> work.  See e.g. sysutils/czkawka for something very basic and
> textproc/ripgrep for an example that you can simplify and adapt.
> 
> > 
> > warning: field is never read: `device_push_token`
> >    --> src/api/identity.rs:495:5
> >     |
> > 495 |     device_push_token: Option<String>, // Unused; mobile device push 
> > not yet supported.
> >     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >     |
> >     = note: `#[warn(dead_code)]` on by default
> 
> This dead code warning is unrelated to the panic you're seeing.
> 
> > fatal runtime error: thread 'Rust cannot catch foreign exceptions
> > <unnamed>' panicked at 
> > '/usr/obj/ports/rust-1.59.0/rustc-1.59.0-src/compiler/rustc_codegen_ssa/src/back/write.rs:1510:21:
> >  worker thread panicked', compiler/rustc_middle/src/util/bug.rs:35
> > warning: `vaultwarden` (bin "vaultwarden") generated 1 warning
> > error: could not compile `vaultwarden`; 1 warning emitted
> > 
> > I dunno what this means, so I'm kind of stuck here. Anyone would like to 
> > help with this, I'd really appreciate it.
> 
> I guess you run into a memory limit while linking this - I assume the
> llvm backend throws an out of memory exception and rustc can't catch
> that exception. rustc seems to use a bit more than 2G here.
> 
> Try increasing your user's limits in /etc/login.conf, or better yet, set
> up PORTS_PRIVSEP as explained in bsd.port.mk(5). _pbuild's defaults
> should handle this port easily.

I forgot two things: the port will need

BROKEN-sparc64 =        ring-0.16.20 does not build on sparc64

at the top of the Makefile and pleaes remove the $OpenBSD$ RCS tag.

Reply via email to