You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am cross-building my applications using a Yocto SDK. To better integrate this build process into conan, I created a small generator which automatically registers a script to setup the Yocto SDK environment before build.
This works surprisingly well for building and creating Conan packages since most build tools (cmake, meson, pkg-config...) are now provided by the Yocto SDK.
Lately, I tried to optimize the implementation of the package_info method for stub Conan packages already provided by Yocto. Since most Yocto packages are provided with pc files, I tried to reuse that information when building the cpp_info metadata
The PkgConfig class internally uses conanfile.run but it seems environments are not activated as I expected: the Yocto SDK is not activated so cpp_info is filled with information from the wrong target.
Do you know how I can achieved the desired outcome? Looking at the PkgConfig class implementation again, I see I could override the "tools.gnu:pkg_config" property to point to the Yocto SDK binary. But I would be duplicating information, which I wanted to avoid in the first place.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
I think this is connected to #15099 and more discussed in #14422, and the approach to solve this is being documented in conan-io/docs#3811. Basically the package_info() cannot execute things from dependencies, it cannot inject "tool_requires", because the tool-requires are for "build-time", but the package_info() must work even if the tool_requires are not installed in the system (when installing for example a pre-compiled binary).
So please try the approach from conan-io/docs#3811, moving the tool-requires logic to build() or package() method, and let us know.
What is your question?
Hello,
I am cross-building my applications using a Yocto SDK. To better integrate this build process into conan, I created a small generator which automatically registers a script to setup the Yocto SDK environment before build.
This works surprisingly well for building and creating Conan packages since most build tools (cmake, meson, pkg-config...) are now provided by the Yocto SDK.
Lately, I tried to optimize the implementation of the
package_info
method for stub Conan packages already provided by Yocto. Since most Yocto packages are provided withpc
files, I tried to reuse that information when building thecpp_info
metadataThe
PkgConfig
class internally usesconanfile.run
but it seems environments are not activated as I expected: the Yocto SDK is not activated socpp_info
is filled with information from the wrong target.Do you know how I can achieved the desired outcome? Looking at the
PkgConfig
class implementation again, I see I could override the"tools.gnu:pkg_config"
property to point to the Yocto SDK binary. But I would be duplicating information, which I wanted to avoid in the first place.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: