-
Notifications
You must be signed in to change notification settings - Fork 30
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
yocto/openembedded vs. conan - Workflow? #12
Comments
No, when you want you can have source builds too. But it can provide you all binary artifacts for what ever platform you need it. How to use conan best with yocto? I dont have any practical experience with mixing them. From my experience regarding using yocto in real world project with 100+ custom components build via yocto recipes... However conan can solve all the problems of yocto by introducing this new layer above the components, decentralizing the component packaging and creating binary artifacts directly in the repository where it happens. Yocto has created a package manger for C/C++, because there wasn't one available in the past. This was a valid solution in the past. However this situation has now changed and modern decentralized tools like Conan or Vcpkg are introduced and will become the standard for C/C++ applications. So it is better to keep up with this new trend and getting first class support for consuming conan or Vcpkg packages, there are 1000 of up to date recipes ready to be deployed on an image... |
From what I see here[1] I don't get the impression that things are compiled. Would you please show me how to do that? This would help me a lot. I mean if I would be able to [1] https://github.com/conan-io/meta-conan/blob/master/classes/conan.bbclass
This is exactly what I want to avoid in a "release build". Everything should be
I understand your view as a "developer" if you want to do something like this. In my mind the workflow for a "developer" and a "release manager" is totally different. Let me tell you my issues
And here we kind of disagree in various ways ;)
The problem here is, that this is most likely non-reproducible. What I mean is, that if you build the same thing from sources 2 times you get different binaries. Or if you make a change to something you built 20 years ago you don't see only the change you made, but also different timestamps and so on...
No. Yocto bundles whatever it builds into
This is what somehow blows my mind. I somewhat see that C++ developers like those, but I don't quite see what is so special about them compared to the classic ones. Also, and that's my main problem, what you suggest is to mix package managers. One package manager (
I am trying to understand this and trying to find a way to do it. If you are willing to help we can do a few experiments. I guess I can cover the Yocto side of things if you help with conan. Actually, I am after a solution/workflow which can make Yocto and conan people at least somehow happy. And keep in mind in my opinion there should be a different workflow for a developer and a release. There are other things required. Of course, you might not want to |
You are right is it not enabled by default. You need to add here: https://github.com/conan-io/meta-conan/blob/master/classes/conan.bbclass#L71 Did you already checked this page: https://docs.conan.io/en/latest/integrations/cross_platform/yocto.html regarding RPM see here: https://docs.conan.io/en/latest/integrations/deployment/system_package_manager.html
Conan helps here with activation scripts. But anyway, you can basically create one big deploy recipe with conan, which you can imagine as a Layer in yocto. Then ALL dependencies will be installed into one directory (zlib, openssl, Qt, etc...). Just to give an idea when you go the binary only approach.
No there are 100 yocto recipes created for creating all the components....this does not scale at all. Because the recipes are working only with yocto and not the local development workflow so creating and maintaining the recipes i violating DRY.
Anyway, this is the future of C/C++ package management, like CMake is the defacto standard build system, conan or vcpkg will make the race for defacto standard packagemanager. Maybe this will give you some answers regarding: "Why conan?": Feel free to ping me in the offical conan channel for more questions. |
I am also kind of forced to use conan packages inside my yocto project (backward compatibility of some conan packages), Actually my opinion is that both of them are really great if used separately, Conan is really good on CI (It makes life easy) and Yocto is really stable on building Linux Images and handling the dependencies, The better in my opinion is to have only one Bandmaster in each step of the workflow, so Yocto could do the building step and then after the image (kernel, rootfs,...) is ready then a conan layer could be Implemented above to deploy the whole image and make the CI Task much easier . Now to my concrete questions: 1- I followed the steps described here , but that seems not to work. 2- This is a remark: As a user of Yocto, I dislike the fact of configuring conan again, because I already configured Yocto for my target, so I would suggest kind of wrapper layer that takes the Yocto configuration and creates the profile needed, and then in the end user will no more call conan but only bitbake. |
I believe there should be a separation between the developer workflow and the ci/release workflow, since when you start using conan for the app and BitBake for the release you produce a non-reproducible release and loose many other goodies available by the yocto project when you BitBake and don't just use the SDK and need to deal with versioning, license compliance, off-line builds and so on on 2 different places, which is not manageable. Developer: use conan if there is some advantage. Now to my concrete questions:
Yes they don't work. Besides I think it's a bad example, since mosquitto is already available (like many other recipes) by meta-openembedded: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.11.bb?h=master
In my case it's enough to source the environment script to cross compile without a special profile, at least for the hello-world example. With the help of people on the conan chat I managed to do something like this: https://gitlab.com/exempli-gratia/conan-yocto-hellocppcmake/-/blob/master/conanfile.py https://gitlab.com/exempli-gratia/conan-yocto-hellocppcmake/-/blob/master/build.sh
I really would like to find use cases and proper integration between conan and yocto, but this seems to be tricky. Still trying to find out if the integration issues are technical or "philosophical". |
My understanding is that this layer just grabs some binaries from somewhere and adds them magically to some yocto project/oe build.
Right?
conan
seems to do similar things toBitBake
, so both seem to be kind of interfering with each other.I would distinguish between a "developer workflow" and for this
conan
seems OK, and a "release workflow", where I don't quite see howconan
would be adequate. (but I don't knowconan
well enough, hence I am asking for comments here).What I am missing, I guess, is building via the yocto project/oe and adding those binaries/packages to some
conan
package, or a workflow where developers useconan
and releases are built from source viaBitBake
. So maybe aconan
toBitBake
orBitBake
toconan
converter? That kind of sucks as well, since most likely different binaries will be generated.As far as I see only a Yocto/OE generated toolchain can be used together with
conan
, but many cool/important things, which are available via a realBitBake
build are lost like that:recipes
https://layers.openembedded.org/layerindex/branch/master/layers/boost
which are needed are installed)-dev
,-dbg
,-src
,... (by default a stripped exe is installed and you could e.g. install a-dbg
package and debug)cross-prelink
(still enabled by default)DL_DIR
(sources),SOURCE_MIRRORS
,...SSTATE
(build artifacts),SSTATE_MIRRORS
,...per recipe sysroot
conan
as well?)And you could add additional meta-layers which provide:
conan
?)conan
do this?)What I am after is everything built from sources via
Bitbake
for a release and still having the possibility to use for application/application developersconan
, I guess.... and/or a reasonable workflow how to integrate
conan
with yocto/oe.The text was updated successfully, but these errors were encountered: