Closed db4 closed 2 years ago
I'm having a similar issue. I'm trying to force docker to use a build profile that would force build_requirements to be in Release mode even if the recipe itself is built in Debug mode (for 1) performance reasons, and 2) working around an issue I have with m4 that throws debug asserts https://github.com/conan-io/conan-center-index/issues/8920)
The idea to pass a build profile like so
include(default)
[settings]
build_type=Release
I've been uselessly trying to patch conan-package-tools to correctly pass CONAN_BASE_PROFILE_BUILD
to docker but I haven't managed to make it work. I have opened a draft PR with my failed attempts at https://github.com/conan-io/conan-package-tools/pull/596 in the hope that it'll spark a conversation. #596 will be either cleaned if possible, or just closed if not.
My print-debugging isn't even showed in the build logs (eg: A failing example of an actual run that uses this patched cpt can be found here: https://github.com/jmarrec/conan-openstudio-ruby/runs/4852398264?check_suite_focus=true), and I do not understand why that is...
I also have encountered some problems with the changes introduced in commit 830e84a79c2c32b57824a227bc88b95406c3944d. It forces Conan to always be called with a build profile. This changes some of the internal behavior of Conan and prevents the imports() method from copying files of private requirements of my top-level package (I am not sure if this might be a bug in Conan or if it is desired behavior, haven't looked into it, yet)
I have a implemented a workaround that removes the "default" base profile when creating the Docker runner. This should now behave like the non-Docker path (pull request #604)
The Release 0.38.1 includes the hotfix the PR #604. Please, update your local copy: https://pypi.org/project/conan-package-tools/0.38.1/
Description of Problem, Request, or Question
ConanMultiPackager(use_docker=True) doesn't correctly handle build profile settings. If I set
CONAN_BASE_PROFILE_BUILD=my_build_profile
, CPT addsto Docker command line, but the build fails inside Docker because
my_build_profile
does not exist there:Another problem is that in the absence of CONAN_BASE_PROFILE_BUILD CPT passes empty settings for the build profile:
That breaks my build that worked before with CPT 0.35.0. Why not pass the same settings in CPT_PROFILE_BUILD as in CPT_PROFILE if CONAN_BASE_PROFILE_BUILD is not set?
Environment Details