-
Notifications
You must be signed in to change notification settings - Fork 109
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
Conan package issues #91
Comments
Hi! I remember a related discussion going about this at https://github.com/conan-io/conan-center-index/pull/283/files#r342450828 but I'm not sure if we concluded it properly before merging (I admit I might have not paid attention at the end, as the discussion was going on quite a long time). Yes, the Cc: @Croydon |
@helmesjo do you know what should be added where to fix this (or, ideally, could you provide a patch)? I looked at the |
Sorry, missed this! Actually, the recipe seams to be correct, but the prebuilt package ( I cloned this repo, ran @Croydon Maybe you can help with this? :) |
The recipe in conan-center has this: https://github.com/conan-io/conan-center-index/blob/0ae829a362c1cc6a20d97e023ca0aafc805797c3/recipes/corrade/all/conanfile.py#L110 tools.rmdir(os.path.join(self.package_folder, 'share')) so I think that's why, and the bundled |
We can add the @helmesjo Could you test it with the magnum package if I edit the Corrade recipe respectively? I have currently way too much on my plate unfortunately |
@mosra Am I getting it right that the |
I think I just run into an issue related to mosra/magnum#354 where the |
Ha! You have a new avatar :D Anyway:
mosra/magnum#354 is unrelated to this, it happened only due to an outdated |
@mosra
@Croydon |
The PR is ready, please have a look here: conan-io/conan-center-index#1335 |
Answered in the PR. All works as expected! |
Thank you both 😊 Anything left to be done from my side? |
No, for now it should be fine Until next time 👋 😄 |
@Croydon Just a quick question. What packages are automatically built for Windows on conan-center?
|
https://github.com/conan-io/conan-center-index/wiki/Supported-Platforms-And-Configurations Have you set a non-default option value? |
Not from the looks of it, no... It seems to be the same as I'm requesting: Mine:
Corrade defaults:
|
@mosra Is above actually true, that these are detected (and set?) automatically? While waiting for prebuilt binaries I change my windows builds to build missing dependencies, and get the following error (and equivalent for VS2017) when it builds corrade:
Could they be set automatically? Or should something be changed in the corrade recipe? Edit |
I have the same problem |
Honestly, why is Conan such an endless source of trouble all the time? I don't remember any other packaging system requiring such an extreme maintenance effort, even vcpkg mostly just works, and over the years all other packages combined required maybe 10% of effort that has been put into Conan so far. All these issues are only because Conan replaces/reinvents/rewrites the buildsystem that "just worked" for nearly a decade. I'm getting tired of spending extra time repeatedly explaining and defending all buildsystem decisions I ever did only to have them replicated in an incomplete way in Conan.
I have a quite extreme CI setup plus a lot of day-to-day users on MSVC that would be affected. I don't remember any issues (other than quickly resolved user errors) related to this since 2015, so I'd say yes it's true. Pretty sure I already explained this in one of the 100-message threads about Conan, but let's go over it again once more:
Because Conan threw away all that's in corrade/modules/FindCorrade.cmake Lines 300 to 331 in a119b35
The same needs to be done for Magnum, where the set of such flags is even larger. |
This comment has been minimized.
This comment has been minimized.
@Croydon see above. These flags are not meant to be passed to CMake other than when building Corrade itself, when using it the flags are meant to be extracted from There being a prefixed and unprefixed version is orthogonal to this and while specifying the prefixed version also seemingly makes this issue go away, it's not a proper fix. |
@Croydon |
I made a PR. Built it locally and modified conan-magnum to reference the locally built package and that also built correctly, and test_package passed (had to add |
Note regarding the I got this again (in my dependent project) after updating magnum to 2020.06 (local build), and overall it seams to be a recurring issue. BUT, it works (my project which uses a bunch of Magnum stuff) if I remove this line in the corrade recipe (that is, not packaging SO, correct me if I'm wrong @mosra but I understand that |
Yes, again, this needs to be fixed by extracting the flags out of
No, you got it backwards -- UseCorrade is full of functions and macros that are useful for CMake consumers (test setup, plugin compilation, useful compiler flags etc). For non-CMake consumers it has no use. |
Alright, so after a few hours spent here and there, I hopefully got it figured out. The corrade recipe now exposes the It also correctly sets the CMake defines used by corrade, including the "Visual Studio Compatibility" ones. Also fixed rpath stuff for dynamic linking. I've tested it all with my magnum conan package, and it works as expected AFAIK. |
Alright, missed that one. Then I guess (regarding that part) we are back to what @mosra mentioned that the recipe must support parsing of |
In general yes, but if projects like Corrade define and ship custom CMake functions which go beyond more universal and standardized things like defining targets and finding libraries, then the only thing we can do is exposing this for CMake consumers. You can still use the Conan package with other build systems, but you will naturally not be able to use Corrade's CMake functions. if this is still useful depends and is another question. |
@Croydon Yes that was my take on it, and as @mosra mentioned these CMake scripts contain stuff that's (obviously) only relevant for CMake users. So basically the idea is to hijack this, put it in a |
Correct |
@helmesjo what about cmake functions like |
Regarding the appropriate target names. My understanding is that in order to be able to e.g. consume the Corrade::Containers target one has to be more explicit in the cpp_info. I think the recipe needs to contain something along the lines of
|
Yes. And to get granular targets @Janos95 point our correctly that adding Conan components is the way to go. However, you might want to split this work to not fight too many battles at once |
Yeah, I'll get the configuration stuff working first and foremost. 🙃 |
Not seeing any issues atm with the conan-center package, so I'll close this for the time being. |
Just tried to use this instead of my own conan-corrade, and it appears that the cmake scripts in the modules folder aren't properly copied to package. Only file in
.conan/data/<package-path>/lib/cmake/Corrade
isUseCorrade.cmake
.So when building my conan-magnum with
corrade/2019.10
(from conan-center) I get:OS: Windows (can't remember if I've tested on Linux...)
The text was updated successfully, but these errors were encountered: