macOS Apple Silicon build fixes#9
Open
basile-simvia wants to merge 1 commit into
Open
Conversation
Adapt KERNEL to build on macOS (Apple Silicon, Clang, Python 3.12+,
NumPy >= 1.24, SWIG 4.x). All changes are guarded by __APPLE__ or
version macros so non-macOS builds are unaffected.
- src/Container/Component_i.cxx: on macOS pthread_t is opaque, so guard
the existing 'pthread_self() != _ThreadId' comparisons with
__APPLE__ branches that use pthread_equal() instead. Also drop the
'_ThreadId > 0' test in CpuUsed_impl() for the same reason.
- src/Container/Container_i.cxx: macOS does not expose 'environ'
directly; include <crt_externs.h> and define 'environ' via
_NSGetEnviron().
- src/Launcher/SALOME_ExternalServerLauncher.cxx: provide an
__APPLE__-only get_current_dir_name() shim (the GNU function is
missing on macOS) using getcwd(nullptr, 0).
- src/Launcher_SWIG/Launcher.i: rename SWIG $function to $action
in the two %exception blocks (SWIG 4.x).
- src/DSC/DSC_Python/calcium.i: redefine PyEval_CallObject to
PyObject_CallObject for Python >= 3.12 (removed symbol). Add an
__APPLE__ branch with the NumPy >= 1.24 strict typing fix
(PyArray_TYPE cast + PyArray_INT/LONG/DOUBLE/FLOAT/STRING/CFLOAT
aliases to NPY_*).
- src/DSC/DSC_User/Datastream/Calcium/CalciumC.c: add missing forward
declarations of ecp_fin_/ecp_cd_ and the CALCIUM_C2CPP_INTERFACE_CXX
prototypes so Clang's stricter C frontend accepts the file.
- src/DSC/CMakeLists.txt: reorder DSC subdirs so DSC_Python is built
before DSC_User (DSC_Python only depends on common headers).
- src/TestContainer/CMakeLists.txt: add an IF(APPLE) variant of
COMMON_LIBS that omits SalomeTestComponentEngine from its own
dependency list, and append ${OMNIORB_LIBRARIES} to the link line
so omniORB symbols are resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@mohd-afeef-badri @nitawa as discussed during our video call last week, here are the changes related to the Salome 9.14 version on macOS.
Adapt KERNEL to build on macOS (Apple Silicon, Clang, Python 3.12+, NumPy >= 1.24, SWIG 4.x). All changes are guarded by APPLE or version macros so non-macOS builds are unaffected.