Getting error while compiling with python 3.8 headers for 32 bit compilation

Hi Team,

Below are the version details

free radius-server version -3.2.3
python version -3.8

While compiling for 32 bit I am facing python related error. Below is the error

from src/modules/rlm_python3/rlm_python3.c:37:
include/python3.8/pyport.h:726:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

This error coming from below section of code

#if LONG_BIT != 8 * SIZEOF_LONG
/* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some recent
 * 32-bit platforms using gcc.  We try to catch that here at compile-time
 * rather than waiting for integer multiplication to trigger bogus
 * overflows.
 */
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." 
#endif

Is there anything additional needs to be done for 32bit compilation or any python version dependency ?

This is telling you that your C compiler’s header have a bug in them.
And the comment tells you why the check is required.

What OS and verison are you building on?
What compiler and version are you using?

1 Like