-
Notifications
You must be signed in to change notification settings - Fork 990
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] 2 profiles: -o:b "*":shared=False -o:h "*":shared=True
doesn't properly work on macOS
#10425
Comments
Yes, this is a known issue, I think this is the case in https://github.com/conan-io/conan/pull/9839/files too. We don't plan to fix it in 1.X, too risky. It should be fixed already in 2.0. |
This issue looks the same? #10332 |
Just to clarify: it means that Actually, even with conanfile.txt
(default value of
=> create only 1 package without executable. build context
=> create only 1 package with executable. build context |
Now that Conan 2.0 was released, I decided to try and test if this was finally working, but it still seems to be broken. At least on Conan 2.0.1, the build profile options are getting ignored, and only the host profile is used. It's possible I'm just doing something wrong, so here's a repo to reproduce the problem. (that uses a fork of the flatbuffers recipe from conan center to add the I'm not sure if this counts as a bug or a feature request, since this issue is the closest thing to documentation showing how to use separate options...making me think it was never officially meant to be supported? |
Hi @AlexRamallo I don't think this is the case, I'd say this works fine. You can have a look at our tests in
Everything is looking good. Lets try to have a look to your project |
Running your project I get: Build requirements
flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23 - Cache
...
Requirements
flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:1d9e144f36cc2a36c062e7269975b076ac60ce52 - Build
Build requirements
flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:731f170d8cf06cc754c6fe19feef9f5a6f6ad04c - Build That looks good, one different $ conan list flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:1d9e144f36cc2a36c062e7269975b076ac60
ce52
Local Cache
flatbuffers
flatbuffers/23.1.21
revisions
d02cf76b6b6fb708ea53425b4579fb23 (2023-03-07 14:30:26 UTC)
packages
1d9e144f36cc2a36c062e7269975b076ac60ce52
info
settings
arch: x86_64
build_type: Release
compiler: gcc
compiler.cppstd: gnu17
compiler.libcxx: libstdc++11
compiler.version: 11
os: Linux
options
fPIC: True
flatc: False
header_only: False
shared: False
$ conan list flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:731f170d8cf06cc754c6fe19feef9f5a6f6a
d04c
Local Cache
flatbuffers
flatbuffers/23.1.21
revisions
d02cf76b6b6fb708ea53425b4579fb23 (2023-03-07 14:30:26 UTC)
packages
731f170d8cf06cc754c6fe19feef9f5a6f6ad04c
info
settings
arch: x86_64
build_type: Release
compiler: gcc
compiler.cppstd: gnu17
compiler.libcxx: libstdc++11
compiler.version: 11
os: Linux
options
fPIC: True
flatc: True
header_only: False
shared: False We can see each one has the correct |
You're absolutely right! After some more digging, I found this issue which looks like a better fit for the error I was encountering. The issue was that the test repo wasn't generating info for the cmake modules in the build context (also the flatbuffers recipe declares the flatc cmake modules even if it isn't built, so that was confusing). The fix was to change some settings in CMakeDeps to force it to generate configs for the build context: def generate(self):
CMakeToolchain(self).generate()
cmake = CMakeDeps(self)
cmake.build_context_activated = ["flatbuffers"]
cmake.build_context_suffix = {"flatbuffers": "_BUILD"}
cmake.build_context_build_modules = ["flatbuffers"]
cmake.generate() ...and then load the separate build config using the "flatbuffers_BUILD" name in cmake. I also tested it using the |
Excellent! :) Thanks very much for reporting and the feedback, closing the issue as solved then. |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs (Executed commands with output) (Include/Attach if Applicable)
Build requirements of
libcurl
(conan-center recipe), likepkgconf
&libtool
are built whithshared=True
when they have this option, while they should be built withshared=False
.Just the first lines of the log, to see 2 profiles and the build of
pkgconf
:Click to expand log
The text was updated successfully, but these errors were encountered: