TensorRT 6 static library undefined symbols

Provide details on the platforms you are using:
Linux distro and version: Ubuntu 16.04
GPU type: Titan Xp
nvidia driver version: 418
CUDA version: 10.1
CUDNN version: 7.6.3.30-1+cuda10.1
Python version [if using python]: N/A
Tensorflow version: N/A
TensorRT version: 6.0.1-1+cuda10.1
If Jetson, OS, hw versions: N/A

Describe the problem

The static libraries distributed with the TensorRT 6 Ubuntu 16.04 package are unusable because of the undefined symbols. The undefined symbols are in the google_private::protobuf namespace, and these sybmols cannot be provided by a system protocol buffer library due to the private namespace.

Files

except of build log:

/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListStringE[_ZTVN3uff10ListStringE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListStringE[_ZTVN3uff10ListStringE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListStringE[_ZTVN3uff10ListStringE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListStringE[_ZTVN3uff10ListStringE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListStringE[_ZTVN3uff10ListStringE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff8ListBoolE[_ZTVN3uff8ListBoolE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff8ListBoolE[_ZTVN3uff8ListBoolE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff8ListBoolE[_ZTVN3uff8ListBoolE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff8ListBoolE[_ZTVN3uff8ListBoolE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff8ListBoolE[_ZTVN3uff8ListBoolE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9ListINT64E[_ZTVN3uff9ListINT64E]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9ListINT64E[_ZTVN3uff9ListINT64E]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9ListINT64E[_ZTVN3uff9ListINT64E]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9ListINT64E[_ZTVN3uff9ListINT64E]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9ListINT64E[_ZTVN3uff9ListINT64E]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListDoubleE[_ZTVN3uff10ListDoubleE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListDoubleE[_ZTVN3uff10ListDoubleE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListDoubleE[_ZTVN3uff10ListDoubleE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListDoubleE[_ZTVN3uff10ListDoubleE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10ListDoubleE[_ZTVN3uff10ListDoubleE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4DataE[_ZTVN3uff4DataE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4DataE[_ZTVN3uff4DataE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4DataE[_ZTVN3uff4DataE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4DataE[_ZTVN3uff4DataE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4DataE[_ZTVN3uff4DataE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff12ListDataTypeE[_ZTVN3uff12ListDataTypeE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff12ListDataTypeE[_ZTVN3uff12ListDataTypeE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff12ListDataTypeE[_ZTVN3uff12ListDataTypeE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff12ListDataTypeE[_ZTVN3uff12ListDataTypeE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff12ListDataTypeE[_ZTVN3uff12ListDataTypeE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff15DimensionOrdersE[_ZTVN3uff15DimensionOrdersE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff15DimensionOrdersE[_ZTVN3uff15DimensionOrdersE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff15DimensionOrdersE[_ZTVN3uff15DimensionOrdersE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff15DimensionOrdersE[_ZTVN3uff15DimensionOrdersE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff15DimensionOrdersE[_ZTVN3uff15DimensionOrdersE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff19ListDimensionOrdersE[_ZTVN3uff19ListDimensionOrdersE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff19ListDimensionOrdersE[_ZTVN3uff19ListDimensionOrdersE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff19ListDimensionOrdersE[_ZTVN3uff19ListDimensionOrdersE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff19ListDimensionOrdersE[_ZTVN3uff19ListDimensionOrdersE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff19ListDimensionOrdersE[_ZTVN3uff19ListDimensionOrdersE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10DescriptorE[_ZTVN3uff10DescriptorE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10DescriptorE[_ZTVN3uff10DescriptorE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10DescriptorE[_ZTVN3uff10DescriptorE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10DescriptorE[_ZTVN3uff10DescriptorE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff10DescriptorE[_ZTVN3uff10DescriptorE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9MetaGraphE[_ZTVN3uff9MetaGraphE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9MetaGraphE[_ZTVN3uff9MetaGraphE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9MetaGraphE[_ZTVN3uff9MetaGraphE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9MetaGraphE[_ZTVN3uff9MetaGraphE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff9MetaGraphE[_ZTVN3uff9MetaGraphE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff5GraphE[_ZTVN3uff5GraphE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff5GraphE[_ZTVN3uff5GraphE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff5GraphE[_ZTVN3uff5GraphE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff5GraphE[_ZTVN3uff5GraphE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff5GraphE[_ZTVN3uff5GraphE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4NodeE[_ZTVN3uff4NodeE]+0x20): undefined reference to `google_private::protobuf::Message::GetTypeName() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4NodeE[_ZTVN3uff4NodeE]+0x58): undefined reference to `google_private::protobuf::Message::InitializationErrorString() const'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4NodeE[_ZTVN3uff4NodeE]+0x60): undefined reference to `google_private::protobuf::Message::CheckTypeAndMergeFrom(google_private::protobuf::MessageLite const&)'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4NodeE[_ZTVN3uff4NodeE]+0xa8): undefined reference to `google_private::protobuf::Message::DiscardUnknownFields()'
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libnvparsers_static.a(uff.pb.o):(.data.rel.ro._ZTVN3uff4NodeE[_ZTVN3uff4NodeE]+0xb0): undefined reference to `google_private::protobuf::Message::SpaceUsed() const'

thank you for the feedback, we are reviewing and will keep you updated.

per engineering, “The user has to compile libprotobuf v 10(3.0.0) with the flag -Dgoogle=google_private in order to statically link. This is done so we don’t collide with incompatible libprotobuf installed on the system.”

Hello,

I can certainly try that in the meantime, however this is quite inconvenient for users. I think it would be very helpful if these google_private symbols were provided with TensorRT libraries, as they already do not collide with system installations of protobuf.

Thank you.

hi NVES,

I am trying to compile protobuf (3.0.0) with flag -Dgoogle=google_private in order to link the code with TensorRT 8.2.3 .0 static libs for arm64 architecture.
But I get below errors:

/usr/lib/libnvonnxparser_static.a(builtin_op_importers.cpp.o): In function onnx2trt::(anonymous namespace)::importFallbackPluginImporter(onnx2trt::IImporterContext*, onnx2trt_onnx::NodeProto const&, std::vector<onnx2trt::TensorOrWeights, std::allocator<onnx2trt::TensorOrWeights> >&)':** **builtin_op_importers.cpp:(.text+0x4d6f8): undefined reference to google_private::protobuf::internal::NameOfEnum(google_private::protobuf::EnumDescriptor const, int)'*
builtin_op_importers.cpp:(.text+0x4e24c): undefined reference to google_private::protobuf::internal::NameOfEnum(google_private::protobuf::EnumDescriptor const*, int)'** **/usr/lib/../lib/libonnx_proto.a(onnx_onnx2trt_onnx.pb.cc.o): In function onnx2trt_onnx::TypeProto::InternalSerializeWithCachedSizesToArray(bool, unsigned char) const’:*
onnx_onnx2trt_onnx.pb.cc:(.text+0x210): undefined reference to `google_private::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char)'*

Could you please let me know how can I solve this ?

THanks