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

bazel build failed on nl_classifier_demo #211

Closed
howl-anderson opened this issue Oct 26, 2020 · 9 comments
Closed

bazel build failed on nl_classifier_demo #211

howl-anderson opened this issue Oct 26, 2020 · 9 comments
Assignees

Comments

@howl-anderson
Copy link

howl-anderson commented Oct 26, 2020

source: commit 1202da8

OS: Ubuntu 18.04.5

bazel: 3.7.0

c++ toolchain: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

comand:

bazel build tensorflow_lite_support/examples/task/text/desktop:nl_classifier_demo

error message:

tensorflow_lite_support/cc/task/text/nlclassifier/nl_classifier.cc: In function 'tflite::support::StatusOr<std::unique_ptr<tflite::support::text::tokenizer::Tokenizer> > tflite::task::text::nlclassifier::{anonymous}::CreateRegexTokenizerFromProcessUnit(const tflite::ProcessUnit*, const tflite::metadata::ModelMetadataExtractor*)':
tensorflow_lite_support/cc/task/text/nlclassifier/nl_classifier.cc:136:10: error: could not convert 'regex_tokenizer' from 'std::unique_ptr<tflite::support::text::tokenizer::RegexTokenizer>' to 'tflite::support::StatusOr<std::unique_ptr<tflite::support::text::tokenizer::Tokenizer> >'
   return regex_tokenizer;
          ^~~~~~~~~~~~~~~
@SunAriesCN
Copy link

Maybe commit bdaa876a8e2e955f8cec34ab970a2bd6abd6f61c has resolve this problem.

@howl-anderson
Copy link
Author

Hi @SunAriesCN, thank you for your suggestion, however, I just tried that commit, It doesn't work. Thank you anyway!

@SunAriesCN
Copy link

Well, I think it maybe a runtime problem, a docker image for compilation provided by TFers may help problems like this.

@howl-anderson
Copy link
Author

Well, I compile the same target on Mac OS 10.15.7 with bazelisk instead of bazel, it works! Unfortunately, I try the same thing the same way on Ubuntu, it still not works.

@xunkai55
Copy link
Contributor

Hi, could you also provide bazel version and C++ toolchain version? Thanks!

@howl-anderson
Copy link
Author

Hi @xunkai55 I already added the bazel version and C++ toolchain version to the issue description, please take a look.

@xunkai55 xunkai55 self-assigned this Oct 29, 2020
@xunkai55
Copy link
Contributor

I can reproduce that bug right now. Looking into it.

@lu-wang-g
Copy link
Member

@xunkai55 any update?

@lu-wang-g
Copy link
Member

This issue should have been fixed by explicitly std::move regex_tokenizer to StatusOr<std::unique_ptr>. See the code.

Feel free to reopen the issue if you have further questions.

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

4 participants