macOS Apple Silicon build fixes#6
Open
basile-simvia wants to merge 1 commit into
Open
Conversation
Adapt GUI to build on macOS (Apple Silicon) with Qt5, Qwt 6.2,
VTK 9, ParaView 5.13, PyQt5 + SIP 6, recent graphviz, and the macOS
OpenGL profile. All changes are guarded so non-macOS builds are
not affected.
CMake
- CMakeLists.txt: disable FIND_PACKAGE(SalomeSIP REQUIRED); SIP is
provided directly by the Homebrew/PyQt5 install on this host.
- src/PV3DViewer/CMakeLists.txt: remove PV3DViewer from its own
_link_LIBRARIES list (self-dependency caused link failure).
- src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt,
src/SALOME_PYQT/SalomePyQt/CMakeLists.txt,
tools/PyConsole/src/python/CMakeLists.txt,
tools/PyEditor/src/python/CMakeLists.txt:
* fix typo $(QT_INCLUDES) -> ${QT_INCLUDES};
* add SIP build output dir to include path
(_sip_SOURCES_sipbuild);
* add -Dprotected=public -DSIP_PROTECTED_IS_PUBLIC for SIP 6;
* build PyConsolePy and PyEditorPy as Python MODULEs instead of
plain shared libs;
* add ${QWT_INCLUDE_DIR} to PyConsole include path.
C++ portability
- src/LightApp/LightApp_ExtInfoDlg.cxx: gvRenderData() takes
'size_t*' for the length parameter on recent graphviz (macOS),
'unsigned int*' elsewhere.
- src/OpenGLUtils/OpenGLUtils_FrameBuffer.cxx: skip the
GL_NUM_EXTENSIONS / glGetIntegerv code path on macOS
(legacy GL profile only).
Qwt 6.2 compatibility (src/Plot2d/*)
- Plot2d_Curve.cxx: setSamples(NULL, NULL, 0) is ambiguous in
6.2 - cast to 'const double*'.
- Plot2d_Histogram.cxx: provide template alias QwtArray<T> = QVector<T>
(removed in 6.2).
- Plot2d_PlotItems.{cxx,h}: qwt_compat.h removed in 6.2, include
qwt_global.h and redefine QwtDoubleRect = QRectF and qwtMin = qMin.
- Plot2d_ViewFrame.{cxx,h}: typedef QList<double> QwtValueList; in
setCurveType(), QwtSplineCurveFitter is gone in 6.2 - use the
built-in QwtPlotCurve::Fitted attribute instead.
VTK 9 compatibility (src/VTKViewer/*)
- VTKViewer_GeometryFilter.cxx: replace GetCellLinks() with
GetLinks() on VTK >= 9 (three call sites).
- VTKViewer_OpenGLHelper.{cxx,h}: on macOS include <OpenGL/gl.h>
instead of <GL/glx.h>; skip the glXGetProcAddressARB-based loader
in Init() (ARB shader entry points are exposed directly on
macOS); add GLcast/GLcastInv macros for the opaque GLhandleARB
type on macOS and apply them to vglGetShaderivARB /
vglGetShaderInfoLogARB / vglGetProgramivARB call sites.
- VTKViewer_OpenGLRenderer.cxx, VTKViewer_Texture.cxx: drop the
vtkglew / vtk_glew includes on macOS.
- VTKViewer_PolyDataMapper.cxx: wrap current_program with
GLcastInv() before passing to vglUseProgramObjectARB().
ParaView 5.13 compatibility
- src/PVViewer/PVViewer_Core.cxx: pqOptions is gone in PV 5.13.
Comment out the GetHelpSelected/GetUnknownArgument/... block and
the argv free/delete (now owned by pqPVApplicationCore), and
include vtkProcessModule + vtkCLIOptions for the replacement
API (left commented out, no current call site needs it).
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 GUI to build on macOS (Apple Silicon) with Qt5, Qwt 6.2, VTK 9, ParaView 5.13, PyQt5 + SIP 6, recent graphviz, and the macOS OpenGL profile. All changes are guarded so non-macOS builds are not affected.
CMake
C++ portability
Qwt 6.2 compatibility (src/Plot2d/*)
(removed in 6.2).
VTK 9 compatibility (src/VTKViewer/*)
instead of <GL/glx.h>; skip the glXGetProcAddressARB-based loader in Init() (ARB shader entry points are exposed directly on macOS); add GLcast/GLcastInv macros for the opaque GLhandleARB type on macOS and apply them to vglGetShaderivARB / vglGetShaderInfoLogARB / vglGetProgramivARB call sites.
ParaView 5.13 compatibility