View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012718VTK(No Category)public2011-11-10 11:182012-01-09 12:16
Assigned ToDavid Partyka 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0012718: Paraview 3.12.0 fails to build against protobuf 2.4.1
DescriptionIf I build without protobuf installed, it passes configuration, but then later I get the error:
[ 84%] Generating vtkPVMessage.pb.h,
/build/src/ParaView-3.12.0/build/bin/protoc: error while loading shared libraries: 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.
TagsNo tags attached.
Typeincorrect functionality
Attached Filestxt file icon output.txt [^] (1,249,087 bytes) 2011-11-10 11:18
txt file icon output-with-protobuf.txt [^] (1,265,408 bytes) 2011-11-10 11:19


td123 (reporter)
2011-11-10 11:20

I have attached:
output.txt which is the full build log for building paraview 3.12.0 without protobuf installed.
output-with-protobuf.txt which is the full build log for building with protobuf installed.
Paul Melis (reporter)
2011-11-23 03:13

Same here on a Gentoo Linux system, which has protobuf 2.4.0 installed
Paul Melis (reporter)
2011-12-01 00:12

On my system it looks like what actually is happening is:

1. The system-installed protobuf compiler is used to generate vtkPVMessage.pb.h & vtkPVMessage.pb.cxx in the build dir. System-installed version is protobuf 2.4.0
2. During compilation the in-source protobuf headers are used, from ParaView-3.12.0/Utilities/protobuf/src. This is an older version, protobuf 2.3.0, causing the generated vtkPVMessage.pb.h to give the #error above.

Strangely enough, in <build-dir>/bin there is a protoc executable (from 2.3.0). And I see the following after removing the protobuf-generated files and re-running make:

[ 82%] Generating vtkPVMessage.pb.h,
cd /home/melis/c/paraview-3.12.0-build/ParaViewCore/ServerImplementation && /usr/bin/cmake -DOutDir=. -P /home/melis/c/paraview-3.12.0-build/ParaViewCore/ServerImplementation/ExecuteProtoC.cmake

That cmake file, /home/melis/c/paraview-3.12.0-build/ParaViewCore/ServerImplementation/ExecuteProtoC.cmake, contains:

  COMMAND "/home/melis/c/paraview-3.12.0-build/bin/protoc" "--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:/home/melis/c/paraview-3.12.0-build/ParaViewCore/ServerImplementation" --proto_path "/home/melis/c/ParaView-3.12.0/ParaViewCore/ServerImplementation/Resources" "/home/melis/c/ParaView-3.12.0/ParaViewCore/ServerImplementation/Resources/vtkPVMessage.proto"
  WORKING_DIRECTORY "/home/melis/c/paraview-3.12.0-build/ParaViewCore/ServerImplementation"

Which is the correct command, because if I execute it by hand I get 2.3.0 generated files and the PV build succeeds... I have no idea why it doesn't get executed properly when it is called from the build.
td123 (reporter)
2012-01-07 10:46

I decided to take another look yesterday evening, and I think I came up with what is going on.

When paraview's own protoc runs without a system protobufs available, it can not find even though it is in the same directory as paraview's

When paraview's own protoc runs with a system protobufs available, it still can not find the in the current directory (paraview's but it instead uses the system's

This is why the command to use paraview's protoc looks right, but produces an incorrect result.

The way I have currently temporarily fixed it is I removed -DCMAKE_SKIP_RPATH:BOOL=YES from my cmake arguments. This works when I build it without a system-wide protobufs lib installed. Haven't tested with one installed.

Also, it would be nice to consider adding an option to use the system's protobufs. I don't know how backwards incompatible protobufs are.
td123 (reporter)
2012-01-07 11:20

Oh, another thing I found out is that one of the flags I use:
has a description of: "BUILD_SHARED_LIBS: Build shared protobuf library"

This might be another potential problem area. If it builds a static library for protobufs, then this might also be a fix for this problem. This flag probably deserves a more descriptive name like "BUILD_SHARED_PROTOBUF_LIBS" again, I haven't tested this because building paraview takes a while for me.
td123 (reporter)
2012-01-07 12:55

I have built with -DCMAKE_SKIP_RPATH:BOOL=YES and -DBUILD_SHARED_LIBS:BOOL=OFF which resulted with the same "error while loading shared libraries:" message. It seems that for now, it has to be built with the default -DCMAKE_SKIP_RPATH:BOOL=FALSE until this bug gets fixed.
David Partyka (developer)
2012-01-09 10:04

This is a ParaView bug. Please submit ParaView bugs into the ParaView bug tracker. (Change Project to ParaView at the top of the page and re-report the issue). I don't have the ability to simply move this bug to that tracker or I would do that instead.
td123 (reporter)
2012-01-09 11:18

ok, sorry, I just didn't know you could switch the project type on the top right.

reposted on [^]

I will let you close it because I don't know if there is any procedure you do for these types of bugs.

David Partyka (developer)
2012-01-09 12:16

Cool thank you, closing this.

 Issue History
Date Modified Username Field Change
2011-11-10 11:18 td123 New Issue
2011-11-10 11:18 td123 File Added: output.txt
2011-11-10 11:19 td123 File Added: output-with-protobuf.txt
2011-11-10 11:20 td123 Note Added: 0027676
2011-11-23 03:13 Paul Melis Note Added: 0027729
2011-12-01 00:12 Paul Melis Note Added: 0027749
2012-01-07 10:46 td123 Note Added: 0027916
2012-01-07 11:20 td123 Note Added: 0027917
2012-01-07 12:55 td123 Note Added: 0027918
2012-01-09 10:04 David Partyka Note Added: 0027923
2012-01-09 11:18 td123 Note Added: 0027924
2012-01-09 12:14 David Partyka Assigned To => David Partyka
2012-01-09 12:14 David Partyka Status backlog => todo
2012-01-09 12:14 David Partyka Resolution open => fixed
2012-01-09 12:15 David Partyka Status todo => active development
2012-01-09 12:15 David Partyka Status active development => gatekeeper review
2012-01-09 12:16 David Partyka Status gatekeeper review => customer review
2012-01-09 12:16 David Partyka Note Added: 0027925
2012-01-09 12:16 David Partyka Status customer review => closed

Copyright © 2000 - 2018 MantisBT Team