From 0ab169d7214e915d23d3c3c4991c8cdb274d101f Mon Sep 17 00:00:00 2001 From: Gehweiler Date: Thu, 23 Jul 2020 21:53:34 +0200 Subject: [PATCH 1/9] fix build issues occurring from default bazel config being used because customized bazel config is stored in wrong directory --- ports/tensorflow-cc/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/tensorflow-cc/portfile.cmake b/ports/tensorflow-cc/portfile.cmake index 8d2c187b057b86..fb581181b6018f 100644 --- a/ports/tensorflow-cc/portfile.cmake +++ b/ports/tensorflow-cc/portfile.cmake @@ -79,7 +79,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 ) From 543e19dba82ab9a506cfc14c77235c756456dbc5 Mon Sep 17 00:00:00 2001 From: wangli28 Date: Fri, 24 Jul 2020 02:36:50 +0000 Subject: [PATCH 2/9] [tensorflow-cc] Update CONTROL and ci.baseline.txt --- ports/tensorflow-cc/CONTROL | 3 ++- scripts/ci.baseline.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/tensorflow-cc/CONTROL b/ports/tensorflow-cc/CONTROL index a9830adb24f719..6fa024164b5297 100644 --- a/ports/tensorflow-cc/CONTROL +++ b/ports/tensorflow-cc/CONTROL @@ -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 diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 5546c1f1ae9aec..05613d755a2f44 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1712,7 +1712,6 @@ telnetpp:x64-uwp=fail tensorflow-cc:arm64-windows=fail tensorflow-cc:x64-linux=skip tensorflow-cc:x64-osx=skip -tensorflow-cc:x64-windows=fail tensorflow-cc:x64-windows-static=fail tensorflow-cc:x86-windows=fail tesseract:x64-windows=fail From 820c45520265ddd233cf2709ea904b532efa562a Mon Sep 17 00:00:00 2001 From: jgehw Date: Fri, 24 Jul 2020 15:23:18 +0200 Subject: [PATCH 3/9] fix also applies to windows static build --- scripts/ci.baseline.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 05613d755a2f44..12e226ef60ccbc 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1712,7 +1712,6 @@ telnetpp:x64-uwp=fail tensorflow-cc:arm64-windows=fail tensorflow-cc:x64-linux=skip tensorflow-cc:x64-osx=skip -tensorflow-cc:x64-windows-static=fail tensorflow-cc:x86-windows=fail tesseract:x64-windows=fail tesseract:x64-windows-static=fail From fec41d4a2ce6e3035d671ce053ac5639d19eb67b Mon Sep 17 00:00:00 2001 From: jgehw Date: Thu, 30 Jul 2020 19:35:18 +0200 Subject: [PATCH 4/9] Revert "fix also applies to windows static build" --- scripts/ci.baseline.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 12e226ef60ccbc..05613d755a2f44 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1712,6 +1712,7 @@ telnetpp:x64-uwp=fail tensorflow-cc:arm64-windows=fail tensorflow-cc:x64-linux=skip tensorflow-cc:x64-osx=skip +tensorflow-cc:x64-windows-static=fail tensorflow-cc:x86-windows=fail tesseract:x64-windows=fail tesseract:x64-windows-static=fail From 581ab3d336ab2b59d6f9c3d2b0fb3e273efd0081 Mon Sep 17 00:00:00 2001 From: jgehw Date: Thu, 30 Jul 2020 19:40:39 +0200 Subject: [PATCH 5/9] 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 --- ports/tensorflow-cc/portfile.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/tensorflow-cc/portfile.cmake b/ports/tensorflow-cc/portfile.cmake index fb581181b6018f..b1bb0d8e46c92d 100644 --- a/ports/tensorflow-cc/portfile.cmake +++ b/ports/tensorflow-cc/portfile.cmake @@ -44,9 +44,6 @@ if(CMAKE_HOST_WIN32) vcpkg_acquire_msys(MSYS_ROOT PACKAGES unzip patch diffutils git) set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) set(ENV{BAZEL_SH} ${MSYS_ROOT}/usr/bin/bash.exe) - - set(ENV{BAZEL_VS} $ENV{VSInstallDir}) - set(ENV{BAZEL_VC} $ENV{VCInstallDir}) endif() # tensorflow has long file names, which will not work on windows From 70b26dd7e00b1eb64405e538fc9f2ab61fb68674 Mon Sep 17 00:00:00 2001 From: jgehw Date: Tue, 4 Aug 2020 16:10:38 +0200 Subject: [PATCH 6/9] 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 --- ports/tensorflow-cc/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/tensorflow-cc/portfile.cmake b/ports/tensorflow-cc/portfile.cmake index b1bb0d8e46c92d..fdd95307c4bc38 100644 --- a/ports/tensorflow-cc/portfile.cmake +++ b/ports/tensorflow-cc/portfile.cmake @@ -44,6 +44,10 @@ if(CMAKE_HOST_WIN32) vcpkg_acquire_msys(MSYS_ROOT PACKAGES unzip patch diffutils git) set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) set(ENV{BAZEL_SH} ${MSYS_ROOT}/usr/bin/bash.exe) + + 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 From d8fdade0fa0291e4be04e6b97a80fc0c437ade7e Mon Sep 17 00:00:00 2001 From: jgehw Date: Wed, 5 Aug 2020 20:24:13 +0200 Subject: [PATCH 7/9] see if updating really outdated bazel fixes finding correct VC tools on Azure DevOps --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index a5aefdc29297cd..6a9c1e0316e5ce 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -317,7 +317,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b) elseif(VAR MATCHES "BAZEL") set(PROGNAME bazel) - set(BAZEL_VERSION 0.25.2) + set(BAZEL_VERSION 3.4.1) set(SUBDIR ${BAZEL_VERSION}) set(PATHS ${DOWNLOADS}/tools/bazel/${SUBDIR}) set(_vfa_RENAME "bazel") @@ -326,17 +326,17 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64") set(ARCHIVE "bazel-${BAZEL_VERSION}-linux-x86_64") set(NOEXTRACT ON) - set(HASH db4a583cf2996aeb29fd008261b12fe39a4a5faf0fbf96f7124e6d3ffeccf6d9655d391378e68dd0915bc91c9e146a51fd9661963743857ca25179547feceab1) + set(HASH 3b68d3262508e10887cf021aa58a241e935f9b4c1487db6da29499848651a255bd2934054dd12be933ede6dfb8e8f424aa5d205f5c13d05fdf21889d9edab3d6) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set(_vfa_SUPPORTED ON) set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-darwin-x86_64") set(ARCHIVE "bazel-${BAZEL_VERSION}-darwin-x86_64") set(NOEXTRACT ON) - set(HASH 420a37081e6ee76441b0d92ff26d1715ce647737ce888877980d0665197b5a619d6afe6102f2e7edfb5062c9b40630a10b2539585e35479b780074ada978d23c) + set(HASH 765a49e2ceeb034ffbc59df41297e12a70b9cccba8f5470dd95b89ed8d1a33eb3ae68e837a28612a45dbc96e6c2245cdaec8a843ed3b55b174c5a93653314b4a) else() set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.zip") set(ARCHIVE "bazel-${BAZEL_VERSION}-windows-x86_64.zip") - set(HASH 6482f99a0896f55ef65739e7b53452fd9c0adf597b599d0022a5e0c5fa4374f4a958d46f98e8ba25af4b065adacc578bfedced483d8c169ea5cb1777a99eea53) + set(HASH e47af58e16ee987f0f14042ac581207ea73cb4ab536ba20d1d1d6f99892aedf039af0fbbc5824227582770b79cb487dd20833acaa8dec4b50994cca8f296c32e) endif() # Download Tools elseif(VAR MATCHES "ARIA2") From 9ded366f829a767ca339bfd1254a404740602c77 Mon Sep 17 00:00:00 2001 From: jgehw <44170764+jgehw@users.noreply.github.com> Date: Thu, 6 Aug 2020 18:50:12 +0200 Subject: [PATCH 8/9] 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. --- scripts/ci.baseline.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 99d7afb892430e..8b1c6b31c3c912 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1718,6 +1718,7 @@ telnetpp:x64-uwp=fail tensorflow-cc:arm64-windows=fail tensorflow-cc:x64-linux=skip tensorflow-cc:x64-osx=skip +tensorflow-cc:x64-windows=fail tensorflow-cc:x64-windows-static=fail tensorflow-cc:x86-windows=fail tesseract:x64-windows=fail From 6d7b6407f9788d37ffdfea40206b12139d8b840b Mon Sep 17 00:00:00 2001 From: jgehw <44170764+jgehw@users.noreply.github.com> Date: Thu, 6 Aug 2020 18:55:28 +0200 Subject: [PATCH 9/9] revert bazel upgrade as tensorflow v1.14 requires outdated bazel 0.25 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index f423d9639ec912..8b006990a5e5c2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -347,7 +347,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b) elseif(VAR MATCHES "BAZEL") set(PROGNAME bazel) - set(BAZEL_VERSION 3.4.1) + set(BAZEL_VERSION 0.25.2) set(SUBDIR ${BAZEL_VERSION}) set(PATHS ${DOWNLOADS}/tools/bazel/${SUBDIR}) set(_vfa_RENAME "bazel") @@ -356,17 +356,17 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64") set(ARCHIVE "bazel-${BAZEL_VERSION}-linux-x86_64") set(NOEXTRACT ON) - set(HASH 3b68d3262508e10887cf021aa58a241e935f9b4c1487db6da29499848651a255bd2934054dd12be933ede6dfb8e8f424aa5d205f5c13d05fdf21889d9edab3d6) + set(HASH db4a583cf2996aeb29fd008261b12fe39a4a5faf0fbf96f7124e6d3ffeccf6d9655d391378e68dd0915bc91c9e146a51fd9661963743857ca25179547feceab1) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set(_vfa_SUPPORTED ON) set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-darwin-x86_64") set(ARCHIVE "bazel-${BAZEL_VERSION}-darwin-x86_64") set(NOEXTRACT ON) - set(HASH 765a49e2ceeb034ffbc59df41297e12a70b9cccba8f5470dd95b89ed8d1a33eb3ae68e837a28612a45dbc96e6c2245cdaec8a843ed3b55b174c5a93653314b4a) + set(HASH 420a37081e6ee76441b0d92ff26d1715ce647737ce888877980d0665197b5a619d6afe6102f2e7edfb5062c9b40630a10b2539585e35479b780074ada978d23c) else() set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.zip") set(ARCHIVE "bazel-${BAZEL_VERSION}-windows-x86_64.zip") - set(HASH e47af58e16ee987f0f14042ac581207ea73cb4ab536ba20d1d1d6f99892aedf039af0fbbc5824227582770b79cb487dd20833acaa8dec4b50994cca8f296c32e) + set(HASH 6482f99a0896f55ef65739e7b53452fd9c0adf597b599d0022a5e0c5fa4374f4a958d46f98e8ba25af4b065adacc578bfedced483d8c169ea5cb1777a99eea53) endif() # Download Tools elseif(VAR MATCHES "ARIA2")