[tensorflow-cc] fix build issues on Windows (#12546)

* fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory

* [tensorflow-cc] Update CONTROL and ci.baseline.txt

* fix also applies to windows static build

* Revert "fix also applies to windows static build"

* leave variables unset in order to let bazel auto-detect them the same way it auto-detects include path avoiding mismatches between toolset and include files versions

* bazel VC auto-detect doesn't work (it ends up in a dev command prompt and tries to parse it), so fix the issue of inconsistency of toolset versions between auto-detection in vcpkg and bazel by letting vcpkg determine everything including toolset version

* see if updating really outdated bazel fixes finding correct VC tools on Azure DevOps

* setting x64-windows CI to fail again

It doesn't work if more than one VC toolkit is installed. Likely a bug in bazel. bazel is currently v3.4.1, however tensorflow v1.14 requires really outdated bazel v0.25. Going to upgrade tensorflow to v2.3 and then using up-to-date bazel, but will do this in a separate pull request, as it requires more work.

* revert bazel upgrade as tensorflow v1.14 requires outdated bazel 0.25

Co-authored-by: Gehweiler <Joachim_Gehweiler@McAfee.com>
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
This commit is contained in:
jgehw 2020-08-07 21:08:51 +02:00 committed by GitHub
parent 222c35e3bc
commit 5945950b25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Source: tensorflow-cc
Version: 1.14-3
Version: 1.14
Port-Version: 4
Description: Library for computation using data flow graphs for scalable machine learning
Build-Depends: c-ares
Supports: !x86

View File

@ -47,6 +47,7 @@ if(CMAKE_HOST_WIN32)
set(ENV{BAZEL_VS} $ENV{VSInstallDir})
set(ENV{BAZEL_VC} $ENV{VCInstallDir})
set(ENV{BAZEL_VC_FULL_VERSION} $ENV{VCToolsVersion})
endif()
# tensorflow has long file names, which will not work on windows
@ -79,7 +80,7 @@ set(ENV{TF_CONFIGURE_IOS} 0)
message(STATUS "Configuring TensorFlow")
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${SOURCE_PATH}/configure.py
COMMAND ${PYTHON3} ${SOURCE_PATH}/configure.py --workspace "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME config-${TARGET_TRIPLET}-rel
)