MantisBT - ParaView
View Issue Details
0013656ParaView(No Category)public2012-11-13 18:132016-08-12 09:59
Orion Poplawski 
Kitware Robot 
normalminorhave not tried
closedmoved 
 
 
TBD
feature
0013656: Try to support using system installed protobuf
For Fedora packages, need to use the system installed version of libraries. Attached is a hack to try to do that with 3.98.0. First step is to change:

-vtk_module_third_party(protobuf
+vtk_module_third_party(Protobuf

in ParaView/ThirdParty/protobuf/CMakeLists.txt so that cmake finds FindProtobuf.cmake. Next I hacked out:

+#vtk_target_export(protobuf)
+#vtk_target_export(protobuf-lite)
+#vtk_compile_tools_target_export(protoc_compiler)

because they are not available in that configuration.

Finally, Fedora 18 has protobuf 2.4.1 and the compiler is named "protoc" so I changed the name in ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt and removed protoc_compiler as a build dependency.

Finally though I get the following link error:

/usr/lib64/ccache/g++ -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -g -Wl,--fatal-warnings -Wl,--no-undefined -lc -Wl,-z,relro -shared -Wl,-soname,libvtkPVServerImplementationCore-pv3.98.so.1 -o ../../../lib/libvtkPVServerImplementationCore-pv3.98.so.1 CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVCatalystSessionCore.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVProxyDefinitionIterator.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVSessionBase.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVSessionCore.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVSessionCoreInterpreterHelper.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkPVSessionServer.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIArraySelectionProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSICollaborationManager.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSICompoundSourceProxy.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIDataArrayProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIDoubleVectorProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIFileSeriesReaderProxy.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIIdTypeVectorProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIInputProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIIntVectorProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIObject.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIProxy.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIProxyDefinitionManager.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIProxyProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSISILProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSISourceProxy.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIStringVectorProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSITimeLabelProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSITimeRangeProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSITimeStepsProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIVectorProperty.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSIWriterProxy.cxx.o CMakeFiles/vtkPVServerImplementationCore.dir/vtkSMMessage.cxx.o ../../../lib/libvtkPVClientServerCoreCore-pv3.98.so.1 -lprotobuf ../../../lib/libvtkFiltersProgrammable-pv3.98.so.1 ../../../lib/libvtkPVPythonSupport-pv3.98.so.1 -lpython2.7 ../../../lib/libvtkPVVTKExtensionsCore-pv3.98.so.1 ../../../lib/libvtkPVCommon-pv3.98.so.1 ../../../lib/libvtkClientServer-pv3.98.so.1 ../../../lib/libvtkIOXML-pv3.98.so.1 ../../../lib/libvtkIOGeometry-pv3.98.so.1 ../../../lib/libvtkIOXMLParser-pv3.98.so.1 -lexpat ../../../lib/libvtkImagingCore-pv3.98.so.1 ../../../lib/libvtkInfovisCore-pv3.98.so.1 ../../../lib/libvtkFiltersExtraction-pv3.98.so.1 ../../../lib/libvtkFiltersGeneral-pv3.98.so.1 ../../../lib/libvtkFiltersCore-pv3.98.so.1 ../../../lib/libvtkCommonComputationalGeometry-pv3.98.so.1 ../../../lib/libvtkParallelCore-pv3.98.so.1 ../../../lib/libvtkIOLegacy-pv3.98.so.1 ../../../lib/libvtkIOCore-pv3.98.so.1 ../../../lib/libvtkCommonExecutionModel-pv3.98.so.1 ../../../lib/libvtkCommonDataModel-pv3.98.so.1 ../../../lib/libvtkCommonSystem-pv3.98.so.1 ../../../lib/libvtkCommonTransforms-pv3.98.so.1 ../../../lib/libvtkCommonMisc-pv3.98.so.1 ../../../lib/libvtkCommonMath-pv3.98.so.1 ../../../lib/libvtkCommonCore-pv3.98.so.1 ../../../lib/libvtksys-pv3.98.so.1 -ldl -lz -Wl,-rpath,/export/home/orion/fedora/paraview/ParaView/fedora/lib:
CMakeFiles/vtkPVServerImplementationCore.dir/vtkSMMessage.cxx.o: In function `protobuf_AssignDescriptorsOnce':
CMakeFiles/vtkPVServerImplementationCore.dir/vtkSMMessage.cxx.o:/usr/include/google/protobuf/stubs/once.h:115: more undefined references to `pthread_once' follow

It's going to need to link against -lpthread but I don't know the best way to handle that.
No tags attached.
patch paraview-Protobuf.patch (2,540) 2012-11-13 18:13
https://www.vtk.org/Bug/file/9340/paraview-Protobuf.patch
patch paraview-4.0.1-Protobuf.patch (3,064) 2013-07-29 10:59
https://www.vtk.org/Bug/file/9489/paraview-4.0.1-Protobuf.patch
patch paraview-4.2RC1-Protobuf.patch (2,855) 2014-09-03 18:39
https://www.vtk.org/Bug/file/9705/paraview-4.2RC1-Protobuf.patch
patch paraview-cmake.patch (959) 2014-09-05 11:33
https://www.vtk.org/Bug/file/9707/paraview-cmake.patch
Issue History
2012-11-13 18:13Orion PoplawskiNew Issue
2012-11-13 18:13Orion PoplawskiFile Added: paraview-Protobuf.patch
2013-07-29 10:59hasufellFile Added: paraview-4.0.1-Protobuf.patch
2013-07-29 10:59hasufellNote Added: 0031359
2013-07-29 17:07Orion PoplawskiNote Added: 0031363
2014-09-03 14:10Orion PoplawskiNote Added: 0033306
2014-09-03 18:39Orion PoplawskiFile Added: paraview-4.2RC1-Protobuf.patch
2014-09-03 18:41Orion PoplawskiNote Added: 0033307
2014-09-04 12:33Orion PoplawskiNote Added: 0033309
2014-09-05 11:33Orion PoplawskiFile Added: paraview-cmake.patch
2014-09-05 12:06Orion PoplawskiNote Added: 0033312
2015-04-30 11:52Orion PoplawskiNote Added: 0034391
2016-08-12 09:59Kitware RobotNote Added: 0038279
2016-08-12 09:59Kitware RobotStatusbacklog => closed
2016-08-12 09:59Kitware RobotResolutionopen => moved
2016-08-12 09:59Kitware RobotAssigned To => Kitware Robot

Notes
(0031359)
hasufell   
2013-07-29 10:59   
Updated for paraview-4.0.1, with proper conditionals so both ON and OFF work as expected

lpthread problem solved as well
(0031363)
Orion Poplawski   
2013-07-29 17:07   
Updated patch works for me.
(0033306)
Orion Poplawski   
2014-09-03 14:10   
With 4.2RC1 things will need to get updated as well. Looks like even less support for configuring it.
(0033307)
Orion Poplawski   
2014-09-03 18:41   
Updated patch. Not sure if I need to re-add the thread stuff. There are problems interacting with the cmake FindProtobuf module (see also http://www.cmake.org/Bug/view.php?id=15128 [^]) due to its adding of items to PROTOBUF_LIBRARIES. Any suggestions there appreciated.
(0033309)
Orion Poplawski   
2014-09-04 12:33   
These are the errors I get when the system FindProtobuf add -lpthread to PROTOBUF_LIBRARIES:

CMake Error at CommandLineExecutables/CMakeLists.txt:71 (get_property):
  get_property could not find TARGET -lpthread. Perhaps it has not yet been
  created.


CMake Error at CommandLineExecutables/CMakeLists.txt:76 (get_property):
  get_property could not find TARGET -lpthread. Perhaps it has not yet been
  created.

Not sure if this is more of an issue with the ParaView cmake code making assumptions about various libraries, or something that should be fixed in cmake's FindProtobuf.
(0033312)
Orion Poplawski   
2014-09-05 12:06   
paraview-cmake.patch is a patch suggested by the cmake folks to handle different kinds of entries in vtk_module_libraries. Appears to work for me.
(0034391)
Orion Poplawski   
2015-04-30 11:52   
I believe this can be closed now as paraview does support the -DVTK_USE_SYSTEM_PROTOBUF:BOOL=ON option now.
(0038279)
Kitware Robot   
2016-08-12 09:59   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.