protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

error: call to undeclared function '_upb_MiniTable_GetSubByIndex'; ISO C99 and later do not support implicit function declarations

Open calvin2021y opened this issue 1 year ago • 7 comments

What version of protobuf and what language are you using?

today main branch: https://github.com/protocolbuffers/protobuf/commit/de29e3c9aeff8b85913f6bd1a2395e303f932ab4

_upb_MiniTable_GetSubByIndex is not exists from source code(grep search not find), but still call from https://github.com/protocolbuffers/protobuf/blob/main/upb/wire/internal/decode_fast.c#L918

calvin2021y avatar Jun 28 '24 16:06 calvin2021y

after _upb_MiniTable_GetSubByIndex => _upb_MiniTable_GetSubTableByIndex:

error: passing 'const struct upb_MiniTable' to parameter of incompatible type 'union upb_MiniTableSub'

calvin2021y avatar Jun 29 '24 07:06 calvin2021y

https://github.com/protocolbuffers/protobuf/commit/85c7cc24e0084a3beda37b848e7037f8f09c6850

@haberman

calvin2021y avatar Jun 29 '24 07:06 calvin2021y

hi @haberman @zhangskz

Today I try master branch b1c0715, still get this error.

Any comment how to fix this ?

calvin2021y avatar Jul 17 '24 13:07 calvin2021y

How are you building protobuf?

The decode_fast.c file is not enabled in any of our normal builds (Bazel, CMake, etc). Are you using a custom build setup?

haberman avatar Jul 17 '24 17:07 haberman

I use bazel:

bazel build //upb:gen_amalgamation
clang bazel-bin/upb/upb.c bazel-bin/upb/upb.h -DUPB_FASTTABLE_ENABLED -DUPB_ENABLE_FASTTABLE -c

The upb_MiniTable from .upb_minitable.c still has the fast field, that is why I build with FASTTABLE

decode_fast/encode_fast will be removed ? or temporarily unavailable?

calvin2021y avatar Jul 18 '24 04:07 calvin2021y

decode_fast/encode_fast will be removed ? or temporarily unavailable?

decode_fast is currently unmaintained. If and when there is a use case that needs the extra parsing speed (and can tolerate the larger code size), we may bring it back.

haberman avatar Jul 18 '24 05:07 haberman

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. This issue will be closed and archived after 14 additional days without activity.

github-actions[bot] avatar Oct 17 '24 10:10 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 Nov 01 '24 10:11 github-actions[bot]