Closed lambtonr closed 1 month ago
Hi @lambtonr
Thanks for your feedback.
I am trying to understand your setup, but I am afraid that I am missing some details.
It is not very clear how the cmake-conan
is playing together with the rest, specially because I see that you are also running conan install
too. If it is possible, I'd like to leave cmake-conan
out of the issue, and it would be better to replicate the issue with conan install
+ cmake --presets
commands instead.
For example, the final cmake --build --prefix conan-release
is difficult to understand, because if using the cmake-conan
, then the Conan presets cannot be used, because they are generated after Conan is invoked, but if using cmake-conan
, this happens inside CMake, so not possible.
Then, there are some details that are not clear for example the first: conan install .
it is not clear in which folder this is happening, in the say
package, in the image
package, in neither of those? If it is done in another place, what is the conanfile
that is at that place?
Hi @memsharded
Thanks for your reply, i completely forgot this library was using cmake-conan
, i disable this the editable package work as per the example.
Im not sure if this is the best place to ask this:
Now that i have the this working i have tracked down the issue to the fact the library is built with set_target_properties(image PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
. I thought setting the same property for the test_package
executable, but this didnt work. I couldn't find any exampled in conan-center-index
libraries that use CUDA_SEPARABLE_COMPILATION
.
This issue only occurs for shared=False
builds, and only when using the library via conan, If i use 'FetchContent_Declare' to use the library it links correctly.
/usr/bin/ld: /home/rossl/.conan2/p/b/imagea593a088b474b/p/lib/libimage.a(Filter-Blur-CUDA.cu.o): in function `__sti____cudaRegisterAll()':
tmpxft_0015c8dc_00000000-6_Filter-Blur-CUDA.cudafe1.cpp:(.text.startup+0x21): undefined reference to `__cudaRegisterLinkedBinary_4a7417d2_19_Filter_Blur_CUDA_cu_bbd7f375'
...
I dont think this is a conan issue, just not sure how to propagate this correctly for consumers.
Many Thanks
I will close this issue as the problem i originally raised is resolved.
Thanks for the feedback and following up.
I think it might be worth creating a new ticket to check the PROPERTIES CUDA_SEPARABLE_COMPILATION ON
. Indeed Conan does not have any explicit model for Cuda yet, but we are also interested in learning and improving the integrations whenever possible, so we would be interested in any feedback. As commented above the best is small reproducible projects, like starting with a simple conan new cmake_lib
, tuning it with the minimal changes, then sharing it (in a zip, or in a Github repo).
What is your question?
Hi,
I am trying to diagnose a problem with my conan recipe / project cmake. The recipe was originally a out of source recipe and working for default build but wont link to CUDA when using 'with_cuda" option.
To try and debug this i have moved the recipe to be an in source recipe, and was trying to use the conan editable tutorial from here: https://github.com/conan-io/examples2/tree/main/tutorial/developing_packages/editable_packages
However when i do cmake --build --prefix conan-release i get the following:
it seems like CMakeUserPresets.json contains the following includes:
i also end up with the duplicate generators seen here under my /build/Release/ directory:
If i remove the "build/Release/conan/build/Release/generators/CMakePresets.json" include i can run the build and it works.
In addition to the editable package issue, when i try and use the editable package i get the following:
Many Thanks
Have you read the CONTRIBUTING guide?