Hi i am building .so files using bazell build command but i get this error

667 views
Skip to first unread message

Sabir Ullah

unread,
Oct 20, 2018, 11:33:13 AM10/20/18
to bazel-discuss
ERROR: C:/users/sabir-pc/_bazel_sabir-pc/zp6kp3ov/external/com_google_absl/absl/base/BUILD.bazel:118:1: C++ compilation of rule '@com_google_absl//absl/base:base' failed (Exit 1)
In file included from external/com_google_absl/absl/base/internal/unscaledcycleclock.cc:15:
In file included from external/com_google_absl\absl/base/internal/unscaledcycleclock.h:45:
In file included from external/com_google_absl\absl/base/port.h:23:
In file included from external/com_google_absl\absl/base/config.h:66:
external/com_google_absl\absl/base/policy_checks.h:77:2: error: "C++ versions less than C++11 are not supported."
#error "C++ versions less than C++11 are not supported."
 ^
1 error generated.
Target //tensorflow/contrib/android:libtensorflow_inference.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 33.057s, Critical Path: 8.27s
INFO: 47 processes: 47 local.
FAILED: Build did NOT complete successfully
so please any one who knowledge pleas guide

László Csomor

unread,
Oct 22, 2018, 3:51:00 AM10/22/18
to sabi...@gmail.com, bazel-...@googlegroups.com
What's the output with "--verbose_failures"? 


--
László Csomor | Software Engineer | laszlo...@google.com

Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/1d2272a7-eb17-4b2b-b1b2-5e6eda1c8281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jingwen Chen

unread,
Oct 22, 2018, 12:15:35 PM10/22/18
to bazel-discuss
I've updated the instructions to build TF lite for Android on GitHub with the missing `--cxxopt=-std=c++11` flag: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/android#bazel 

The full Bazel command is:

bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \
   --crosstool_top=//external:android/crosstool \
   --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
   --cxxopt=-std=c++11 \
   --cpu=armeabi-v7a

Sabir Ullah

unread,
Oct 23, 2018, 9:27:29 AM10/23/18
to bazel-discuss
HI is this a problem that i have install bazel version 0.17.1 and in my tensorflow workspace directory the_bazel_version_at_least("0.15.0") is this . so just confirm that thst is this create the below problem....

László Csomor

unread,
Oct 23, 2018, 9:29:30 AM10/23/18
to Sabir Ullah, bazel-...@googlegroups.com
The Bazel version you use should be fine.
Did you try the solution Jingwen was suggesting? What's the result?

--
László Csomor | Software Engineer | laszlo...@google.com

Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.

Sabir Ullah

unread,
Oct 23, 2018, 9:32:06 AM10/23/18
to László Csomor, bazel-...@googlegroups.com
Yes, I did. but it also give me the same error i thing it should be the problem of the of the visual c++ tool ...

László Csomor

unread,
Oct 23, 2018, 9:47:26 AM10/23/18
to Sabir Ullah, bazel-...@googlegroups.com
I don't think it's Visual C++ because, according to --verbose_failures, you are building with Clang.

- What's the exact Bazel command you ran?
- Did you run TensorFlow's configuration script?
- Which version of the TF sources do you use? If you checked it out from GitHub, what's the commit number?
- Did you contact TF about this problem?


--
László Csomor | Software Engineer | laszlo...@google.com

Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado


Jingwen Chen

unread,
Oct 24, 2018, 5:18:32 PM10/24/18
to Sabir Ullah, László Csomor, bazel-...@googlegroups.com
Hi Sabir,

Let's just contain your discussion to this thread, please don't create new email threads about the same issue.

When you said "Yes, I did. but it also give me the same error i thing it should be the problem of the of the visual c++ tool ...", could you please paste the output after running the command I mentioned earlier? 

bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \
   --crosstool_top=//external:android/crosstool \
   --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
   --cxxopt=-std=c++11 \
   --cpu=armeabi-v7a

Thanks,
Jingwen

zhaohu...@gmail.com

unread,
Dec 28, 2018, 4:50:48 AM12/28/18
to bazel-discuss
在 2018年10月23日星期二 UTC+8上午12:15:35,Jingwen Chen写道:
感谢Jingwen Chen, 我通过增加 --cxxopt=-std=c++11 参数, 编译成功.谢谢.

jamess...@gmail.com

unread,
Apr 2, 2019, 3:58:02 PM4/2/19
to bazel-discuss
i Got the same error. Any solution??
Reply all
Reply to author
Forward
0 new messages