OpenFodder / openfodder

Open Fodder: An open source port of Cannon Fodder
http://openfodder.com
GNU General Public License v3.0
456 stars 42 forks source link

Fails to build on 32-bit ARM #89

Open jbeich opened 3 months ago

jbeich commented 3 months ago

From error log:

In file included from Source/ScriptingEngine.cpp:24:
In file included from ./Source/Utils/dukglue/dukglue.h:3:
In file included from ./Source/Utils/dukglue/register_function.h:3:
In file included from ./Source/Utils/dukglue/detail_function.h:3:
In file included from ./Source/Utils/dukglue/detail_stack.h:6:
In file included from ./Source/Utils/dukglue/detail_types.h:160:
./Source/Utils/dukglue/detail_primitive_types.h:52:3: error: redefinition of 'DukType<long long>'
                DUKGLUE_SIMPLE_VALUE_TYPE(time_t, duk_is_number, duk_get_uint, duk_push_uint, value)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Source/Utils/dukglue/detail_primitive_types.h:17:10: note: expanded from macro 'DUKGLUE_SIMPLE_VALUE_TYPE'
                struct DukType<TYPE> { \
                       ^~~~~~~~~~~~~
./Source/Utils/dukglue/detail_primitive_types.h:46:3: note: previous definition is here
                DUKGLUE_SIMPLE_VALUE_TYPE(int64_t, duk_is_number, duk_get_number, duk_push_number, value) // have to cast to double
                ^
./Source/Utils/dukglue/detail_primitive_types.h:17:10: note: expanded from macro 'DUKGLUE_SIMPLE_VALUE_TYPE'
                struct DukType<TYPE> { \
                       ^
segrax commented 3 months ago

Thanks @jbeich ,

Looks like the DUKGLUE update last year added the line which is causing it to fail... Given we dont pass time_t objects into the scripting engine, its probably safe we remove it

https://github.com/OpenFodder/openfodder/commit/134a8b5081fde7b7b647dc113e03212b301b1946#diff-5eed5015760020806630d62aad20b9962fd03f95d1127a7b57d440a5bf1f4e08R52

Ive pushed a fix with the line commented out, but unable to test as I don't have arm

jbeich commented 3 months ago

Applied downstream but it may take ~1 month to confirm.