-
Notifications
You must be signed in to change notification settings - Fork 986
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
[bug] MesonToolchain does not pick up CC/CXX from build requirements (in build profile) #8311
Comments
@jgsogo do you have an idea why could it happen? e.g. meson tests use CC from the conan profile, and it works flawlessly |
Hi! The environment from the build requires is populated before entering the I'm not sure how we want to pass these variables from now on (ping @memsharded ), we can populate the environment during Not a bug because it's all about experimental features, but something to define and implement for sure. 🤔 With the toolchains and generators, if everything is written down during the |
I would say that if we want to be very transparent and have a better developer experience, the way to go might be to generate virtualenv files for everything in the environment. After a $ git clone .... & cd ...
$ conan install ...
$ (if necessary) source conantoolchainenv.sh
$ meson ... (using Conan generated files with MesonToolchain)
# or
$ cmake .... -DCMAKE_TOOLCHAIN_FILE=conantoolchain.cmake And yes, if the environment becomes something explicit to the build, then the Conan def build(self):
with activate_env("conantoolchainenv.sh"):
meson = Meson(self)
meson.build() This is a very preliminary vision, sure we need to work on it, but the main principles would be:
|
Right now Before thinking about the local workflow, we need
...or use a completely different approach for MesonToolchain. |
Ok, now I understand better the issue. It is not about the transfer between the generate() and the build(), but how the generate() populate things. Which would be related to what @madebr was talking about the new I would like if we could try to explicit define the interfaces that will be available for Conan 2.0 about the dependencies, so the |
that seems like |
addition from #8311 - CC from the profile aren't captured by |
#8353 was merged, and will be using the new experimental |
The compiler paths of a build requirement with a cross compiler that sets the CC/CXX environment variables
are not available in
conan_meson_cross.ini
.I have a build requirement that sets some compiler variables:
But the
[binaries]
section of the cross file remains empty.When I run conan with
CC=abc conan create .... -pr:h ... -pr:b ...
, thenc = 'abc' is present in the
binaries` section.CFLAGS/CXXFLAGS
from a build requirement are also not propagated.Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
C
/CXX
/...). Let's name itcrosscompiler/0.1
.cross
.native
.MesonToolchain
like:conan create . meson-project/0.1@ -pr:h cross -pr:b native
The generated
conan_meson_cross.ini
won't contain theproperties.c
values, set bycrosscompiler/0.1
.If you'd run
CC=abc conan create . meson-project/0.1@ -pr:h cross -pr:b native
, then it would.CC'ing @SSE4 for being the author of
MesonToolchain
.The text was updated successfully, but these errors were encountered: