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

[libtorch] Build error on x64-windows #39646

Open
hylreg opened this issue Jul 2, 2024 · 1 comment
Open

[libtorch] Build error on x64-windows #39646

hylreg opened this issue Jul 2, 2024 · 1 comment
Assignees
Labels
category:question This issue is a question

Comments

@hylreg
Copy link

hylreg commented Jul 2, 2024

Package: libtorch[core,cuda,fftw3,opencv,xnnpack,zstd]:[email protected]#2

Host Environment

  • Host: x64-windows
  • Compiler: MSVC 19.40.33811.0
  • vcpkg-tool version: 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457
    vcpkg-scripts version: eb0f108 2024-06-11 (3 weeks ago)

To Reproduce

vcpkg install libtorch

Failure logs

-- Using cached pytorch-pytorch-v2.1.2.tar.gz.
-- Cleaning sources at D:/Libraries/vcpkg/buildtrees/libtorch/src/v2.1.2-24eddfee65.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Libraries/vcpkg/downloads/pytorch-pytorch-v2.1.2.tar.gz
-- Applying patch cmake-fixes.patch
-- Applying patch more-fixes.patch
-- Applying patch fix-build.patch
-- Applying patch clang-cl.patch
-- Applying patch cuda-adjustments.patch
-- Applying patch fix-api-export.patch
-- Applying patch fix-onnx-case.patch
-- Applying patch fxdiv.patch
-- Applying patch protoc.patch
-- Applying patch fix-sleef.patch
-- Applying patch fix-glog.patch
-- Applying patch fix-msvc-ICE.patch
-- Applying patch fix-calculate-minloglevel.patch
-- Applying patch force-cuda-include.patch
-- Using source at D:/Libraries/vcpkg/buildtrees/libtorch/src/v2.1.2-24eddfee65.clean
-- Using cached pytorch-kineto-49e854d805d916b2031e337763928d2f8d2e1fbf.tar.gz.
-- Cleaning sources at D:/Libraries/vcpkg/buildtrees/libtorch/src/2f8d2e1fbf-de7a6d4b27.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Libraries/vcpkg/downloads/pytorch-kineto-49e854d805d916b2031e337763928d2f8d2e1fbf.tar.gz
-- Applying patch kineto.patch
-- Using source at D:/Libraries/vcpkg/buildtrees/libtorch/src/2f8d2e1fbf-de7a6d4b27.clean
-- Using cached NVIDIA-cudnn-frontend-12f35fa2be5994c1106367cac2fba21457b064f4.tar.gz.
-- Cleaning sources at D:/Libraries/vcpkg/buildtrees/libtorch/src/1457b064f4-11f2c20faf.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Libraries/vcpkg/downloads/NVIDIA-cudnn-frontend-12f35fa2be5994c1106367cac2fba21457b064f4.tar.gz
-- Using source at D:/Libraries/vcpkg/buildtrees/libtorch/src/1457b064f4-11f2c20faf.clean
-- Using cached NVIDIA-cutlass-6f47420213f757831fae65c686aa471749fa8d60.tar.gz.
-- Cleaning sources at D:/Libraries/vcpkg/buildtrees/libtorch/src/1749fa8d60-777f8079ff.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Libraries/vcpkg/downloads/NVIDIA-cutlass-6f47420213f757831fae65c686aa471749fa8d60.tar.gz
-- Using source at D:/Libraries/vcpkg/buildtrees/libtorch/src/1749fa8d60-777f8079ff.clean
-- Using flatc: D:/Libraries/vcpkg/installed/x64-windows/tools/flatbuffers/flatc.exe
-- Using protoc: D:/Libraries/vcpkg/installed/x64-windows/tools/protobuf/protoc.exe
-- Using cached pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz.
-- Cleaning sources at D:/Libraries/vcpkg/buildtrees/libtorch/src/8854625dd8-861bd167bd.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Libraries/vcpkg/downloads/pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz
-- Using source at D:/Libraries/vcpkg/buildtrees/libtorch/src/8854625dd8-861bd167bd.clean
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: D:/Libraries/vcpkg/downloads/tools/python/python-3.11.8-x64/python.exe D:/Libraries/vcpkg/buildtrees/libtorch/src/8854625dd8-861bd167bd.clean/public/get-pip.py --no-warn-script-location
    Working Directory: D:/Libraries/vcpkg/buildtrees/libtorch
    Error code: 1
    See logs for more information:
      D:\Libraries\vcpkg\buildtrees\libtorch\get-pip-x64-windows-err.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-get-python-packages/x_vcpkg_get_python_packages.cmake:48 (vcpkg_execute_required_process)
  ports/libtorch/portfile.cmake:77 (x_vcpkg_get_python_packages)
  scripts/ports.cmake:175 (include)



D:\Libraries\vcpkg\buildtrees\libtorch\get-pip-x64-windows-err.log
Traceback (most recent call last):
  File "D:\Libraries\vcpkg\buildtrees\libtorch\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 33324, in <module>
    main()
  File "D:\Libraries\vcpkg\buildtrees\libtorch\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 135, in main
    bootstrap(tmpdir=tmpdir)
  File "D:\Libraries\vcpkg\buildtrees\libtorch\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 111, in bootstrap
    monkeypatch_for_cert(tmpdir)
  File "D:\Libraries\vcpkg\buildtrees\libtorch\src\8854625dd8-861bd167bd.clean\public\get-pip.py", line 92, in monkeypatch_for_cert
    from pip._internal.commands.install import InstallCommand
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\commands\__init__.py", line 9, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\cli\base_command.py", line 15, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\cli\cmdoptions.py", line 23, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\cli\parser.py", line 12, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\configuration.py", line 24, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_internal\utils\appdirs.py", line 13, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_vendor\platformdirs\__init__.py", line 33, in <module>
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_vendor\platformdirs\__init__.py", line 29, in _set_platform_dir_class
  File "importlib\__init__.py", line 126, in import_module
  File "C:\Users\hylre\AppData\Local\Temp\tmplt4g86k2\pip.zip\pip\_vendor\platformdirs\windows.py", line 3, in <module>
  File "ctypes\__init__.py", line 8, in <module>
ImportError: DLL load failed while importing _ctypes: �Ҳ���ָ����ģ�顣
@FrankXie05 FrankXie05 added the category:question This issue is a question label Jul 2, 2024
@FrankXie05
Copy link
Contributor

@hylreg Thanks for psoting this issue, this error has been fixed by PR #35990, could you please use the latest vcpkg and try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants