Fix: Apple Silicon -- add some of the code that uses libffi#2871
Fix: Apple Silicon -- add some of the code that uses libffi#2871mwinkel-dev wants to merge 3 commits intoMDSplus:alphafrom
libffi#2871Conversation
|
Note that In the other source files, A future PR will be submitted that adds the The |
9afeec2 to
61f6d38
Compare
|
Conjecture is that this PR is A-OK, and that the Jenkins system has a flaky |
|
Retest this please. |
WhoBrokeTheBuild
left a comment
There was a problem hiding this comment.
This PR cannot be submitted before the actual LibCallgFfi function is merged in.
|
Regarding the hardcoded paths in TdiExtPython.c, note that the existing code also has hardcoded paths for the Python 2.7 library. The "blame" listing shows that the hardcoded paths have been present for at least 5 years. These hardcoded paths are defaults in case the user forgets to set their There are two options for dealing with this situation:
A complicating factor on Apple Silicon is that the location of the Python library depends on whether Python 2.7 was installed by Brew, MacPorts or is part of Apple's framework. (Pretty sure that recent versions of MacOS only ship Python 3.x, they do not include Python 2.7.) To get Python 2.7 and a compatible "numpy" installed on the M2 MacBook Pro used for development, the MacPorts version worked best. Thus the port of MDSplus to Apple Silicon presently has a hardcoded path to the location of the MacPorts Python 2.7 library in the TdiExtPython.c file. |
|
As discussed, Apple Silicon PRs are now being submitted / reviewed in bottom-up order. Thus this PR will be on hold until a few more PRs are submitted. |
|
This PR will be revised to present a single "vertical slice" of the MDSplus code for Apple Silicon that uses the Explanation: Depending on the type of problem to be solved, software development uses different strategies: top-down, bottom-up, a series of vertical slices, and so forth. Each strategy is valid and has its uses. When a program is executed, control flow is top-down. There are some changes in the Apple Silicon port of MDSplus that made it advantageous to organize the PRs in top-down order. However, upon reflection a better approach is to present the code a vertical slice at a time. There are a few different code paths that lead to the Organizing the various changes into vertical slice PRs will take a few hours. |
On Apple Silicon, the widely used
libffi(aka Foreign Function Interface) library is used when calling variadic functions located in libraries. This PR provides some of the associated code used by the Apple Silicon port of MDSplus.This
libfficode is not used by the MDSplus versions for Linux, Windows and MacOS (Intel).This is a partial fix for Issue #2597.