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

Error when using Docker #560

Open
Jochen0x90h opened this issue Apr 21, 2021 · 1 comment
Open

Error when using Docker #560

Jochen0x90h opened this issue Apr 21, 2021 · 1 comment

Comments

@Jochen0x90h
Copy link

Jochen0x90h commented Apr 21, 2021

Description of Problem, Request, or Question

I try to run conan package tools with export CONAN_USE_DOCKER=1, but get an error:

>> Running builds...
Page: 1/1
+-----+--------------------+--------------+--------+------------+
|   # |   compiler.version | build_type   | arch   | compiler   |
|-----+--------------------+--------------+--------+------------|
|   1 |                  6 | Release      | x86_64 | gcc        |
+-----+--------------------+--------------+--------+------------+


>> Build: 1/1
Traceback (most recent call last):
  File "/home/mapcam/jw/havoc-github/puzzle/build.py", line 19, in <module>
    builder.run()
  File "/home/mapcam/.local/lib/python3.9/site-packages/cpt/packager.py", line 584, in run
    self.run_builds(base_profile_name=base_profile_name)
  File "/home/mapcam/.local/lib/python3.9/site-packages/cpt/packager.py", line 682, in run_builds
    docker_image = self._get_docker_image(build)
  File "/home/mapcam/.local/lib/python3.9/site-packages/cpt/packager.py", line 729, in _get_docker_image
    docker_image = self._autodetect_docker_base_image(compiler_name, compiler_version)
  File "/home/mapcam/.local/lib/python3.9/site-packages/cpt/packager.py", line 750, in _autodetect_docker_base_image
    if compiler_name == "gcc" and Version(compiler_version) > Version("5"):
  File "/home/mapcam/.local/lib/python3.9/site-packages/conans/model/version.py", line 12, in __new__
    return str.__new__(cls, content.strip())
AttributeError: 'int' object has no attribute 'strip'

Environment Details

  • Conan Package Tools Version: 0.35.1
  • Operating System: Linux
  • Operation System Version: Ubuntu 18.04
  • Conan version: 0.35.2
  • Python version: 3.9.0

Steps to reproduce (Include if Applicable)

in build.py, I have

builder = ConanMultiPackager(reference="myproject/0.1.0@")
builder.add(settings={"arch": "x86_64", "build_type": "Release", "compiler": "gcc", "compiler.version": 6}, options={}, env_vars={}, build_requires={})
builder.run()

Does anybody have an idea?

Thanks,
Jochen

@Jochen0x90h
Copy link
Author

I found the problem, the compiler version has to be a string and not an int, i.e. "compiler.version": "6"

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

1 participant