On 08/14/2015 06:47 PM, Feng Xiao wrote:
On Wed, Aug 12, 2015 at 10:31 AM, Orion Poplawski <or...@cora.nwra.com <mailto:or...@cora.nwra.com>> wrote: I'm trying to build paraview with protobuf 2.6.1. Previously compiled fine with 2.5.0. Current errors are: /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx: In member function 'virtual void vtkSMCameraLink::UpdateState()': /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx:367:45: error: no matching function for call to 'paraview_protobuf::Message::GetExtension(google::protobuf::internal::ExtensionIdentifier<paraview_protobuf::Message, google::protobuf::internal::PrimitiveTypeTraits<bool>, 8u, false>&, int)' this->GetSynchronizeInteractiveRenders()); ^ In file included from /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:25:0, from /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerImplementation/Core/vtkSMMessage.h:30, from /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx:24: /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:608:3: note: candidate: template<class _proto_TypeTraits, unsigned char _field_type, bool _is_packed> typename _proto_TypeTraits::Singular::ConstType paraview_protobuf::Message::GetExtension(const google::protobuf::internal::ExtensionIdentifier<paraview_protobuf::Message, _proto_TypeTraits, _field_type, _is_packed>&) const GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(Message) ^ /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:608:3: note: template argument deduction/substitution failed: /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx:367:45: note: candidate expects 1 argument, 2 provided this->GetSynchronizeInteractiveRenders()); ^ In file included from /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:25:0, from /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerImplementation/Core/vtkSMMessage.h:30, from /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx:24: /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:608:3: note: candidate: template<class _proto_TypeTraits, unsigned char _field_type, bool _is_packed> typename _proto_TypeTraits::Repeated::ConstType paraview_protobuf::Message::GetExtension(const google::protobuf::internal::ExtensionIdentifier<paraview_protobuf::Message, _proto_TypeTraits, _field_type, _is_packed>&, int) const GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(Message) ^ /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:608:3: note: template argument deduction/substitution failed: /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h: In substitution of 'template<class _proto_TypeTraits, unsigned char _field_type, bool _is_packed> typename _proto_TypeTraits::Repeated::ConstType paraview_protobuf::Message::GetExtension(const google::protobuf::internal::ExtensionIdentifier<paraview_protobuf::Message, _proto_TypeTraits, _field_type, _is_packed>&, int) const [with _proto_TypeTraits = google::protobuf::internal::PrimitiveTypeTraits<bool>; unsigned char _field_type = 8u; bool _is_packed = false]': /builddir/build/BUILD/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Rendering/vtkSMCameraLink.cxx:367:45: required from here /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h:608:3: error: no type named 'Repeated' in 'class google::protobuf::internal::PrimitiveTypeTraits<bool>' /usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/CMakeFiles ParaViewCore/ServerManager/Rendering/CMakeFiles/vtkPVServerManagerRendering.dir/build.make:199: recipe for target 'ParaViewCore/ServerManager/Rendering/CMakeFiles/vtkPVServerManagerRendering.dir/vtkSMCameraLink.cxx.o' failed /usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/ParaView-v4.3.1-source/fedora/CMakeFiles make[2]: *** [ParaViewCore/ServerManager/Rendering/CMakeFiles/vtkPVServerManagerRendering.dir/vtkSMCameraLink.cxx.o] Error 1 The code is just trying to access a repeated element: this->State->GetExtension(LinkState::sync_interactive_renders, this->GetSynchronizeInteractiveRenders()); But it seems that the compiler only sees the single element version of GetExtension(). Perhaps we are not properly instantiating the repeated one? The "no type named Repeated" seems like that may be the case. This is with gcc 5.1.1. To access a repeated extension, you should use GetRepeatedExtension(). Calling GetExtension() on a repeated extension is undefined behavior in 2.5.0. It's explicitly forbidden in 2.6.1.
Thanks for the response, but it looks like the Repeated reference was a red herring, and it was a more fundamental mistake/typo. Looks like this was meant to be a setter rather than a getter situation - which actually looking at the code rather than just the error reveals. So I think it should be:
void vtkSMCameraLink::UpdateState() { this->Superclass::UpdateState(); this->State->SetExtension(LinkState::sync_interactive_renders, this->GetSynchronizeInteractiveRenders()); } as sync_interactive_renders is bool type. Thanks again for another pair of eyes. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane or...@cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.