Skip to content

[CMake+Vcpkg] Could NOT find Python (missing: Python_LIBRARIES Development Development.Module Development.Embed) (found version "3.11.8") #3405

@s-dakshin

Description

@s-dakshin

Description of Issue

Facing issue when building USD with Python tools on Windows 10, the same build seems to pass through on Windows 11. Getting USD through Vcpkg and building it using CMake for C++ project.

config-x64-windows-vs2022-out.log

FAILED: ../CMakeCache.txt 
"C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/bin/cmake.exe" -E chdir ".." "C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/bin/cmake.exe" "C:/Jenk/workspace/vcpkg_4e08971/buildtrees/usd/src/v23.05-aec4b32f39.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/Jenk/workspace/vcpkg_4e08971/packages/usd_x64-windows-vs2022" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DPXR_BUILD_ALEMBIC_PLUGIN:BOOL=OFF" "-DPXR_BUILD_EMBREE_PLUGIN:BOOL=OFF" "-DPXR_BUILD_IMAGING:BOOL=OFF" "-DPXR_BUILD_MONOLITHIC:BOOL=OFF" "-DPXR_BUILD_TESTS:BOOL=OFF" "-DPXR_BUILD_USD_IMAGING:BOOL=OFF" "-DPXR_BUILD_EXAMPLES:BOOL=OFF" "-DPXR_BUILD_TUTORIALS:BOOL=OFF" "-DPXR_ENABLE_PYTHON_SUPPORT:BOOL=ON" "-DPXR_BUILD_USD_TOOLS:BOOL=ON" "-DCMAKE_MAKE_PROGRAM=C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/ninja/1.10.2-windows/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/Jenk/workspace/vcpkg_4e08971/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-vs2022" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/Jenk/workspace/vcpkg_4e08971/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/Jenk/workspace/vcpkg_4e08971" "-D_VCPKG_INSTALLED_DIR=C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.36.32538.0
-- The CXX compiler identification is MSVC 19.36.32538.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting PXR_BUILD_USDVIEW=OFF because PXR_BUILD_USD_IMAGING=OFF
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found Boost: C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost/BoostConfig.cmake (found version "1.85.0")
-- Found Python3: C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/tools/python3/python.exe (found version "3.11.8") found components: Interpreter Development Development.Module Development.Embed
CMake Error at C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python (missing: Python_LIBRARIES Development
  Development.Module Development.Embed) (found version "3.11.8")
Call Stack (most recent call first):
  C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/FindPython.cmake:616 (find_package_handle_standard_args)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/python/vcpkg-cmake-wrapper.cmake:67 (_find_package)
  C:/Jenk/workspace/vcpkg_4e08971/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost_python311/boost_python311-config.cmake:68 (find_dependency)
  C:/Jenk/workspace/vcpkg_4e08971/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost/BoostConfig.cmake:67 (find_package)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost/BoostConfig.cmake:128 (boostcfg_find_component)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
  C:/Jenk/workspace/vcpkg_4e08971/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/FindBoost.cmake:594 (find_package)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
  C:/Jenk/workspace/vcpkg_4e08971/scripts/buildsystems/vcpkg.cmake:813 (include)
  cmake/defaults/Packages.cmake:132 (find_package)
  CMakeLists.txt:23 (include)


-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.

vcpkg command log -

C:\Jenk\workspace\vcpkg_4e08971>.\vcpkg install --x-manifest-root=C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes --x-install-root=C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed --triplet=x64-windows-vs2022 --host-triplet=x64-windows-vs2022
Loading dependency information for 122 packages...
Detecting compiler hash for triplet x64-windows-vs2022...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
The following packages will be built and installed:
    usd:[email protected]#5 -- C:\Jenk\workspace\e_GHE_sd_USDSILTesting_WithFixes\./External/vcpkgOverlay/ports\usd
Restored 0 package(s) from C:\Users\batserve\AppData\Local\vcpkg\archives in 134 us. Use --debug to see more details.
Installing 1/1 usd:[email protected]#5...
Building usd:[email protected]#5...
C:\Jenk\workspace\e_GHE_sd_USDSILTesting_WithFixes\External\vcpkgOverlay\triplets\x64-windows-vs2022.cmake: info: loaded overlay triplet from here
C:\Jenk\workspace\e_GHE_sd_USDSILTesting_WithFixes\./External/vcpkgOverlay/ports\usd: info: installing overlay port from here
-- The usd port does not work with the version of Threading Building Blocks (tbb) currently chosen by vcpkg's baselines,
and does not expect to be updated to work with current versions soon. See
https://github.com/PixarAnimationStudios/USD/issues/1600

If you must use this port in your project, pin a version of tbb of 2020_U3 or older via a manifest file.
See https://vcpkg.io/en/docs/examples/versioning.getting-started.html for instructions.

-- Using cached PixarAnimationStudios-OpenUSD-v23.05.tar.gz.
-- Cleaning sources at C:/Jenk/workspace/vcpkg_4e08971/buildtrees/usd/src/v23.05-aec4b32f39.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Jenk/workspace/vcpkg_4e08971/downloads/PixarAnimationStudios-OpenUSD-v23.05.tar.gz
-- Applying patch fix_build-location.patch
-- Applying patch enable_if_fix.patch
-- Using source at C:/Jenk/workspace/vcpkg_4e08971/buildtrees/usd/src/v23.05-aec4b32f39.clean
-- Configuring x64-windows-vs2022
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: C:/Jenk/workspace/vcpkg_4e08971/downloads/tools/ninja/1.10.2-windows/ninja.exe -v
    Working Directory: C:/Jenk/workspace/vcpkg_4e08971/buildtrees/usd/x64-windows-vs2022-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      C:\Jenk\workspace\vcpkg_4e08971\buildtrees\usd\config-x64-windows-vs2022-rel-CMakeCache.txt.log
      C:\Jenk\workspace\vcpkg_4e08971\buildtrees\usd\config-x64-windows-vs2022-rel-CMakeConfigureLog.yaml.log
      C:\Jenk\workspace\vcpkg_4e08971\buildtrees\usd\config-x64-windows-vs2022-out.log

Call Stack (most recent call first):
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/_build/vcpkg_installed/x64-windows-vs2022/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:269 (vcpkg_execute_required_process)
  C:/Jenk/workspace/e_GHE_sd_USDSILTesting_WithFixes/External/vcpkgOverlay/ports/usd/portfile.cmake:57 (vcpkg_cmake_configure)
  scripts/ports.cmake:192 (include)


error: building usd:x64-windows-vs2022 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 usd:x64-windows-vs2022: 16 s
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+usd
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[usd]+Build+error+on+x64-windows-vs2022&body=Copy+issue+body+from+C%3A%2FJenk%2Fworkspace%2Fe_GHE_sd_USDSILTesting_WithFixes%2F_build%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

Steps to Reproduce

  1. Get USD through vcpkg in manifest mode
  2. Turn on -DPXR_ENABLE_PYTHON_SUPPORT:BOOL=ON and -DPXR_BUILD_USD_TOOLS:BOOL=ON
  3. Build using CMake

System Information (OS, Hardware)

OS - Windows 10, x64, MINGW

Package Versions

vcpkg package management program version 2024-08-01-fd884a0d390d12783076341bd43d77c3a6a15658
Cmake - 3.29.2
Triplet x64-windows-vs2022...
Compiler found - 14.36.32532/bin/Hostx64/x64/cl.exe
USD version - usd:[email protected]#5

Build Flags

-DPXR_ENABLE_PYTHON_SUPPORT:BOOL=ON and -DPXR_BUILD_USD_TOOLS:BOOL=ON

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild-related issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions