Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SWIG flags for OpenBSD #4266

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Update SWIG flags for OpenBSD #4266

merged 1 commit into from
Jun 10, 2024

Conversation

ron-at-swgy
Copy link
Contributor

@ron-at-swgy ron-at-swgy commented Jun 7, 2024

Fixes #4249

This commit adds an OpenBSD specific flag for use with SWIG,
-DSMALL_LONG, and further specifies the -DSWIGWORDSIZE flag
conditions to exclude OpenBSD (as is done with Apple).

Validation of CMake platform check:

message(STATUS "system name: ${CMAKE_SYSTEM_NAME}")

if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
  message(STATUS "On OpenBSD")
  list(APPEND CMAKE_SWIG_FLAGS "-DSMALL_LONG")
else()
  message(STATUS "NOT on OpenBSD")
endif()

message(FATAL_ERROR "stop cmake configure to fast iterate ! (to remove after dev/debug)")
-- system name: OpenBSD
-- On OpenBSD
CMake Error at cmake/python.cmake:43 (message):
  stop cmake configure to fast iterate ! (to remove after dev/debug)
  Call Stack (most recent call first):
    CMakeLists.txt:429 (include)

Result

This change, combined with #4259 and #4257 allows me to build the .whl file for
the python or-tools package. I then validated the CBC_MIXED_INTEGER_PROGRAMMING
and GLOP solvers with a simple linear programming problem in the Jupyter Lab
environment.

Installing collected packages: immutabledict, absl-py, ortools
Successfully installed absl-py-2.1.0 immutabledict-4.2.0 ortools-9.10.9999

@ron-at-swgy ron-at-swgy changed the title Diagnostic addition to cmake file Update SWIG flags for OpenBSD Jun 8, 2024
@Mizux Mizux self-assigned this Jun 8, 2024
cmake/python.cmake Outdated Show resolved Hide resolved
This commit ensures the `SWIGWORDSIZENN` defines are not set when
building on OpenBSD.
@ron-at-swgy
Copy link
Contributor Author

@Mizux the build completed successful without SMALL_LONG defined.

@Mizux Mizux merged commit 2384738 into google:stable Jun 10, 2024
58 of 114 checks passed
Mizux pushed a commit that referenced this pull request Jun 11, 2024
This commit ensures the `SWIGWORDSIZENN` defines are not set when
building on OpenBSD.
@Mizux Mizux added this to the v9.11 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue building or-tools with Python support on OpenBSD
2 participants