Compiling redis on arm (32 bit) with clang results in the following errors (only stating two):
debug.c:963:36: error: no member named 'gregs' in 'mcontext_t' return (void) uc->uc_mcontext.gregs[14]; / Linux 32 */ ~~~~~~~~~~~~~~~ ^ debug.c:1137:41: error: no member named 'gregs' in 'mcontext_t' (unsigned long) uc->uc_mcontext.gregs[11], ~~~~~~~~~~~~~~~ ^ debug.c:1138:41: error: no member named 'gregs' in 'mcontext_t' (unsigned long) uc->uc_mcontext.gregs[8],
To reproduce
Clone the repo and compile on ARM using CLANG. Can only be reproduced on ARM and not on Intel using the same compiler suite. Using GCC on Arm works.
This can be reproduced with CLANG v11 running on Arch and CLANG v7.0.1 running on Debian.
Expected behavior
Compile w/o errors.
Additional information
Let me know if you need more information.
Comment From: oranagra
for some reason it tries to build the x86 code.
i suppose this may be do to the __ILP32__ ifdef.
@chrisAtRedis can you try to see if re-ordering the code fixes this?
i.e. move the blocks for __arm__ to be before the ones for __ILP32__?
Comment From: oranagra
looks like this is already solved by #8095
Comment From: chrisAtRedisLabs
Confirmed that #8095 also fixes this for ARMv7 on native Debian and ALARM on v5. Regression with GCC also checks out on both platforms. This is good to go.