Package: monero
Version: 0.18.4.3+~0+20200826-1
Tags: patch ftbfs
Usertags: hppa
The monero package fails to build from source on some architectures,
including HPPA, POWERPC and others. The following tests FAILED:
7 - block_weight (Failed)
9 - hash-slow (SEGFAULT)
10 - hash-slow-1 (SEGFAULT)
11 - hash-slow-2 (SEGFAULT)
I've analyzed the problem, and all can be fixed by applying the
attached patch.
The problem is, that monero uses ftime() which isn't any longer supported
by newer glibc's. So, ftime() does not initialize the "timer" variable,
then gmtime() fails and returns NULL for the gmTimer variable, and as
such the accesses vua gmTimer pointer crash with NULL pointer exception.
I've successfully built monero on the hppa architecture with this patch.
Please apply for the next upload.
Thanks!
Helge
diff -up ./src/crypto/oaes_lib.c.org ./src/crypto/oaes_lib.c
--- ./src/crypto/oaes_lib.c.org 2025-10-27 14:47:34.860434982 +0000
+++ ./src/crypto/oaes_lib.c 2025-10-27 15:17:39.109261562 +0000
@@ -41,7 +41,7 @@
// ANDROID, FreeBSD, OpenBSD and NetBSD also don't need timeb.h
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \
- && !defined(__NetBSD__)
+ && !defined(__NetBSD__) && !defined(__linux__)
#include <sys/timeb.h>
#else
#include <sys/time.h>
@@ -506,7 +506,7 @@ static void oaes_get_seed( char buf[RAND
#else
static uint32_t oaes_get_seed(void)
{
- #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__ANDROID__) && !defined(__NetBSD__)
+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__ANDROID__) && !defined(__NetBSD__) && !defined(__linux__)
struct timeb timer;
struct tm *gmTimer;
char * _test = NULL;