Fails to build for 32-bit Android (armeabi-v7a)
r4v3r23 opened this issue · 3 comments
Polyseed fails to build for 32-bit Android. After speaking with @tobtoht, they got it to build by removing the time_t check
, and also mentioned that the tests include a seed with a wallet creation date after 2038, which is problematic for 32-bit builds.
Are you talking about this assert?
Line 10 in e385165
If time_t
is a 32-bit type, polyseed (and probably the whole computer) will stop working in 2038. There are 32-bit kernels (and associated glibc) that support 64-bit time_t
.
I'm looking to upstream Polyseed to Monero core. Why now?
- Multiple projects have expressed interested in switching to Polyseed for various reasons (UX being the main one), but are hesitant to do so without official support.
- Feather Wallet, which I maintain, currently stores a copy of the Polyseed in the wallet cache so it can be retrieved later. This was done because storing it in .keys would break wallet file compatibility. For better protection against memory attacks, I want to move the Polyseed into .keys and keep it encrypted in memory. (I could technically already do this with the cache, but
cryptonote::account_base
already has all the plumbing.)
The assert and (when removed) failing tests on 32-bit machines are a blocker because Monero still has 32-bit release binaries and users looking to compile the software from source for 32-bit machines.
Removing the assert lets us build on 32-bit machines and as far as I can tell this doesn't cause it to create an out-of-spec Polyseed. (Unless it's 2038, in which case I doubt there are will be any 32-bit machines around by then that don't run a kernel that supports 64-bit time_t or else the computer stops working anyway.)
There are 32-bit kernels (and associated glibc) that support 64-bit time_t.
The earliest version of glibc that supports this is 2.34 [1] [2] (for reference, Debian 11 is on 2.31). Monero release binaries target glibc 2.27.
[1] https://wiki.debian.org/ReleaseGoals/64bit-time
[2] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign