-
Notifications
You must be signed in to change notification settings - Fork 993
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] profile include() does not work with os=Linux #16448
Comments
Hi @paulharris - Thanks for reporting this 😁 I do not get to reproduce the issue. It's working well on my side. Do you have another file named base-clang include(base-superprofile-linux)
[settings]
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=18
compiler.cppstd=20 Or: include(./base-linux)
[settings]
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=18
compiler.cppstd=20 Let me know if it solved the issue. |
That file is the only file named "base-linux" on the filesystem. I can confirm it is loading by putting "BREAKME" in the file, at which point it fails.
|
I just copied and pasted everything from your comment above (even the commented lines in the clang profile). Neither macOS nor Linux fails 😓 $ conan build . --profile:host profs/release-clang-18
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=18
os=Linux
[conf]
tools.build:compiler_executables={'c': '/usr/bin/clang-18', 'cpp': '/usr/bin/clang++-18'}
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
======== Computing dependency graph ========
Graph root
conanfile.py (testprofile/1.0): /home/develop/conan/xxxxxxx/conanfile.py
======== Computing necessary packages ========
======== Installing packages ========
======== Installing packages ========
======== Finalizing install (deploy, generators) ========
conanfile.py (testprofile/1.0): Calling generate()
conanfile.py (testprofile/1.0): Generators folder: /home/develop/conan/xxxxxxx/build/Release/generators
conanfile.py (testprofile/1.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (testprofile/1.0): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
(cmake>=3.23) cmake --preset conan-release
(cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (testprofile/1.0): CMakeToolchain generated: /home/develop/conan/xxxxxxx/build/Release/generators/CMakePresets.json
conanfile.py (testprofile/1.0): CMakeToolchain generated: /home/develop/conan/xxxxxxx/CMakeUserPresets.json
conanfile.py (testprofile/1.0): Generating aggregated env files
conanfile.py (testprofile/1.0): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
======== Calling build() ========
conanfile.py (testprofile/1.0): Calling build()
conanfile.py (testprofile/1.0): Running CMake.configure()
conanfile.py (testprofile/1.0): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/develop/conan/xxxxxxx" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/develop/conan/xxxxxxx"
..... I just opened a PR to simulate this too: #16454 Please, feel free to try it locally to see if it doesn't work. If the CI does not fail, let's add all the changes that could make it fail. |
Ok thanks, there was a problem with my test,
I'm aware that ini file formats have limitations, but having a second group results in the first group's settings ignored. ie I've changed the test, the profile now looks like:
Note that second [settings] group
While I agree this is user-error, profile files can be long, and the cause is not obvious. ie the user won't be aware that some of the profile settings will be completely ignored. I've pushed an update to the test, not sure how to append to your PR, I'll mention it there |
Thanks for the feedback! Now it makes sense what was the issue. I agree that it would be better to have a clear error report of this situation. I think going with Lets try to add that error. |
Great, thanks! |
Describe the bug
(conan 2.4.0, on linux)
I have a base profile,
base-linux
:I have another profile,
base-clang
:And I have the top level profile,
reldeb-clang
:When I build with this as the host profile, the resulting output is:
Note, there is no os (and arch) listed, and the recipes complain and fail to build.
If I move the base-linux contents into base-clang, then it works.
There seems to be no documentation on the website about this behaviour (that I could see),
and seems to be a bug.
If the user can't do this, then conan should detect this problem and fail earlier with a clear error message.
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: