Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2021 11:37:41 +0000
From:      Mark Dixon <freebsd@markdixon.name>
To:        freebsd-arm@freebsd.org
Subject:   security/bitwarden_rs on aarch64
Message-ID:  <10583814.HWECOB6VNT@markspc>

next in thread | raw e-mail | index | archive | help
--nextPart2000574.bo3hB1aSCY
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Mark Dixon <freebsd@markdixon.name>
To: freebsd-arm@freebsd.org
Subject: security/bitwarden_rs on aarch64
Date: Wed, 17 Mar 2021 11:37:41 +0000
Message-ID: <10583814.HWECOB6VNT@markspc>

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


--nextPart2000574.bo3hB1aSCY
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE/drf00LTSF2nWdhGmWPbrJHrcdQFAmBR6gUACgkQmWPbrJHr
cdQcgRAAxfutkx9ECxInehVNgM8d+vDn9NZ46XQy8GTd9TWjPeY8tubUw4VxUtAm
fPVpXpiyFY05jRwaOS8UgYyXcd38I6lGcDc8RD01zfj0Ptxgff7FLhujjq6yk2Ee
1D0Z/8vMQQlh+EqwCRyL/hnEZa/rZFAQkY/9Fq2y1jq+qn/lRt9GCUn1amFDRMAm
VcJBPOGPy0Q3MkiBdwMcTu/wufhvp0sX7oqj2WJ1mGECsZWClAefyICIXuzuMFtP
nsD6gmKUbV+K5GgQjI9xDzxZpBaA6id8PiJziNYtyuCC5aPMTAudXNdCJDj/dm+/
Dn+YAlf4VRpnr6ojUXFfc/w61psoqNAA/VwJE2256VjSlzBmCSPRhPzXBCJehFxg
xK0vUy++6sV181AMFmzozcDJOWyvGZWrofqhtggWkQbQ+64RXvYzOwRSHkjglj4Y
PRbwp8D5yV1EnmIH8c2gRIKGTabnMJXyEwqja5/nEiEyeOJuqRAGWj7WYbYq5FKD
6JVFvF07djXamn2mvSMYieGl0aWo6l8QmWpgsTniRU/13W59305e69MBQF/NOpe6
HONZIBqae+yJT6rEs8rrwLQfdzjNoAkkd2jz7NdBh1CbQgtXFKkjNMefc45Ujx71
c6v4LzHe5N2tpJ+6lQN9VAo9PtL7Ylu3oOESWRkqpgeWBtSIbPg=
=au74
-----END PGP SIGNATURE-----

--nextPart2000574.bo3hB1aSCY--






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10583814.HWECOB6VNT>