Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with flatbuffers-2.0.6: flatbuffers headers aren't forward-compatible #1922

Closed
yurivict opened this issue May 13, 2022 · 2 comments
Closed

Comments

@yurivict
Copy link

In file included from /wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/optimizer/tflitextra/BinaryActivation.cpp:10:
/wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/tflite/schema/schema_generated.h:2759:12: error: no matching member function for call to 'VerifyField'
           VerifyField<uint8_t>(verifier, VT_DETAILS_TYPE) &&
           ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/flatbuffers/table.h:115:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  bool VerifyField(const Verifier &verifier, voffset_t field,
       ^
In file included from /wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/optimizer/tflitextra/BinaryActivation.cpp:10: 
/wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/tflite/schema/schema_generated.h:2762:12: error: no matching member function for call to 'VerifyField'
           VerifyField<int32_t>(verifier, VT_QUANTIZED_DIMENSION) &&
           ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/flatbuffers/table.h:115:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  bool VerifyField(const Verifier &verifier, voffset_t field,
       ^
In file included from /wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/optimizer/tflitextra/BinaryActivation.cpp:10: 
/wrkdirs/usr/ports/misc/mnn/work/MNN-1.2.0/tools/converter/source/tflite/schema/schema_generated.h:2903:12: error: no matching member function for call to 'VerifyField'
           VerifyField<int8_t>(verifier, VT_TYPE) &&
           ^~~~~~~~~~~~~~~~~~~
/usr/local/include/flatbuffers/table.h:115:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  bool VerifyField(const Verifier &verifier, voffset_t field,
       ^

You need to keep the flatbuffers format definition in the repository and regenerate headers during build.

See this comment as reference.

@jxt1234
Copy link
Collaborator

jxt1234 commented May 16, 2022

Please Use the flatbuffer in MNN's dirs: 3rd_party/flatbuffers , otherwise you need regenerate the flatbuffer schema

@jxt1234 jxt1234 closed this as completed May 16, 2022
@yurivict
Copy link
Author

No, you need to regenerate headers during build.
The flatbuffers version is fixed - it comes from ports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants