aurarad / Auroracoin

Current Auroracoin source tree
MIT License
36 stars 30 forks source link

ARM not compiling because of a syntax error. #58

Closed validierungcc closed 2 weeks ago

validierungcc commented 3 weeks ago

I want to compile Auroracoin on ARM for my docker image ( https://github.com/validierungcc/auroracoin-docker / https://hub.docker.com/r/vfvalidierung/auroracoin ).It fails for ARM, because of a syntax error on random.cpp #203 and #204. The '+' don't seem to be legal syntax.

Expected behavior

ARM compiles just as AMD64 without an error.

Actual behavior

3712.3   CXX      libauroracoin_util_a-random.o
3718.6 random.cpp:203:1: error: expected unqualified-id before '+' token
3718.6   203 | +static void InitHardwareRand() {}
3718.6       | ^
3718.6 random.cpp:204:1: error: expected unqualified-id before '+' token
3718.6   204 | +static void ReportHardwareRand() {}
3718.6       | ^
3718.9 random.cpp: In constructor '{anonymous}::RNGState::RNGState()':
3718.9 random.cpp:426:9: error: 'InitHardwareRand' was not declared in this scope
3718.9   426 |         InitHardwareRand();
3718.9       |         ^~~~~~~~~~~~~~~~
3719.1 random.cpp: In function 'void RandomInit()':
3719.1 random.cpp:798:5: error: 'ReportHardwareRand' was not declared in this scope
3719.1   798 |     ReportHardwareRand();
3719.1       |     ^~~~~~~~~~~~~~~~~~
3720.1 make[2]: *** [Makefile:9189: libauroracoin_util_a-random.o] Error 1
3720.1 make[2]: Leaving directory '/aurora/auroracoin/src'
3720.1 make[1]: *** [Makefile:14343: all-recursive] Error 1
3720.1 make[1]: Leaving directory '/aurora/auroracoin/src'
3720.1 make: *** [Makefile:782: all-recursive] Error 1

To reproduce

compile for arm. I used on my auroracoin-docker repository: docker buildx build --platform linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm,linux/arm64 . -t vfvalidierung/auroracoin:testerle --push

System information

Latest release.

Ubuntu 24.04

BioMike commented 2 weeks ago

Thank you for catching this. Pushed the fix.