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

[tensorflow] Build error on x64-windows #44002

Open
UnknownObject000 opened this issue Feb 24, 2025 · 4 comments
Open

[tensorflow] Build error on x64-windows #44002

UnknownObject000 opened this issue Feb 24, 2025 · 4 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@UnknownObject000
Copy link

Package: tensorflow:[email protected]

Host Environment

  • Host: x64-windows
  • Compiler: MSVC 19.36.32535.0
  • vcpkg-tool version: 2025-02-11-bec4296bf5289dc9ce83b4f5095943e44162f9c2
    vcpkg-scripts version: 11be7f5 2025-02-23 (7 hours ago)

To Reproduce

vcpkg install tensorflow:x64-windows

Failure logs

-- Using cached msys2-bash-5.2.037-1-x86_64.pkg.tar.zst
-- Using cached msys2-unzip-6.0-3-x86_64.pkg.tar.zst
-- Using cached msys2-patch-2.7.6-2-x86_64.pkg.tar.zst
-- Using cached msys2-diffutils-3.10-1-x86_64.pkg.tar.zst
-- Using cached msys2-libintl-0.22.4-1-x86_64.pkg.tar.zst
-- Using cached msys2-gzip-1.13-1-x86_64.pkg.tar.zst
-- Using cached msys2-coreutils-8.32-5-x86_64.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-python-numpy-2.1.1-1-any.pkg.tar.zst
-- Using cached msys2-file-5.45-3-x86_64.pkg.tar.zst
-- Using cached msys2-gawk-5.3.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-grep-1~3.0-6-x86_64.pkg.tar.zst
-- Using cached msys2-make-4.4.1-2-x86_64.pkg.tar.zst
-- Using cached msys2-pkgconf-2.3.0-1-x86_64.pkg.tar.zst
-- Using cached msys2-sed-4.9-1-x86_64.pkg.tar.zst
-- Using cached msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst
-- Using cached msys2-libbz2-1.0.8-4-x86_64.pkg.tar.zst
-- Using cached msys2-libiconv-1.17-1-x86_64.pkg.tar.zst
-- Using cached msys2-gcc-libs-13.3.0-1-x86_64.pkg.tar.zst
-- Using cached msys2-gmp-6.3.0-1-x86_64.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-openblas-0.3.28-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-python-3.11.10-1-any.pkg.tar.zst
-- Using cached msys2-liblzma-5.6.3-1-x86_64.pkg.tar.zst
-- Using cached msys2-libzstd-1.5.6-1-x86_64.pkg.tar.zst
-- Using cached msys2-zlib-1.3.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-libreadline-8.2.013-1-x86_64.pkg.tar.zst
-- Using cached msys2-mpfr-4.2.1-1-x86_64.pkg.tar.zst
-- Using cached msys2-libpcre-8.45-4-x86_64.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-gcc-libgfortran-14.2.0-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-gcc-libs-14.2.0-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-libwinpthread-git-12.0.0.r351.gcdf6b16b8-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-bzip2-1.0.8-3-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-expat-2.6.3-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-libffi-3.4.6-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-mpdecimal-4.0.0-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-ncurses-6.5.20240831-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-openssl-3.3.2-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-sqlite3-3.46.1-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-tcl-8.6.13-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-tk-8.6.13-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-xz-5.6.3-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-zlib-1.3.1-1-any.pkg.tar.zst
-- Using cached msys2-ncurses-6.5.20240831-2-x86_64.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-libsystre-1.0.1-6-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-readline-8.2.013-1-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-gettext-runtime-0.22.5-2-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-termcap-1.3.1-7-any.pkg.tar.zst
-- Using cached msys2-mingw-w64-x86_64-libiconv-1.17-4-any.pkg.tar.zst
-- Using msys root at F:/vcpkg/downloads/tools/msys2/050466f72527edb1
-- Using cached tensorflow-tensorflow-v2.10.0.tar.gz
-- Extracting source F:/vcpkg/downloads/tensorflow-tensorflow-v2.10.0.tar.gz
-- Applying patch F:/vcpkg/installed/x64-windows/share/tensorflow-common/fix-build-error.patch
-- Applying patch F:/vcpkg/installed/x64-windows/share/tensorflow-common/fix-windows-build.patch
-- Using source at F:/vcpkg/buildtrees/tensorflow/src/v2.10.0-257b67b673.clean
-- Configuring TensorFlow (dbg)
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: F:/vcpkg/downloads/tools/msys2/050466f72527edb1/mingw64/bin/python3.exe F:/vcpkg/buildtrees/tensorflow/x64-windows-dbg/configure.py --workspace F:/vcpkg/buildtrees/tensorflow/x64-windows-dbg
    Working Directory: F:/vcpkg/buildtrees/tensorflow/x64-windows-dbg
    Error code: 1
    See logs for more information:
      F:\vcpkg\buildtrees\tensorflow\config-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/tensorflow-common/tensorflow-common.cmake:184 (vcpkg_execute_required_process)
  ports/tensorflow/portfile.cmake:5 (include)
  scripts/ports.cmake:196 (include)



F:\vcpkg\buildtrees\tensorflow\config-x64-windows-dbg-out.log
Cannot find bazel. Please install bazel/bazelisk.

----------------------------More Informations----------------------------
I installed bazel using choco install bazel and it can run normally.

bazel output
PS F:\vcpkg> bazel
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a MODULE.bazel file).
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
                                                           [bazel release 8.1.0]
Usage: bazel <command> <options> ...

Available commands:
  analyze-profile     Analyzes build profile data.
  aquery              Analyzes the given targets and queries the action graph.
  build               Builds the specified targets.
  canonicalize-flags  Canonicalizes a list of bazel options.
  clean               Removes output files and optionally stops the server.
  coverage            Generates code coverage report for specified test targets.
  cquery              Loads, analyzes, and queries the specified targets w/ configurations.
  dump                Dumps the internal state of the bazel server process.
  fetch               Fetches external repositories that are prerequisites to the targets.
  help                Prints help for commands, or the index.
  info                Displays runtime info about the bazel server.
  license             Prints the license of this software.
  mobile-install      Installs targets to mobile devices.
  mod                 Queries the Bzlmod external dependency graph
  print_action        Prints the command line args for compiling a file.
  query               Executes a dependency graph query.
  run                 Runs the specified target.
  shutdown            Stops the bazel server.
  sync                Syncs all repositories specified in the workspace file
  test                Builds and runs the specified test targets.
  vendor              Fetches external repositories into a folder specified by the flag --vendor_dir.
  version             Prints version information for bazel.

Getting more help:
  bazel help <command>
                   Prints help and options for <command>.
  bazel help startup_options
                   Options for the JVM hosting bazel.
  bazel help target-syntax
                   Explains the syntax for specifying targets.
  bazel help info-keys
                   Displays a list of keys used by the info command.

And the vcpkg-tool-bazel

PS F:\vcpkg> vcpkg install vcpkg-tool-bazel
Computing installation plan...
The following packages are already installed:
    vcpkg-tool-bazel:[email protected]
vcpkg-tool-bazel:x64-windows is already installed
Total install time: 6.85 ms
@Moin2002-tech
Copy link

Moin2002-tech commented Feb 24, 2025

Navigate to vcpkg\installed\x64-windows\tools.

Locate the file named bazel.

Rename it to bazel.exe.

and Run ./vcpkg install tensorlfow:x64-windows

@UnknownObject000
Copy link
Author

Navigate to vcpkg\installed\x64-windows\tools.

Locate the file named bazel.

Rename it to bazel.exe.

and Run ./vcpkg install tensorlfow:x64-windows

After renamed the file, new error is reported:

-- Configuring TensorFlow (dbg)
-- You are using HTTPS_PROXY. In case you encounter bazel certificate errors, you might want to set: BAZEL_CUSTOM_CACERTS=/path/to/trust.store (and optionally BAZEL_CUSTOM_CACERTS_PASSWORD), and to enable vcpkg to actually use it: VCPKG_KEEP_ENV_VARS=BAZEL_CUSTOM_CACERTS;BAZEL_CUSTOM_CACERTS_PASSWORD
-- (For BAZEL_CUSTOM_CACERTS please use forward slashes instead of backslashes on Windows systems.
-- Warning: Building TensorFlow can take an hour or more.
-- Build Tensorflow with concurrent level: 21
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: F:/vcpkg/downloads/tools/msys2/050466f72527edb1/usr/bin/bash.exe --noprofile --norc -c "'F:/vcpkg/installed/x64-windows/tools/bazel.exe' --output_user_root='F:/vcpkg/buildtrees/tensorflow/.bzl' --max_idle_secs=1 build --verbose_failures --jobs 21 --compilation_mode=dbg --features=fastbuild    --python_path='F:/vcpkg/downloads/tools/msys2/050466f72527edb1/mingw64/bin/python3.exe' --define=no_tensorflow_py_deps=true ///tensorflow:tensorflow.dll ///tensorflow:install_headers"
    Working Directory: F:/vcpkg/buildtrees/tensorflow/x64-windows-dbg
    See logs for more information:
      F:\vcpkg\buildtrees\tensorflow\build-x64-windows-dbg-err.log

Call Stack (most recent call first):
  installed/x64-windows/share/tensorflow-common/tensorflow-common.cmake:278 (vcpkg_execute_build_process)
  ports/tensorflow/portfile.cmake:5 (include)
  scripts/ports.cmake:196 (include)


error: building tensorflow:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle tensorflow:x64-windows: 10 s

Content of F:\vcpkg\buildtrees\tensorflow\build-x64-windows-dbg-err.log :

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: Expected value after --jobs
/usr/bin/bash: line 1: 21: command not found
/usr/bin/bash: line 1: --compilation_mode=dbg: command not found

@UnknownObject000
Copy link
Author

I tried with no proxy, it reports the same error.

@WangWeiLin-MV WangWeiLin-MV added the category:port-bug The issue is with a library, which is something the port should already support label Feb 25, 2025
@WangWeiLin-MV
Copy link
Contributor

See #37873 and the upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

3 participants