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-cc] build failure #25263

Closed
x-bruce opened this issue Jun 16, 2022 · 11 comments
Closed

[tensorflow-cc] build failure #25263

x-bruce opened this issue Jun 16, 2022 · 11 comments
Assignees
Labels
depends:upstream-changes Waiting on a change to the upstream project

Comments

@x-bruce
Copy link

x-bruce commented Jun 16, 2022

Host Environment

  • OS: [Windows10]
  • Compiler: VS2022. v14.29/v14.30 both failed.

To Reproduce
Steps to reproduce the behavior:
./vcpkg install tensorflow-cc:x64-windows

Failure logs

C:\XBruce\vcpkg>vcpkg install tensorflow-cc:x64-windows
Computing installation plan...
The following packages will be built and installed:
    tensorflow-cc[core]:x64-windows -> 2.7.0#2
Detecting compiler hash for triplet x64-windows...
Restored 0 packages from C:\Users\xbruc\AppData\Local\vcpkg\archives in 1.023 ms. Use --debug to see more details.
Installing 1/1 tensorflow-cc:x64-windows...
Building tensorflow-cc[core]:x64-windows...
-- Note: tensorflow-cc only supports static library linkage. Building static library.
-- Using cached msys-unzip-6.0-2-x86_64.pkg.tar.xz.
-- Using cached msys-libbz2-1.0.8-3-x86_64.pkg.tar.zst.
-- Using cached msys-patch-2.7.6-1-x86_64.pkg.tar.xz.
-- Using cached msys-gzip-1.11-1-x86_64.pkg.tar.zst.
-- Using cached msys-bash-5.1.008-1-x86_64.pkg.tar.zst.
-- Using cached msys-diffutils-3.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-coreutils-8.32-2-x86_64.pkg.tar.zst.
-- Using cached msys-grep-3.0-2-x86_64.pkg.tar.xz.
-- Using cached msys-sed-4.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-libpcre-8.45-1-x86_64.pkg.tar.zst.
-- Using cached msys-gawk-5.1.0-2-x86_64.pkg.tar.zst.
-- Using cached msys-mpfr-4.1.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-gmp-6.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys-libreadline-8.1.001-1-x86_64.pkg.tar.zst.
-- Using cached msys-ncurses-6.2-2-x86_64.pkg.tar.zst.
-- Using cached msys-pkg-config-0.29.2-4-x86_64.pkg.tar.zst.
-- Using cached msys-make-4.3-3-x86_64.pkg.tar.zst.
-- Using cached msys-libintl-0.21-1-x86_64.pkg.tar.zst.
-- Using cached msys-libiconv-1.16-2-x86_64.pkg.tar.zst.
-- Using cached msys-gcc-libs-11.2.0-3-x86_64.pkg.tar.zst.
-- Using cached msys-msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-python-numpy-1.20.3-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-openblas-0.3.19-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-gcc-libgfortran-11.2.0-8-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-python-3.8.9-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-bzip2-1.0.8-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-mpdecimal-2.5.1-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-ncurses-6.3-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-libsystre-1.0.1-4-any.pkg.tar.xz.
-- Using cached msys-mingw-w64-x86_64-libtre-git-r128.6fb7206-2-any.pkg.tar.xz.
-- Using cached msys-mingw-w64-x86_64-openssl-1.1.1.m-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-ca-certificates-20210119-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-p11-kit-0.24.1-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-libtasn1-4.18.0-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-sqlite3-3.37.2-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-readline-8.1.001-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-termcap-1.3.1-6-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-tk-8.6.11.1-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-tcl-8.6.11-5-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-xz-5.2.5-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-gettext-0.21-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-gcc-libs-11.2.0-8-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-mpc-1.2.1-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-mpfr-4.1.0-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-gmp-6.2.1-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-expat-2.4.4-1-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-libffi-3.3-4-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-libiconv-1.16-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-zlib-1.2.11-9-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-x86_64-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at C:/XBruce/vcpkg/downloads/tools/msys2/70289b324bc026d6
-- Using cached tensorflow-tensorflow-v2.7.0.tar.gz.
-- Extracting source C:/XBruce/vcpkg/downloads/tensorflow-tensorflow-v2.7.0.tar.gz
-- Applying patch C:/XBruce/vcpkg/installed/x64-windows/share/tensorflow-common/fix-build-error.patch
-- Applying patch C:/XBruce/vcpkg/installed/x64-windows/share/tensorflow-common/change-macros-for-static-lib.patch
-- Applying patch C:/XBruce/vcpkg/installed/x64-windows/share/tensorflow-common/fix-windows-build.patch
-- Using source at C:/XBruce/vcpkg/buildtrees/tensorflow-cc/src/v2.7.0-ce8ac4fbce.clean
-- Configuring TensorFlow (dbg)
-- Warning: Building TensorFlow can take an hour or more.
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:129 (message):
    Command failed: C:/XBruce/vcpkg/downloads/tools/msys2/70289b324bc026d6/usr/bin/bash.exe --noprofile --norc -c "C:/XBruce/vcpkg/downloads/tools/bazel/4.2.2-windows/bazel.exe --output_user_root='C:/XBruce/vcpkg/buildtrees/tensorflow-cc/.bzl' --max_idle_secs=1 build -s --verbose_failures --compilation_mode=dbg --features=fastbuild --features=fully_static_link    --python_path='C:/XBruce/vcpkg/downloads/tools/msys2/70289b324bc026d6/mingw64/bin/python3.exe' --define=no_tensorflow_py_deps=true ///tensorflow:tensorflow_cc.dll ///tensorflow:install_headers"
    Working Directory: C:/XBruce/vcpkg/buildtrees/tensorflow-cc/x64-windows-dbg
    See logs for more information:
      C:\XBruce\vcpkg\buildtrees\tensorflow-cc\build-x64-windows-dbg-err.log

Call Stack (most recent call first):
  installed/x64-windows/share/tensorflow-common/tensorflow-common.cmake:274 (vcpkg_execute_build_process)
  ports/tensorflow-cc/portfile.cmake:9 (include)
  scripts/ports.cmake:146 (include)


error: building tensorflow-cc:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+tensorflow-cc
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[tensorflow-cc]+Build+error
Include '[tensorflow-cc] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
    vcpkg-scripts version: 6dfade46c 2022-06-13 (2 days ago)

build-x64-windows-dbg-err.log

-Attached is the build-x64-windows-dbg-err.log

Additional context
I wonder if vs2022 supports this package or not?
I also tried vs2019 still no luck.

@x-bruce
Copy link
Author

x-bruce commented Jun 16, 2022

@Cheney-W Could you help to figure it out? Thanks

@Cheney-W Cheney-W added the requires:repro The issue is not currently repro-able label Jun 16, 2022
@x-bruce
Copy link
Author

x-bruce commented Jun 16, 2022

Reproduce:

Install VS2022
Git clone and build vcpkg

Exec:
vcpkg install tensorflow-cc:x64-windows

My PC doesn't install cuda etc.

@Cheney-W
Copy link
Contributor

I can't reproduce this issue in my side, I got a different issue as below:
Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/43d6991c2a4cc2ac374e68c029634f2b59ffdfdf.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found

I used VS2022 17.2.4 and the latest vcpkg 2022-06-15-b0f08e40f8e8752dd0b260138ee078bd9599559c.
Also, I would link to know the mean of the build vcpkg you mentioned above, do you mean run .\bootstrap-vcpkg.bat and then automatically download vcpkg.exe?

I saw below error in your failure log:
OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\xbruce\\vcpkg\\buildtrees\\tensorflow-cc\\.bzl\\a3ieklvt\\external\\llvm-raw\\utils\\bazel\\llvm-project-overlay\\.bazelignore' -> 'C:\\xbruce\\vcpkg\\buildtrees\\tensorflow-cc\\.bzl\\a3ieklvt\\external\\llvm-project\\.bazelignore'
Maybe you could refer to this post:
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=785973

@x-bruce
Copy link
Author

x-bruce commented Jun 17, 2022

Also, I would link to know the mean of the build vcpkg you mentioned above, do you mean run .\bootstrap-vcpkg.bat and then automatically download vcpkg.exe?

Yeah, I git clone vcpkg. => run .\bootstrap-vcpkg.bat =>vcpkg install tensorflow-cc:x64-windows.
Is there anything wrong with my steps?

@x-bruce
Copy link
Author

x-bruce commented Jun 17, 2022

The error in my side was as follows

Auto-Configuration Error: Couldn't find undname.exe under C:\Program Files\Microsoft Visual Studio\2022\Community\VC, please check your VC installation and set BAZEL_VC environment variable correctly.

@Cheney-W
Copy link
Contributor

Yeah, I git clone vcpkg. => run .\bootstrap-vcpkg.bat =>vcpkg install tensorflow-cc:x64-windows.
Is there anything wrong with my steps?

NO, you are correct. I just see build vcpkg, vcpkg.exe no longer needs to be built locally, but is downloaded directly from the repository.
image

@x-bruce
Copy link
Author

x-bruce commented Jun 17, 2022

Yeah, I git clone vcpkg. => run .\bootstrap-vcpkg.bat =>vcpkg install tensorflow-cc:x64-windows.
Is there anything wrong with my steps?

NO, you are correct. I just see build vcpkg, vcpkg.exe no longer needs to be built locally, but is downloaded directly from the repository. image

Forgive my typo error.
I still have no luck in installing TensorFlow-cc successfully.

@x-bruce
Copy link
Author

x-bruce commented Jun 17, 2022

image

@x-bruce
Copy link
Author

x-bruce commented Jun 17, 2022

What should I do to let it find the undname.exe?

@Cheney-W Cheney-W added depends:upstream-changes Waiting on a change to the upstream project and removed requires:repro The issue is not currently repro-able labels Jun 20, 2022
@Cheney-W
Copy link
Contributor

Dup to #21246

@x-bruce
Copy link
Author

x-bruce commented Jun 21, 2022

Set VCPKG_VISUAL_STUDIO_PATH to vs2019 works for me.

BTW, how to specify the compile option of GPU/CPU?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends:upstream-changes Waiting on a change to the upstream project
Projects
None yet
Development

No branches or pull requests

2 participants