Closed sykhro closed 1 year ago
Hi @sykhro
Thanks for your report.
First, I'd suggest to update to 2.0.6, that comes with some bugfixes.
Then, I am trying to isolate this, tried (it seems the one at fault is the "headers", not the "loader"):
conan install --requires=vulkan-headers/1.3.243.0 --deployer=full_deploy -g CMakeDeps
But then I inspect the generated Vulkan....-data.cmake
and it seems the paths are correct there, pointing to the deployed copy:
set(vulkan-headers_PACKAGE_FOLDER_RELEASE "${CMAKE_CURRENT_LIST_DIR}/full_deploy/host/vulkan-headers/1.3.243.0")
set(vulkan-headers_BUILD_MODULES_PATHS_RELEASE )
set(vulkan-headers_INCLUDE_DIRS_RELEASE "${vulkan-headers_PACKAGE_FOLDER_RELEASE}/res/vulkan/registry"
"${vulkan-headers_PACKAGE_FOLDER_RELEASE}/include")
set(vulkan-headers_RES_DIRS_RELEASE "${vulkan-headers_PACKAGE_FOLDER_RELEASE}/res")
Can you please share with me some more details to reproduce it? Thanks!
conan install --requires=vulkan-headers/1.3.243.0 --deployer=full_deploy -g CMakeDeps
Thanks for the quick reply! Sorry, I'm actually on 2.0.6, I tried updating before clicking "open issue" and forgot to update the post.
If I run
conan install --requires=vulkan-loader/1.3.239.0 --deployer=full_deploy -g CMakeDeps --build=missing
and look at module-Vulkan-release-x86_64-data.cmake
:
set(vulkan-loader_PACKAGE_FOLDER_RELEASE "${CMAKE_CURRENT_LIST_DIR}/full_deploy/host/vulkan-loader/1.3.239.0/Release/x86_64")
set(vulkan-loader_BUILD_MODULES_PATHS_RELEASE )
set(vulkan-loader_INCLUDE_DIRS_RELEASE "${vulkan-loader_PACKAGE_FOLDER_RELEASE}/../../../vulka0e9c2dc266fb1/p/res/vulkan/registry"
"${vulkan-loader_PACKAGE_FOLDER_RELEASE}/../../../vulka0e9c2dc266fb1/p/include")
Could be the specific version of the package, I am not even getting that module....cmake
file, let me try
No, I don't get generated the module-Vulkan
file, even for that version, only the Vulkan-Headers...config.cmake
file, that is weird.
Also, it is not only the resdirs
, it seems also the includedirs
is the same.
Maybe it could be related to having things in different units, Windows is bad because it doesn't allow to compute relative paths from one unit to another, maybe sharing the full logs and the location of your cache and your deployed folder.
Maybe it could be related to having things in different units, Windows is bad because it doesn't allow to compute relative paths from one unit to another, maybe sharing the full logs and the location of your cache and your deployed folder.
My cache is in the standard path C:/Users/user/.conan2
, the deployed folder is C:/source/e
.
Let me know if there's a way to provide a more detailed log, this is all I'm getting on -vtrace
.
I'm getting it with vulkan-loader
, which requires res
from vulkan-headers
conan install --requires=vulkan-loader/1.3.239.0 --deployer=full_deploy -g CMakeDeps --build =missing
I'm getting the same on conan 2.0.6
, macOS 13.3.1(a)
(freshly installed just for this test).
In module-Vulkan-release-armv8-data.cmake
, I can see the following:
set(vulkan-loader_INCLUDE_DIRS_RELEASE "${vulkan-loader_PACKAGE_FOLDER_RELEASE}/../../../vulka0e9c2dc266fb1/p/res/vulkan/registry"
"${vulkan-loader_PACKAGE_FOLDER_RELEASE}/../../../vulka0e9c2dc266fb1/p/include")
I am struggling to see why the module-xxxx.cmake
file is being generated. Maybe some of these hints?
revision
from ConanCenter repo?module-xxx.cmake
file?xxxx-Config.cmake
or xxx-config.cmake
files being generated too? In case they are, could you please also check their contents and share it?
Thanks!I am struggling to see why the
module-xxxx.cmake
file is being generated. Maybe some of these hints?
I often see those files. Are they not supposed to be there?
Are you using the latest revision from ConanCenter repo? Is it possible that someone is doing some changes, or forcing the generation of the module-xxx.cmake file?
No, I can reproduce this on a clean install on macOS with no changes whatsoever:
Local Cache
vulkan-loader
vulkan-loader/1.3.239.0
revisions
9599fdff19ef2e78223bdd9b63e730ac (2023-05-04 13:23:56 UTC)
packages
28d4f40e639470e6bc87a1e602c96822f089b66d
info
settings
arch: armv8
build_type: Release
compiler: apple-clang
compiler.version: 14
os: Macos
options
shared: True
requires
vulkan-headers/1.3.239.0#3f678623fcd7aa3a39015b5770f4f31d:da39a3ee5e6b4b0d3255bfef95601890afd80709
installed with conan install --requires=vulkan-loader/1.3.239.0 --deployer=full_deploy -g CMakeDeps --build =missing
Are the xxxx-Config.cmake or xxx-config.cmake files being generated too? In case they are, could you please also check their contents and share it?
Yes, same issue. Here's the whole folder. vulkan-loader_test.zip
Cheers!
Thanks for the repro!
I think I have found the root cause.
It doesn't seem a Conan client issue (it would be a general problem, more evident and would have hit more people), but it is very specific to the vulkan-loader
recipe (if you try to use vulkan-headers
only, it doesn't happen, which was weird) that contains:
def package_info():
...
self.cpp_info.includedirs = self.dependencies["vulkan-headers"].cpp_info.aggregated_components().includedirs
That call to aggregated_components
shouldn't be done, that is not documented, public API, and seems to be affecting the state of the cpp_info
of the dependencies. I will investigate further.
Thank you! I'll fork the recipe locally, if I end up with something that works well I'll send a PR to CCI
I am submitting a PR for Conan 2.0.7 in https://github.com/conan-io/conan/pull/14060 that avoids the root cause, which is caching of the aggregated_components()
, to avoid this potential issues. Even if it seems the recipe can be simplified, it is better to be robust against these kind of code (at the cost of some performance, but lets be robust first, performant later)
Thanks very much to you for raising this issue and all the feedback to help!
Environment details
Steps to reproduce
See this comment for an example command that causes the issue.
vulkan-loader
&vulkan-headers
to some output directory using thefull_deploy
deployerfind_package(Vulkan)
Observe that the imported target for
Vulkan::Vulkan
has a path which is relative to the Conan cache and not the deploy folderLogs
No response