-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[halide:x64-linux] Cmake find_package fails - Libs installed to the wrong folder #19797
Comments
The problem is with
|
I wonder if the right solution is to make vcpkg/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake Lines 146 to 151 in 030cfaa
|
It's been a bit over a month... can I get some advice re: how to resolve this issue? I'm happy to put in the work on either the Halide port or on reworking |
IIUC the problem is not generally rewriting |
The comment refers to DLLs which are in |
@dg0yt - so is the resolution to use two different folders based on the platform, or would placing them somewhere like |
@alexreinking I can't say for sure for vcpkg. But you already pinged the vcpkg maintainers 9 hours ago so you let us wait for a response. |
I will take over this issue. |
root@usr:/home/usr/work/vcpkg# find packages/halide_x64-linux/tools/halide/
featurization_to_sample get_host_target retrain_cost_model weightsdir_to_weightsfile
root@usr:/home/usr/work/vcpkg# find packages/halide_x64-linux/share/ | xargs grep "featurization_to_sample"
grep: packages/halide_x64-linux/share/: Is a directory
grep: packages/halide_x64-linux/share/HalideHelpers: Is a directory
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:# Import target "Halide::featurization_to_sample" for configuration "Release"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_property(TARGET Halide::featurization_to_sample APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_target_properties(Halide::featurization_to_sample PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake: IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/tools/halide/featurization_to_sample"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::featurization_to_sample )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::featurization_to_sample "${_IMPORT_PREFIX}/tools/halide/featurization_to_sample" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:# Import target "Halide::featurization_to_sample" for configuration "Debug"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_property(TARGET Halide::featurization_to_sample APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_target_properties(Halide::featurization_to_sample PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake: IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/tools/halide/featurization_to_sample"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::featurization_to_sample )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::featurization_to_sample "${_IMPORT_PREFIX}/tools/halide/featurization_to_sample" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:foreach(_expectedTarget Halide::Tools Halide::ImageIO Halide::RunGenMain Halide::Runtime Halide::retrain_cost_model Halide::featurization_to_sample Halide::get_host_target Halide::weightsdir_to_weightsfile)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:# Create imported target Halide::featurization_to_sample
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:add_executable(Halide::featurization_to_sample IMPORTED)
grep: packages/halide_x64-linux/share/halide: Is a directory
grep: packages/halide_x64-linux/share/halide/tools: Is a directory
packages/halide_x64-linux/share/halide/tools/autotune_loop.sh: ${AUTOSCHED_BIN}/featurization_to_sample ${D}/${FNAME}.featurization $R $P $S ${D}/${FNAME}.sample || echo "featurization_to_sample failed for ${D} (probably because benchmarking failed)"
root@usr:/home/usr/work/vcpkg# find packages/halide_x64-linux/share/ | xargs grep "get_host_target"
grep: packages/halide_x64-linux/share/: Is a directory
grep: packages/halide_x64-linux/share/HalideHelpers: Is a directory
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:# Import target "Halide::get_host_target" for configuration "Release"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_property(TARGET Halide::get_host_target APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_target_properties(Halide::get_host_target PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake: IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/tools/halide/get_host_target"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::get_host_target )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::get_host_target "${_IMPORT_PREFIX}/tools/halide/get_host_target" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:# Import target "Halide::get_host_target" for configuration "Debug"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_property(TARGET Halide::get_host_target APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_target_properties(Halide::get_host_target PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake: IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/tools/halide/get_host_target"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::get_host_target )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::get_host_target "${_IMPORT_PREFIX}/tools/halide/get_host_target" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:foreach(_expectedTarget Halide::Tools Halide::ImageIO Halide::RunGenMain Halide::Runtime Halide::retrain_cost_model Halide::featurization_to_sample Halide::get_host_target Halide::weightsdir_to_weightsfile)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:# Create imported target Halide::get_host_target
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:add_executable(Halide::get_host_target IMPORTED)
grep: packages/halide_x64-linux/share/halide: Is a directory
grep: packages/halide_x64-linux/share/halide/tools: Is a directory
packages/halide_x64-linux/share/halide/tools/autotune_loop.sh:HL_TARGET=`${AUTOSCHED_BIN}/get_host_target avx512 avx512_knl avx512_skylake avx512_cannonlake`
root@usr:/home/usr/work/vcpkg# find packages/halide_x64-linux/share/ | xargs grep "retrain_cost_model"
grep: packages/halide_x64-linux/share/: Is a directory
grep: packages/halide_x64-linux/share/HalideHelpers: Is a directory
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:# Import target "Halide::retrain_cost_model" for configuration "Release"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_property(TARGET Halide::retrain_cost_model APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_target_properties(Halide::retrain_cost_model PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake: IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/tools/halide/retrain_cost_model"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::retrain_cost_model )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::retrain_cost_model "${_IMPORT_PREFIX}/tools/halide/retrain_cost_model" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:# Import target "Halide::retrain_cost_model" for configuration "Debug"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_property(TARGET Halide::retrain_cost_model APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_target_properties(Halide::retrain_cost_model PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake: IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/tools/halide/retrain_cost_model"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::retrain_cost_model )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::retrain_cost_model "${_IMPORT_PREFIX}/tools/halide/retrain_cost_model" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:foreach(_expectedTarget Halide::Tools Halide::ImageIO Halide::RunGenMain Halide::Runtime Halide::retrain_cost_model Halide::featurization_to_sample Halide::get_host_target Halide::weightsdir_to_weightsfile)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:# Create imported target Halide::retrain_cost_model
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:add_executable(Halide::retrain_cost_model IMPORTED)
grep: packages/halide_x64-linux/share/halide: Is a directory
grep: packages/halide_x64-linux/share/halide/tools: Is a directory
packages/halide_x64-linux/share/halide/tools/autotune_loop.sh: ${AUTOSCHED_BIN}/retrain_cost_model \
root@usr:/home/usr/work/vcpkg# find packages/halide_x64-linux/share/ | xargs grep "weightsdir_to_weightsfile"
grep: packages/halide_x64-linux/share/: Is a directory
grep: packages/halide_x64-linux/share/HalideHelpers: Is a directory
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:# Import target "Halide::weightsdir_to_weightsfile" for configuration "Release"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_property(TARGET Halide::weightsdir_to_weightsfile APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:set_target_properties(Halide::weightsdir_to_weightsfile PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake: IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/tools/halide/weightsdir_to_weightsfile"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::weightsdir_to_weightsfile )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-release.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::weightsdir_to_weightsfile "${_IMPORT_PREFIX}/tools/halide/weightsdir_to_weightsfile" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:# Import target "Halide::weightsdir_to_weightsfile" for configuration "Debug"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_property(TARGET Halide::weightsdir_to_weightsfile APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:set_target_properties(Halide::weightsdir_to_weightsfile PROPERTIES
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake: IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/tools/halide/weightsdir_to_weightsfile"
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_TARGETS Halide::weightsdir_to_weightsfile )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces-debug.cmake:list(APPEND _IMPORT_CHECK_FILES_FOR_Halide::weightsdir_to_weightsfile "${_IMPORT_PREFIX}/tools/halide/weightsdir_to_weightsfile" )
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:foreach(_expectedTarget Halide::Tools Halide::ImageIO Halide::RunGenMain Halide::Runtime Halide::retrain_cost_model Halide::featurization_to_sample Halide::get_host_target Halide::weightsdir_to_weightsfile)
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:# Create imported target Halide::weightsdir_to_weightsfile
packages/halide_x64-linux/share/HalideHelpers/Halide-Interfaces.cmake:add_executable(Halide::weightsdir_to_weightsfile IMPORTED)
grep: packages/halide_x64-linux/share/halide: Is a directory
grep: packages/halide_x64-linux/share/halide/tools: Is a directory
root@usr:/home/usr/work/vcpkg# Is there anything I missed? |
@JackBoosY The question was about finding the autoscheduler library (probably module/plugin), and about the rewriting done by vcpkg_cmake_config_fixup for this library. It is not about a particular tool. |
In windows:
In non-Windows:
The module file should be placed in share (called by the library) or placed in tools/${PORT} (called by the tool). |
Unfortunately I don't think we have solid advice to give here; plugins are still very exceptional and vcpkg still does not have a fully-supported model for shared libraries on Linux due to many of these troubles. I can at least factually note that:
I think using |
But will this not trip a check for port validity? IIRC the reason they were moved to |
@JackBoosY - it looks like the Halide port is going to be updated in #20749... it would be nice to get this fixed at the same time. What is the agreed-upon resolution? Re-add @ras0219-msft - does that sound reasonable? ATTN @yurybura |
@JackBoosY any updates here? This is also causing #22228 which makes automating things downstream with the package impossible. |
I'm not sure about that. |
This issue should be fixed by #23035. Please ping me to reopen this issue if it still bother you. |
Host Environment
To Reproduce
Steps to reproduce the behavior:
$ ./vcpkg install Halide:x64-linux
use cmake code in a project:
@gebdadendo -- Please @ me in that issue as it's my responsibility to fix
Originally posted by @alexreinking in #19635 (comment)
The text was updated successfully, but these errors were encountered: