Skip to content
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

Missing conanio/clang70 docker image #124

Closed
kegt opened this issue Apr 2, 2019 · 4 comments
Closed

Missing conanio/clang70 docker image #124

kegt opened this issue Apr 2, 2019 · 4 comments

Comments

@kegt
Copy link

kegt commented Apr 2, 2019

I was trying to build a package using CPT with CONAN_CLANG_VERSIONS="7.0" and failed:

Exception: Error pulling the image: conanio/clang70

According to #54 (comment) the image is now conanio/clang7, so I changed the env to CONAN_CLANG_VERSIONS="7" and ended up with another error:

conans.errors.ConanException: Invalid setting '7' is not a valid 'settings.compiler.version' value.
Possible values are ['3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4.0', '5.0', '6.0', '7.0', '8']

Seems conan use major-only for Clang >= 8.0, but not for 7.0: conan-io/conan#3643.

Environment Details

  • Conan Docker Tools image: conanio/clang7
  • Operating System: macOS
  • Operation System Version: macOS Mojave 10.14.3
  • Python version (If you are building some image): N/A

Build logs

# export CONAN_CLANG_VERSIONS="7.0"
...
____________________________________________________________________________________________________

 >> sudo -E docker pull conanio/clang70

____________________________________________________________________________________________________
Using default tag: latest
Error response from daemon: pull access denied for conanio/clang70, repository does not exist or may require 'docker login'
Traceback (most recent call last):
  File "build.py", line 8, in <module>
    docker_builder.run()
  File "/usr/local/lib/python2.7/site-packages/cpt/packager.py", line 449, in run
    self.run_builds(base_profile_name=base_profile_name)
  File "/usr/local/lib/python2.7/site-packages/cpt/packager.py", line 554, in run_builds
    docker_entry_script=self.docker_entry_script)
  File "/usr/local/lib/python2.7/site-packages/cpt/runner.py", line 184, in run
    self.pull_image()
  File "/usr/local/lib/python2.7/site-packages/cpt/runner.py", line 244, in pull_image
    raise Exception("Error pulling the image: %s" % self._docker_image)
Exception: Error pulling the image: conanio/clang70
@uilianries
Copy link
Member

Hi @0xcccc

The docker image for clang 7 is conanio/clang7

Why we don't use 70 instead? LLVM project changed the version manipulation since clang 7, so we preferred to follow the author idea to keep more authentic.

There was a long discussion about it on Conan issues. We avoided to change clang 7.0 to 7 for Conan settings, because we just started to support 7 as official after to release a version with 7.0.

So, to use Clang 7 we will need to set:

CONAN_CLANG_VERSIONS=7.0 CONAN_DOCKER_IMAGE=conanio/clang7

Regards!

@kegt
Copy link
Author

kegt commented Apr 2, 2019

Thanks for you advice @uilianries !

I know I could set CONAN_DOCKER_IMAGE=conanio/clang7 to make it work,
however doing so also means I could only set a single version in CONAN_CLANG_VERSIONS, right?

Since I'd like to build package against multiple Clang versions(e.g. CONAN_CLANG_VERSIONS="6.0,7"),
I guess my best option is to add an extra builder in my build.py for Clang 7.

@uilianries
Copy link
Member

You need to match the compiler version + docker image. If you need to build with multiple compiler versions you will need to create a job for each compiler version.

If you are using some CI service, like Travis, conan provides default templates, which you can obtain by conan new

There is a better explanation about it on Conan Package Tools readme. Also, you could check most popular recipes, like zlib, to have some idea how to implement with multiple versions.

Since I'd like to build package against multiple Clang versions(e.g. CONAN_CLANG_VERSIONS="6.0,7"),I guess my best option is to add an extra builder in my build.py for Clang 7.

Not an extra builder, but a new build. I prefer to use add_common_builds and filter by the env vars CONAN_CLANG_VERSIONS and CONAN_GCC_VERSIONS. When adding the build settings and option directly on the builder list, you will need to update the script for every new configuration. I only change the script when I need to customize some option, like shared or fPIC.

Regards!

@kegt
Copy link
Author

kegt commented Apr 2, 2019

Wow, that's a very detailed explanation. Thanks again @uilianries, Will definitely check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants