conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
7.97k stars 952 forks source link

[bug] qcc cannot calculate dep graph because it fails to produce a list of compatible cppstd per compiler verison #13325

Closed tannerbitz closed 1 year ago

tannerbitz commented 1 year ago

Environment details

Steps to reproduce

command

conan build -pr:b linux64 -pr:b qnx64 -s build_type=Release --version

qnx64 profile

[settings] os=Neutrino os.version=7.1 arch=x86_64 compiler=qcc compiler.version=8.3 compiler.libcxx=cxx compiler.cppstd=17

[conf] tools.build:compiler_executables={'c':'qcc', 'cpp': 'q++'} tools.build:cflags=["-Vgcc_ntox86_64","-fpic", "-DUSESRCVERSION", "-D_QNX_SOURCE", "-DQNX"] tools.build:cxxflags=["-Vgcc_ntox86_64", "-Y _cxx", "-std=c++17", "-Wc,-isysroot,{{os.getenv('QNX_TARGET')}}", "-fpic", "-DUSESRCVERSION", "-D_QNX_SOURCE", "-DQNX", "-Wno-deprecated-declarations", "-Wno-unused-parameter", "-Wno-unused-variable", "-Wno-ignored-attributes"] tools.build:sharedlinkflags=["-Wl,--build-id=md5"] tools.cmake.cmaketoolchain:generator=Eclipse CDT4 - Unix Makefiles tools.cmake.cmaketoolchain:system_name=QNX tools.cmake.cmaketoolchain:system_processor=x86_64 tools.cmake.cmaketoolchain:system_version=7.1.0 tools.gnu:host_triplet=x86_64-pc-nto-qnx7.1.0 tools.cmake.cmaketoolchain:user_toolchain=["{{ os.path.join(profile_dir, "..", "toolchains", "qnx_toolchain_preamble.cmake") }}"]

linux64 profile

[settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux

[conf] tools.system.package_manager:mode=install tools.system.package_manager:sudo=True

Logs

======== Computing necessary packages ========
Traceback (most recent call last):
  File "/home/tbitz/.local/lib/python3.8/site-packages/conan/cli/cli.py", line 268, in main
    cli.run(args)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conan/cli/cli.py", line 167, in run
    command.run(self._conan_api, self._commands[command_argument].parser, args[0][1:])
  File "/home/tbitz/.local/lib/python3.8/site-packages/conan/cli/command.py", line 159, in run
    info = self._method(conan_api, parser, *args)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conan/cli/commands/build.py", line 46, in build
    conan_api.graph.analyze_binaries(deps_graph, args.build, remotes=remotes, update=args.update,
  File "/home/tbitz/.local/lib/python3.8/site-packages/conan/api/subapi/graph.py", line 190, in analyze_binaries
    binaries_analyzer.evaluate_graph(graph, build_mode, lockfile, remotes, update)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conans/client/graph/graph_binaries.py", line 330, in evaluate_graph
    self._evaluate_node(node, build_mode)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conans/client/graph/graph_binaries.py", line 144, in _evaluate_node
    self._process_compatible_packages(node)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conans/client/graph/graph_binaries.py", line 107, in _process_compatible_packages
    compatibles = self._compatibility.compatibles(conanfile)
  File "/home/tbitz/.local/lib/python3.8/site-packages/conans/client/graph/compatibility.py", line 80, in compatibles
    plugin_compatibles = self._compatibility(conanfile)
  File "/home/tbitz/.conan2/extensions/plugins/compatibility/compatibility.py", line 7, in compatibility
    configs = cppstd_compat(conanfile)
  File "/home/tbitz/.conan2/extensions/plugins/compatibility/cppstd_compat.py", line 17, in cppstd_compat
    for _cppstd in cppstd_possible_values:
TypeError: 'NoneType' object is not iterable
tannerbitz commented 1 year ago

I have a fix for this and would like to help

memsharded commented 1 year ago

Thanks for the fix! It will likely land in 2.0.2. But do you know that in the meantime you might be able to workaround it in the compatibility.py plugin?

memsharded commented 1 year ago

Closed by https://github.com/conan-io/conan/pull/13326 for 2.0.2