MantisBT - ParaView
View Issue Details
0012852ParaView(No Category)public2012-01-09 11:152016-06-17 00:06
td123 
Cory Quammen 
normalminorhave not tried
closedfixed 
3.12 
5.1 
TBD
incorrect functionality
0012852: Paraview 3.12.0 fails to build against protobuf 2.4.1
This is a repost of http://paraview.org/Bug/view.php?id=12718 [^] since I found out how to switch project types in the bug report.

If I build without protobuf installed, it passes configuration, but then later I get the error:
[ 84%] Generating vtkPVMessage.pb.h, vtkPVMessage.pb.cc
/build/src/ParaView-3.12.0/build/bin/protoc: error while loading shared libraries: libprotoc.so: cannot open shared object file: No such file or directory

which causes:
fatal error: vtkPVMessage.pb.h: No such file or directory

If I install protobuf 2.4.1 on my system and try to compile, I get the following error:
[ 84%] Building CXX object ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementation.dir/vtkPVSessionBase.cxx.o
In file included from /build/src/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkSMMessage.h:30:0,
                 from /build/src/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionBase.cxx:22:
/build/src/ParaView-3.12.0/build/ParaViewCore/ServerImplementation/vtkPVMessage.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer headers. Please update your headers.

It seems that the configure script should be configured to add support for detecting if protobuf is installed and maybe regenerating the headers if a newer version is installed. I'm building this on archlinux.
No tags attached.
txt output.txt (1,249,087) 2012-01-09 11:15
https://www.vtk.org/Bug/file/9099/output.txt
txt output-with-protobuf.txt (1,265,408) 2012-01-09 11:15
https://www.vtk.org/Bug/file/9100/output-with-protobuf.txt
Issue History
2012-01-09 11:15td123New Issue
2012-01-09 11:15td123File Added: output.txt
2012-01-09 11:15td123File Added: output-with-protobuf.txt
2012-02-29 01:59slitvinovNote Added: 0028327
2015-04-30 11:51Orion PoplawskiNote Added: 0034390
2016-05-06 10:19Cory QuammenNote Added: 0035928
2016-05-06 10:19Cory QuammenStatusbacklog => gatekeeper review
2016-05-06 10:19Cory QuammenResolutionopen => fixed
2016-05-06 10:19Cory QuammenAssigned To => Cory Quammen
2016-06-17 00:06Utkarsh AyachitStatusgatekeeper review => customer review
2016-06-17 00:06Utkarsh AyachitFixed in Version => 5.1
2016-06-17 00:06Utkarsh AyachitStatuscustomer review => closed

Notes
(0028327)
slitvinov   
2012-02-29 01:59   
I have the same error on Ubuntu Linux with cmake 2.8.6
"error while loading shared libraries: libprotoc.so: cannot open shared object file: No such file or directory"

I think one way to fix this would be to add LD_LIBRARY_PATH to protoc command.
Here is a relevant cmake file
CMake/ParaViewMacros.cmake
http://paraview.org/gitweb?p=ParaView.git;a=blob_plain;f=CMake/ParaViewMacros.cmake;hb=HEAD [^]

#########################################################################
# Function to compile a proto file to generate a .h and .cc file
# Arguments:
# out_cpp_file_variable: variable that gets set with the full path to output file
# in_proto_file: full path to input file (e.g. ${CMAKE_CURRENT_SOURCE_DIR}/foo.pb)

FUNCTION (protobuf_generate out_cpp_file in_proto_file)
  GET_FILENAME_COMPONENT(basename ${in_proto_file} NAME_WE)
  GET_FILENAME_COMPONENT(absolute ${in_proto_file} ABSOLUTE)
  GET_FILENAME_COMPONENT(path ${absolute} PATH)
  SET (out_file ${CMAKE_CURRENT_BINARY_DIR}/${basename}.pb.h)
  SET(${out_cpp_file} ${out_file} PARENT_SCOPE)
  ADD_CUSTOM_COMMAND(
    OUTPUT ${out_file}
    COMMAND protoc_compiler
      --cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:${CMAKE_CURRENT_BINARY_DIR}
      --proto_path ${path} ${absolute}
    DEPENDS ${in_proto_file} protoc_compiler
  )
ENDFUNCTION (protobuf_generate)

See example from KDE
http://techbase.kde.org/Development/CMake_FAQ#I_need_to_build_an_executable_which_is_used_later_on_during_the_build_to_generate_files._How_do_I_do_this_.3F [^]
(0034390)
Orion Poplawski   
2015-04-30 11:51   
I think this particular bug can be closed as paraview does build against protobuf 2.4.1 and 2.5.0.
(0035928)
Cory Quammen   
2016-05-06 10:19   
This should be closed as indicated by Orion.