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

Tensorflowlite: bazel windows build is broken #25690

Closed
ElderOrb opened this issue Feb 12, 2019 · 7 comments
Closed

Tensorflowlite: bazel windows build is broken #25690

ElderOrb opened this issue Feb 12, 2019 · 7 comments
Assignees
Labels
comp:lite TF Lite related issues type:build/install Build and install issues

Comments

@ElderOrb
Copy link

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
    Windows 10

  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
    n/a

  • TensorFlow installed from (source or binary):
    Build from source

  • TensorFlow version:
    master, 07d4fe2

  • Python version:
    2.7.15

  • Installed using virtualenv? pip? conda?:
    n/a

  • Bazel version (if compiling from source):
    0.21.0

  • GCC/Compiler version (if compiling from source):
    MSVC 2017

  • CUDA/cuDNN version:
    n/a

  • GPU model and memory:
    n/a

Describe the problem
Windows build of tensorflow lite fails.

Provide the exact sequence of commands / steps that you executed before running into the problem

D:\AI\tensorflow>bazel.exe --output_user_root ./builddir build --jobs 1 //tensorflow/lite:libtensorflowlite.so
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
d:\ai\tensorflow/.bazelrc
INFO: Invocation ID: 4d63708d-d989-452b-8ad1-8cdde66edcdb
DEBUG: D:/ai/tensorflow/builddir/jkmrio3k/external/build_bazel_rules_apple/apple/repositories.bzl:35:5:
WARNING: build_bazel_rules_apple depends on bazel_skylib loaded from https://github.com/bazelbuild/bazel-skylib.git (tag 0.6.0), but we have detected it already loaded into your workspace from None (tag No
ne). You may run into compatibility issues. To silence this warning, pass ignore_version_differences = True to apple_rules_dependencies().

INFO: Analysed target //tensorflow/lite:libtensorflowlite.so (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: D:/ai/tensorflow/tensorflow/lite/kernels/BUILD:259:1: C++ compilation of rule '//tensorflow/lite/kernels:lstm_eval' failed (Exit 2)
cl : Command line warning D9002 : ignoring unknown option '/Gw'
.\tensorflow/lite/c/c_api_internal.h(32) : fatal error C1083: Cannot open include file: 'stdbool.h': No such file or directory
Target //tensorflow/lite:libtensorflowlite.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.579s, Critical Path: 0.10s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

@jvishnuvardhan jvishnuvardhan self-assigned this Feb 12, 2019
@jvishnuvardhan jvishnuvardhan added comp:lite TF Lite related issues type:build/install Build and install issues labels Feb 12, 2019
@ElderOrb
Copy link
Author

any progress here?

@jvishnuvardhan jvishnuvardhan added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Feb 25, 2019
@gunan gunan assigned jdduke and unassigned gunan Feb 25, 2019
@jdduke
Copy link
Member

jdduke commented Mar 1, 2019

If you move the include as follows:

#ifndef __cplusplus
#include <stdbool.h>
#endif  // __cplusplus

does that solve the problem?

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Mar 1, 2019
@ElderOrb
Copy link
Author

ElderOrb commented Mar 6, 2019

Yes, it did help with that issue, but new one appeared:

INFO: Analysed target //tensorflow/lite:libtensorflowlite.so (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
INFO: From Compiling tensorflow/lite/kernels/lstm_eval.cc:
cl : Command line warning D9002 : ignoring unknown option '/Gw'
ERROR: D:/ai/tensorflow/tensorflow/lite/kernels/internal/BUILD:473:1: C++ compilation of rule '//tensorflow/lite/kernels/internal:tensor_utils' failed (Exit 2)
cl : Command line warning D9002 : ignoring unknown option '/Gw'
cl : Command line warning D9002 : ignoring unknown option '-O3'
d:\ai\tensorflow\builddir\jkmrio3k\execroot\org_tensorflow\external\gemmlowp\internal../profiling/pthread_everywhere.h(40) : fatal error C1083: Cannot open include file: 'condition_variable': No such file or
directory
Target //tensorflow/lite:libtensorflowlite.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.798s, Critical Path: 0.72s
INFO: 1 process: 1 local.
FAILED: Build did NOT complete successfully

@ElderOrb
Copy link
Author

ElderOrb commented Mar 6, 2019

I guess this is because Microsoft's compiler doesn't switch to c++ 11 mode (btw, weird, it should be c++ 11 without any options)... In any case I've tried to pass "--std=c++11" or "/std:c++14" or "/std:c++17" but in all the cases options were not recognized as valid:

cl : Command line warning D9002 : ignoring unknown option '/Gw'
cl : Command line warning D9002 : ignoring unknown option '--std=c++11'

@ElderOrb
Copy link
Author

ElderOrb commented Mar 6, 2019

Not sure what I did besides retrying (btw, why does bazel show different random build errors on build failures) but now the error is the following:

cl : Command line warning D9002 : ignoring unknown option '/Gw'
tensorflow/lite/kernels/internal/mfcc_dct.cc(44) : error C2668: 'atan' : ambiguous call to overloaded function
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\math.h(553): could be 'long double atan(long double)'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\math.h(505): or 'float atan(float)'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\math.h(108): or 'double atan(double)'
while trying to match the argument list '(int)'
Target //tensorflow/lite:libtensorflowlite.so failed to build

@ElderOrb
Copy link
Author

any update here?

@tensorflow-bot
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants