-
Notifications
You must be signed in to change notification settings - Fork 440
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 #304
Comments
Yay, Conan! 😍 There's an in-progress Hunter package as well (#298), so with this it's complete :) If I see correctly, this happens only when cross-compiling from 64b to 32b, right? In my experience, building natively on either 32b or 64b never had any issues (in particular, I have a Travis CI build and it also needed just I wanted to suggest looking at how other CMake-based packages handle this, but seeing your other open issues (bincrafters/community#602 / bincrafters/community#603), it seems you already tried that. Other ideas:
|
Yeah, conan is a dream come true (once the packages are in place)! 😇 From what I can tell (I've been staring at this too hard recently, so my brain is pretty cooked), yes the issue is only related to cross building from a x64 host to x86. Building natively is probably a sane path to go considering all issues around OpenGL libs in general (been seeing a lot in my google quest). I'll probably try this first.
Thanks for the feedback! I'll keep digging! |
I think it should be possible to dig the problem out of the FindOpenGL script and fix it (after all, the core of the problem is just a file not being found in this particular crosscompilation setup), but then:
I think the more straightforward way would be to just build natively on 32bit. Besides that, didn't Ubuntu ditch 32bit support for the latest release already (19.04)? I heard something related to that. |
Hi @mosra! Otherwise, I believe @helmesjo is going to include the recipes in @bincrafters and we are maintaining it there, but obviously official support is always nicer 😄 |
Alright, so native builds did the trick. Closing this for now! |
@helmesjo yay! @Croydon I'm afraid I don't have the capacity to provide official support (as in maintaining them myself), I'm already offloading Vcpkg and Debian package support to people who are using those platforms directly -- because they can spot the issues much easier. What I can do, however, (and what I'm usually doing), is reviewing them to ensure they provide all desired options and features (and also pinging you in case a new version is about to get released). |
You could still ping us at any time when either CI or users are complaining about problems, so it would be more reviewing then maintaining by yourself. We (as in Bincrafters) kinda have this relationship with the maintainer of Flatbuffers, as he doesn't know much about Conan as well: https://github.com/google/flatbuffers/commits/master/conanfile.py But if you don't feel comfortable with this is also fine and we will go ahead at @bincrafters 😄 |
Right, so what the stuff I need to do for this semi-official support? :) Looking at flatbuffers, I see just But ... the problem I see here is that I already have quite a huge build matrix (see here: https://magnum.graphics/build-status/) and adding a dozen of other jobs just for Conan will make it unusable, since the builds would take forever (it's already bad enough with AppVeyor taking 2+ hours). Is there a way around that? |
The amount of files is depending on the question if we would use your CI or another one. If it is only about minimal Conan support without CI support, then this would be conanfile.py + test_package https://github.com/helmesjo/conan-magnum/tree/stable/2018.10/test_package All of the other files are only needed to get the CI + publishing going (see https://github.com/bincrafters/conan-templates-upstream as a reference) We could maintain conanfile.py + test_package (= 4 files in total) here and use our Bincrafters CI and repository to publish the build packages |
Just the last piece of the puzzle... (semi-related to this issue so I hope it's ok to ask here 😇 ): I fixed the link order, and also added OpenGL to the link list (all of this is applied to packages depending on Magnum), and in the process added a line in the test package that verifies all is linked correctly (this is like a mini-package depending on Magnum & build+run by conan after building Magnum, just for verification). @mosra Do you know of anything else that is required on Mac? A package that needs to be installed? Some other framework that needs to be linked/added for Mac? Could this be a Travis+Mac thing? |
@helmesjo I quickly deleted my message(😁) as it didn't see related on a second thought, even more since this is the case on all configurations but only macOS fails. |
Haha np. Yeah also that target is optional (unless building tests). But I changed Corrade to build |
Is this testsuite there to test magnum/corrade itself or applications using it? In the first case it should stay disabled |
It's for magnum & corrade from what I can tell, so yes it adds unnecessary build time for sure. You know what, I'll set it to false again! 😄 |
uh oh, slow down, i am unable to type so fast 😅
Sure, of course ;) since it's now mainly about Conan, I'm renaming and reopening.
There's Using Magnum with custom buildsystems in the documentation, listing link order and all main packages of magnum and corrade. All of them should be present in the options (IIRC Trade and DebugTools were missing) and those which are deprecated (Shapes and GlutApplication) don't have to be there at all, since I will be removing them soon anyway. The default values should match the defaults from Not sure if there's something other from the
It's a whole test suite framework (see the docs) and I'm encouraging the library users to use it as well, since it's well integrated with the lib and has some features others don't. But apps can be tested by anything else as well, so it's completely optional (but enabled by default, yes). Building of tests is controlled by
Hmm. For some reason I thought Conan is CMake-based and this all would be handled transitively by CMake. Isn't that the case? If not, then PluginManager, Sdl2Application and GlutApplication needs to link to For OpenGL there's an ability to use GLES (
Since that would mean blowing up the job count, I think this would need to be on your CI, then. For all other packages I'm having stuff inside the package/ directory, so there could be |
Ah sweet, that was the documentation I was thinking about but never actually searched for... 😊 |
Alright then, sorry @helmesjo, maybe your first instinct was right and True should be the default value. Maybe we need to slow down a bit :)
Conan can work together with absolutely all build systems. However, for the common ones it ships a lot of helper tools to deal with common scenarios and glue together the Conan world with the build system's one. For CMake Conan can in theory detect the libraries automatically, however, only with some limitations. For example, it can't detect the right order to link stuff and sometimes the order is important. Also it might not be perfect and misses libraries out. For these reasons recipes who want to be included in the official conan-center should list the libraries manually. To understand this a little bit better: Even Magnum is using CMake, consumers of Magnum might not, so Conan needs to translate all of these information between different building systems. So even consumers might use Meson it still links all libraries in the correct order.
Conan can handle those platforms, but typically we don't deliver for this platforms. At least not right now, who knows what the future brings :) |
Yeah, now I get you completely, thanks. So, looking in FindMagnum.cmake and FindCorrade.cmake should help you getting the various dependencies. Just the highlighted portion and the various
Sure, it's easy to enable these platforms later, if someone would need them. |
This is fine, we can use Bincrafters' CI 👍
The |
To do for Corrade (Magnum can be done afterwards much more easily)
|
Continuing the conversation over here... Some Conan recipes like Magnum do require some system_requirements. Over at Bincrafters we do have currently a little confusion about mapping all ARM architectures to their correct Debian/Ubuntu/Fedora etc. (or better apt/yum) package suffix. Cross-referencing: bincrafters/community#704 The Magnum recipe seems to be almost ready, but that's one of the things we should figure out first. https://github.com/Croydon/magnum/blob/533f9361c4c0fec45896e4d30082aa86cd8d04b4/conanfile.py#L129 |
Vaguely related to the above -- the gl/gles branching should be like this instead (TARGET_GL is a superset of TARGET_GLES, so if GLES is selected, GL is as well): if self.options.target_gles:
packages.append("libgles1-mesa-dev")
elif self.options.target_gl:
packages.append("libgl1-mesa-dev") Oh -- and then, also, for Vulkan -- which means there's a new if self.options.target_vk:
packages.append("libvulkan-dev") |
@mosra Would it be valid to actually enable more than one of the |
This comment has been minimized.
This comment has been minimized.
Added Added OpenAL depenceny for I'm seeing that there is also a |
Sorry about the delayed reply. Actually, it's like this (a bit complex, I must admit):
The If |
Just a friendly ping: |
There are still several options missing etc. see the last few comments I once again have to concentrate on exams and related stuff, so I won't get this done in the next few weeks However, I haven't forgotten about Magnum, so I will do this at some point or another if nobody else is faster 😄 |
Ping -- any chance we could wrap this up soon? |
@mosra I just wrote you on Gitter. Sorry for the long silence once more 🙈 |
Status update: Corrade is now in the Conan Center Index (CCI) and probably needs some fixes and fine tuning going forward (specifically with the CMake scripts). I'm still interested in pushing Magnum into CCI as well We raised the quality standards and don't accept Which means that we need to do a lot of other ground work before stuff like Magnum can be finally included. We are on it, but it is hard to say when we are done with it. To mature the Magnum recipe before it is ready for CCI I will probably add it to Bincrafters as an intermediate solution (we don't need to be that strict there with quality standards as in CCI, so e.g. I would recommend to close this issue for now. With the introduction of CCI and the change of workflows most work won't happen here in this repository anyway. I'm not an user for Magnum (currently) so I lack a lot of knowledge about it and might appreciate some advises while packaging it. We didn't have any conclusion yet if upstream repositories should contain the Conan recipes too (summary: advantages for people working with/developing the git version, but obvious downsides for maintaining them as it duplicates the recipe; conan-io/conan-center-index#22). If we have a stable Magnum recipe in the future and we (Conan people + Magnum) come to the conclusion that it is worth of having it in the Magnum repository directly we can create a new issue for it. |
Thank you for the continued effort on this 👍 One thing that I should probably do before closing the issue is properly documenting that Corrade is in CCI. Right now, the docs say this -- since I'm not a Conan user, I don't know what piece of information is needed and what could be thrown away. Could you write up a short paragraph / code snippet etc that I should put there instead? Thanks a lot!
So, I'll keep the
... and I'm not an user for Conan (currently) :) Which means, I'm not monitoring the CCI repo, so if there's some discussion related to the magnum packages and you think I should be involved, please CC me there. I'll try to help if I can. |
@helmesjo New release, mosra asked me to ping you to update the Conan package. |
@mosra @RokoBurilo Ahh very nice, thanks! :D |
FYI I made sure to update the version in corrade's |
Issue conan-io/conan-center-index#1397 seems to be soon fixed via conan-io/conan-center-index#2111 And @helmesjo works on adding the new version here: conan-io/conan-center-index#2109
Depends if we still want to support git-versions / arbitrary git commits with a Conan recipe. Maybe doubling maintenance cost for this advantage is just not worth it. If this would be the decision you could remove all Conan related files from your repositories and everything would be in conan-center-index But there is still no overall census in this regard... conan-io/conan-center-index#22 |
Just noticed that a package has been added to conan-center. |
I have also prepared a PR for |
I'm writing a conan recipe for Magnum (already got one for Corrade successfully building). I've wrestled a few days now with these issues (each try takes a lot of time) so I'd thought I'd look for some help/ideas here!
Issue
I'm building conan packages for GCC, Clang (etc.) inside docker containers.
In the conan recipe, prior to building magnum, it installs
libgl1-mesa-dev
(orlibgl1-mesa-dev:i386
respectively) on the host. But when later building, it either:libgl1-mesa-dev:i386
:libgl1-mesa-dev
&libgl1-mesa-dev:i386
(in that order, else 1. happens again), but then it:error adding symbols: File in wrong format
) on Ubuntu Bionic & Cosmic when targeting x86 (it appears link the 64bit lib).*There are a lot of issues with multiple mesa-dev packages on the same host.
Details:
So, any ideas? Anyone seen similar issues? Am I missing something obvious?
The text was updated successfully, but these errors were encountered: