security/bitwarden_rs on aarch64

Mark Dixon freebsd at markdixon.name
Wed Mar 17 11:37:49 UTC 2021


Hi

I've got my hands on a Helios64 board and I'm playing around with it running 
FreeBSD 13 to see what it can run, and I've run into something I do not 
understand. I've been trying to compile security/bitwarden_rs to see if I can 
use it to host my password manager and I've hit an issue:

The build, out of the box fails with:

error: /usr/ports/security/bitwarden_rs/work/target/release/deps/
libmigrations_macros-2f2155501ff102fe.so: Undefined symbol "__addtf3"
  --> /usr/ports/security/bitwarden_rs/work/bitwarden_rs-1.19.0/cargo-crates/
diesel_migrations-1.4.0/src/lib.rs:82:1
   |
82 | extern crate migrations_macros;

I'm no rust developer, but that looks a lot like a linker error. A quick 
google suggest that symbol is from libgcc and relates to soft float emulation 
which I guess we shouldn't need on aarch64 but I guess if that's what it wants 
I go with it. Sure enough that .so depends on libgcc:

/usr/ports/security/bitwarden_rs/work/target/release/deps/
libmigrations_macros-2f2155501ff102fe.so:
	libpq.so.5 => /usr/local/lib/libpq.so.5 (0x406d0000)
	libmysqlclient.so.20 => /usr/local/lib/mysql/libmysqlclient.so.20 
(0x41c00000)
	libthr.so.3 => /lib/libthr.so.3 (0x40749000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x407a5000)


/lib/libgcc_so.1 though - I didn't think FreeBSD ships GCC anymore, although 
I've been out of the FreeBSD loop for a while. 

Okay, let's look in /usr/src/lib/libgcc_s, seems like it's just some sort of 
gcc thunking library. Let's try adding __subtf3 to Symbols.map and see what 
happens. Surprisingly, after adding __subtf3, __multf3, __divtf3 and __addtf3; 
(and installing libgcc_s) the bitwarden_rs build now compiles just fine, and 
seems to run - although I haven't actually done much with it yet.

I'm not sure what is going on here because I'm really at the limits of my 
knowledge. It seems unlikely, but not impossible, that these symbols are just 
missing from Symbols.map in the base system. How should I proceed to fix this 
'properly'? 

Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20210317/01052bd1/attachment.sig>


More information about the freebsd-arm mailing list