Hi all,
What is the best way to build a ParaView plugin on MacOS that would work with ParaView 5.8 binary?
Thanks,
Dan
Hi all,
What is the best way to build a ParaView plugin on MacOS that would work with ParaView 5.8 binary?
Thanks,
Dan
Your best bet would probably to try to reproduce the configuration of the MacOS release builder : bigmac.
Thanks Mathieu,
I’ll try that.
Dan
I compiled the 5.8 sources with my plugin added in the Plugins directory. I got an so file but that does not have the libraries setup properly. Here is otool -L for my plugin vs a plugin from the ParaView binary.
The error from ParaView is:
ERROR: In /Users/kitware/dashboards/buildbot-slave/a64f5607/build/superbuild/paraview/src/Remoting/Core/vtkPVPluginLoader.cxx, line 519
vtkPVPluginLoader (0x6000071235a0): dlopen(/Applications/ParaView-5.8.0.app/Contents/Plugins/SaveStateAndScreenshot.so, 1): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore
Referenced from: /Applications/ParaView-5.8.0.app/Contents/Plugins/SaveStateAndScreenshot.so
Reason: image not found
Any ideas?
Thanks,
Dan
/Applications/ParaView-5.8.0.app/Contents/Plugins/SaveStateAndScreenshot.so:
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.12.0, current version 5.12.6)
@rpath/libpqApplicationComponents-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libpqComponents-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libpqCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libpqWidgets-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.12.0, current version 5.12.6)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.12.0, current version 5.12.6)
@rpath/libvtkqttesting-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkGUISupportQt-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRemotingViews-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkChartsCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRenderingParallel-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkViewsContext2D-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkViewsCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkInteractionWidgets-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRenderingAnnotation-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRemotingServerManager-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkprotobuf-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRemotingCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1349.63.0)
@rpath/libvtkRemotingClientServerStream-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkPVVTKExtensionsCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkParallelCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkjsoncpp-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRenderingContext2D-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkIOXML-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkIOXMLParser-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRenderingOpenGL2-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkRenderingCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkFiltersSources-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkFiltersGeneral-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkFiltersCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkglew-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
@rpath/libvtkCommonExecutionModel-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkCommonDataModel-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkCommonMisc-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkCommonTransforms-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkCommonMath-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtkCommonCore-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
@rpath/libvtksys-pv5.8.1.dylib (compatibility version 1.0.0, current version 5.8.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
and this is a correct plugin
/Applications/ParaView-5.8.0.app/Contents/Plugins/FlipBookPlugin.so:
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.12.0, current version 5.12.6)
@executable_path/../Libraries/libpqApplicationComponents-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libpqComponents-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libpqCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libpqWidgets-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkqttesting-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.12.0, current version 5.12.6)
@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.12.0, current version 5.12.6)
@executable_path/../Libraries/libvtkGUISupportQt-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkRemotingServerManager-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkprotobuf-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkRemotingCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1349.63.0)
@executable_path/../Libraries/libvtkRemotingClientServerStream-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkPVVTKExtensionsCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkInteractionWidgets-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkjsoncpp-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkParallelCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkIOXML-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkIOXMLParser-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkRenderingOpenGL2-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
@executable_path/../Libraries/libvtkglew-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Libraries/libvtkRenderingCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkFiltersSources-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkFiltersGeneral-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkFiltersCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonExecutionModel-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonDataModel-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonMisc-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonTransforms-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonMath-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libvtkCommonCore-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
@executable_path/../Libraries/libtbb.dylib (compatibility version 0.0.0, current version 0.0.0)
@executable_path/../Libraries/libvtksys-pv5.8.5.8.dylib (compatibility version 1.0.0, current version 5.8.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
@ben.boeckel Do you have any suggestions? Thanks!
The packaging step is what fixes all that stuff. I recommend running the cpack test and then extracting the plugin from that.
Thanks @ben.boeckel That worked! I had to pass “-DQt5_DIR=…” to the command run by ctest -R cpack
and apply.
--- a/cmake/scripts/package_test.cmake
+++ b/cmake/scripts/package_test.cmake
@@ -4,6 +4,7 @@
execute_process(
COMMAND "${CMAKE_COMMAND}"
-G "${cmake_generator}"
+ "-DQt5_DIR=${Qt5_DIR}"
"${source_directory}"
RESULT_VARIABLE res
WORKING_DIRECTORY "${build_directory}")
Otherwise I got the following error:
CTEST_FULL_OUTPUT
CMake Error at /Users/kitware/dan.lipsa/paraview-superbuild/src/superbuild/projects/qt5.functions.cmake:27 (message):
Installing plugins from a system Qt5 requires `Qt5_DIR` to be set.
Call Stack (most recent call first):
/Users/kitware/dan.lipsa/paraview-superbuild/src/projects/paraview.bundle.common.cmake:263 (superbuild_install_qt5_plugin_paths)
/Users/kitware/dan.lipsa/paraview-superbuild/src/projects/apple/paraview.bundle.cmake:6 (include)
CMakeLists.txt:42 (include)
-- Configuring incomplete, errors occurred!
Your plugin build should just DEPENDS_OPTIONAL qt5
. The superbuild doesn’t do transitive dependencies.
Oh, something else is up. That should be forwarded through CMakeLists.txt:230
already. Something else is wrong if you need that added.
USE_SYSTEM_qt5 is not in the CMakeCache.txt in my case, even if the build did use system Qt5. This was one of the differences between linux and mac in my case.
For Linux, it build a new Qt, for mac it asked for a Qt5_DIR. For Linux, ctest -R cpack worked fine, for mac I had to patch the superbuild as I described.
Ah, USE_SYSTEM_qt5
disappeared with the forced system-ness of Qt5. I’ll have a fix shortly.
Thanks for the fix @ben.boeckel!