Closed StefanBruens closed 2 years ago
32 bit archs are not supported.
What Laurent means is: 1) OR-Tools do not support x86 platform anymore, so even the C++ part could fail to compile, overflow and have some undefined behaviour, corner cases here and there.
2) For the python wrapper side, we have also "hard coded" the usage of a 64bits compiler for SWIG e.g. https://github.com/google/or-tools/blob/8fc5d663898e02501721dc9704dff0006f9e97fe/cmake/python.cmake#L21-L23
You may try to build it but we have no time and lack of resources to make a real support.
Changing the lines to
- list(APPEND CMAKE_SWIG_FLAGS "-DSWIGWORDSIZE64")
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ list(APPEND CMAKE_SWIG_FLAGS "-DSWIGWORDSIZE64")
+ else()
+ list(APPEND CMAKE_SWIG_FLAGS "-DSWIGWORDSIZE32")
+ endif()
lets the build pass.
Unfortunately, there are quite some failing test cases (most due to either std::bad_alloc, or a SEGFAULT - probably also a failing/unchecked allocation).
Please note 32bits is still unsupported...
Fully understood.
For x86, I totally agree with this motion, as it would be a niche target (e.g. someone could use an old decommissioned PC to control their CNC router for PCB milling).
But there are also 32bit ARM and Risc-V, where new SoCs are issued still. There are lots of specialized chips (e.g. FPGAs, AI accelerators) where 32 bit is common, and 64 bit is only available on the higher, much more expensive tiers.
Version: 9.3
GCC 11.2.1, Python 3.8, SWIG 4.0.2
What did you do? cmake ... -DBUILD_PYTHON:BOOL=ON make
What did you expect to see build succeeds
What did you see instead?