vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[vcpkg-tool] CMake dep info run has TARGET_TRIPLET not defined.

Open Neumann-A opened this issue 1 year ago • 10 comments

Computing installation plan...
command:
"E:\vcpkg_cache\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386/bin/cmake.exe" -DVCPKG_ROOT_DIR=D:/vcpkg_folders/no_msvc -DPACKAGES_DIR=D:/vcpkg_folders/no_msvc/packages -DBUILDTREES_DIR=D:/vcpkg_folders/no_msvc/buildtrees -D_VCPKG_INSTALLED_DIR=D:/vcpkg_folders/no_msvc/installed -DDOWNLOADS=E:/vcpkg_cache/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "D:\vcpkg_folders\no_msvc\buildtrees\0.vcpkg_dep_info.cmake"
failed with the following output:
d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af, Loading Intel environment ...., CMake Error at triplets/x64-win-msvc/port-customization/lapack-reference.cmake:4 (include):,   include could not find requested file:, ,     D:/vcpkg_folders/no_msvc/installed//share/intel-hpc/intel-msvc-env.cmake, Call Stack (most recent call first):,   triplets/x64-win-msvc.cmake:29 (include),   buildtrees/0.vcpkg_dep_info.cmake:8 (include),   buildtrees/0.vcpkg_dep_info.cmake:19 (vcpkg_triplet_file),   buildtrees/0.vcpkg_dep_info.cmake:37 (vcpkg_get_dep_info), ,

Is missing TARGET_TRIPLET which is why the paths are all jumbled up. I currently work around that by using:

set(DEP_INFO_RUN OFF)
if(NOT (DEFINED CURRENT_PORT_DIR AND
   DEFINED CURRENT_PACKAGES_DIR AND
   DEFINED CURRENT_BUILDTREES_DIR AND
   DEFINED TARGET_TRIPLET AND
   DEFINED TARGET_TRIPLET_FILE AND
   DEFINED VCPKG_BASE_VERSION AND
   DEFINED VCPKG_MANIFEST_INSTALL AND
   DEFINED CMD))
  set(DEP_INFO_RUN ON)
endif()

and detecting if i can use TARGET_TRIPLET or not. I could infer the TARGET_TRIPLET as the filename of CMAKE_CURRENT_LIST_FILE but I don't know if vcpkg expands that variable. It would be easier to just pass TARGET_TRIPLET in the context correctly (or add it to the extraction).

Neumann-A avatar Nov 17 '24 23:11 Neumann-A

@BillyONeal Could you please help look into this issue.

MonicaLiu0311 avatar Nov 19 '24 10:11 MonicaLiu0311

@MonicaLiu0311 Unfortunately I don't truly understand what this is asking for.

BillyONeal avatar Nov 19 '24 18:11 BillyONeal

what this is asking for.

-DTARGET_TRIPLET=<triplet> or set(TARGET_TRIPLET <triplet>)

depending on what is appropriate if my triplet code is run as part of

buildtrees/0.vcpkg_dep_info.cmake:37 (vcpkg_get_dep_info),

Neumann-A avatar Nov 19 '24 19:11 Neumann-A

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Dec 18 '24 02:12 github-actions[bot]

Still relevant

Neumann-A avatar Dec 18 '24 15:12 Neumann-A

what this is asking for.

-DTARGET_TRIPLET=<triplet> or set(TARGET_TRIPLET <triplet>)

depending on what is appropriate if my triplet code is run as part of

buildtrees/0.vcpkg_dep_info.cmake:37 (vcpkg_get_dep_info),

To what end? I'm not seeing how this is customer visible.

BillyONeal avatar Dec 18 '24 19:12 BillyONeal

To what end? I'm not seeing how this is customer visible.

This is customer visible since it is not unset before you touch anything customer related like portfile.cmake or <TRIPLET>.cmake. Furthermore, TARGET_TRIPLET is indirectly visible from CURRENT_INSTALLED_DIR and CURRENT_PACKAGES_DIR which are both not visible in the dep info run.

If you don't want those to be visible ports.cmake needs to be changed.

Neumann-A avatar Dec 19 '24 07:12 Neumann-A

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Jan 17 '25 01:01 github-actions[bot]

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Dec 03 '25 02:12 github-actions[bot]

Sorry, let me re-ask my question in a hopefully better way. I don't mean 'how can a customer tell that it was set', I mean 'what are you doing with this value to show that it always needs to be set'. The only user provided code during the initial 'dep info vars' scan intended to run appears to be the triplet itself, and the triplet should know what it wants.

Or put another another way, I need a test case that changing this behavior would make pass.

BillyONeal avatar Dec 05 '25 01:12 BillyONeal