terryzhao127 / tensorflow-windows-build-script

A script to automate building Tensorflow on Windows and solve some problems
GNU General Public License v3.0
102 stars 35 forks source link

Can not build in VS2015... #27

Closed tuzm24 closed 5 years ago

tuzm24 commented 5 years ago

I built like below in powershell

# It is an example for building C++ API with GPU support.
$parameterString = "--config=opt --config=cuda --define=no_tensorflow_py_deps=true --copt=-nvcc_options=disable-warnings //tensorflow:libtensorflow_cc.so --verbose_failures"
.\build.ps1 `
    -BazelBuildParameters $parameterString `
    -BuildCppAPI -ReserveSource -ReserveVenv

and it is look like successfully in powershell..

  C:/users/dms_sub/_bazel_dms_sub/r6rd73de/execroot/org_tensorflow/bazel-out/x64_windows-opt/bin/tensorflow/libtensorflow_cc.so
INFO: Elapsed time: 2045.412s, Critical Path: 494.91s
INFO: 3585 processes: 3585 local.
INFO: Build completed successfully, 4583 total actions
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:
c:\users\dms_sub\downloads\tensorflow-windows-build-script\tensorflow-windows-build-script\source/.bazelrc
INFO: Invocation ID: 79d3a5bc-bb5c-4197-9352-4455f470a4c4

and I used this at https://gist.github.com/imnotkind/6e41217ee8e6cf1373a883681d245029.

I include header folder in

C:\bin\include_proto C:\bin\include_pb C:\bin\include_eigen_archive C:\bin\include_eigen C:\bin\include_absl C:\bin\include

and linked C:\bin\tensorflow_cc.lib

and environment C:\bin\tensorflow_cc.dll

but I was faced with these errors, below... image

Best Regards..

StevenRoodhorst commented 5 years ago

Some where an include file that has no include guard is including itself (directly or indirectly).

Use /showIncludes ("Configuration Properties/C/C++/Advanced/Show Includes" in the IDE's project options) to get help with this.

See other options here

tuzm24 commented 5 years ago

image

I tried it, but I faced more errors... Did I misuse the script?

After I first completed the build with a script, https://gist.github.com/guikarist/e10dff3a4e777856cf40e44713fc2cb7 I extracted the file using the script, but the files such as tensorflow / cc / ops / array_ops.h was not extracted.

I will look at closed issues at https://gist.github.com/imnotkind/6e41217ee8e6cf1373a883681d245029. I found a script for another extraction and used it.

I have found someone with similar problems before. https://github.com/tensorflow/tensorflow/issues/13705#issuecomment-338208089

Thnaks.

tuzm24 commented 5 years ago

Some where an include file that has no include guard is including itself (directly or indirectly).

Use /showIncludes ("Configuration Properties/C/C++/Advanced/Show Includes" in the IDE's project options) to get help with this.

See other options here

Thank you for answer.