protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

C++ 17 compile failed

Open ICT-YuJia opened this issue 4 years ago • 7 comments

What version of protobuf and what language are you using? Version: v3.17.3 & master Language: C++ OS:Linux Compiler:gcc 7.3

use IDL to code , then use C++ 17 gcc 7.3 compiler, but can compile failed. Error Info like this:

In constructor ‘constexpr onnx::AttributeProtoDefaultTypeInternal::AttributeProtoDefaultTypeInternal()’: error: temporary of non-literal type ‘onnx::AttributeProto’ in a constant expression : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}

ICT-YuJia avatar Nov 11 '21 02:11 ICT-YuJia

can it be fix? @elharo

ICT-YuJia avatar Jan 12 '22 09:01 ICT-YuJia

Does this reproduce on the 3.19.x release?

fowles avatar Jan 13 '22 17:01 fowles

Does this reproduce on the 3.19.x release?

Yes , I tried on 3.19.4, and it is reproducible.

HarinadhD avatar Apr 12 '22 04:04 HarinadhD

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Feb 09 '24 10:02 github-actions[bot]

Can it be fixed?

ICT-YuJia avatar Feb 17 '24 00:02 ICT-YuJia

To debug this further we need a repro that occurs on the 3.21.x line. At minimum, we likely need a .proto file, a full error message, and precise gcc and protoc versions you are using.

That said, even 21.x is going out of support at the end of March, so I recommend trying to upgrade to 4.25.x.

https://engdoc.corp.google.com/eng/doc/devguide/proto/support/version-support.md?cl=head

fowles avatar Feb 17 '24 03:02 fowles

Externally visible support schedule: https://protobuf.dev/support/version-support/

elharo avatar Feb 17 '24 12:02 elharo

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar May 18 '24 10:05 github-actions[bot]

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

github-actions[bot] avatar Jun 03 '24 10:06 github-actions[bot]