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
Multiple compilers, ConanMultiPackager and CMake troubles #124
Comments
Yes, you found a bug on conanclang50. I'll provide a fix ASAP. |
Thanks! |
Hi again! I made a PR including a new fix: conan-io/conan-docker-tools#28 Cheers! |
Hi, I'm not sure if that will fix it in my case, since I'm not using Docker at all, but simply running a |
So, do you have both compilers on same environment? I asking because both On the other hand, BTW, Regards. |
Yes I have both compilers on my environment, I am using the following script: from conan.packager import ConanMultiPackager
import os, copy
# Do not forget to add correct env vars: https://github.com/conan-io/conan-package-tools
def _relwithdebinfo(build):
b = copy.deepcopy(build)
b.settings["build_type"] = "RelWithDebInfo"
return b
def relwithdebinfo_builds(vs_builds):
release_builds = list(filter(lambda build : build.settings["build_type"] == "Release", vs_builds))
return map(_relwithdebinfo, release_builds)
if __name__ == "__main__":
builder = ConanMultiPackager()
builder.add_common_builds(shared_option_name="zlib:shared", pure_c=True)
if os.name == "nt":
builder.builds.extend(relwithdebinfo_builds(builder.builds))
builder.run() I tried to export CC, CXX, CMAKE_C_COMPILER, CMAKE_CXX_COMPILER with no success. |
I found a very similar issue: conan-io/conan#1211 So, I customized
This works fine to build zlib running both clang and gcc on same environment. |
It's a bit of a hack but it works :p. I've printed the temporary profile that gets generated: DEBUG:
include(gcc72)
[settings]
arch=x86_64
build_type=Debug
compiler=clang
compiler.version=5.0
[options]
[env]
[build_requires]
What do you think about it? |
|
I could do that, but I find more convenient to filter out the builds added by The advantage is that there is no need to add lots of Another solution would be to have different build scripts, |
I agree with you. I prefer to use |
That's why I'd like to tell I wonder what @lasote thinks about that :) |
The @uilianries fix to iterate the builds and alter the env sounds good to me, not very hacky. |
Maybe adding an environment variable |
That would be a conan feature, more than a conan_package_tools, but for docker would require to pass it to the container. |
Works perfectly! Thanks a lot. |
@lasote I think that specifying a different base profile does not solve the problem which was originally stated. The |
Ok, I will take a look again. Reopening the issue. |
I don't' get it, sorry. Could you provide an example to reproduce the error? What do you have in your build.py? are you passing a default profile? With which contents? |
I build Qt on macOS on Azure Pipelines. The vm image has several Xcodes installed. It seems the default one is Xcode 9 where the build runs fine. But when building for Xcode 10 the build of Qt is fine with this profile:
But the
See the full logs here and the recipe here. In the profile if
|
Ups it seems that even the build does not use Xcode 10 but the default one:
The default one is the one which linked to by |
To play with different xcodes don't you need to use the |
Yep you are right, this seems to work: bilke/conan-qt-bincrafters@e2f6e96#diff-fec826feae04e51c0d94076385408bdc Sorry for bothering.. |
np! |
Hi!
I wish to package multiple packages for Linux x64, compiler with GCC/Clang.
To do so, I have two terminals. One has env vars
CONAN_GCC_VERSIONS
& cie, the other has the Clang variables.The problem is that the chosen compiler (clang) is not detected by CMake when running
test_package
.Here is the output I get:
When creating a single package with
conan create theo/stable -pr clang50
, everything works fine:The text was updated successfully, but these errors were encountered: