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

[bug] ERROR: Error in generator 'BazelDeps': encoding without a string argument #10471

Closed
mohabouje opened this issue Jan 31, 2022 · 2 comments · Fixed by #10472
Closed

[bug] ERROR: Error in generator 'BazelDeps': encoding without a string argument #10471

mohabouje opened this issue Jan 31, 2022 · 2 comments · Fixed by #10472
Assignees
Milestone

Comments

@mohabouje
Copy link
Contributor

I've been using the bazel generator without issues. I want to integrate dear-imgui with a GLFW/GLEW backend but it keeps failing. I've attached a simple conanfile with the configuration I'm using:

Environment Details (include every applicable attribute)

  • Operating System+version: Fedora release 34 (Thirty Four)
  • Compiler+version: gcc (GCC) 11.0.1 20210324 (Red Hat 11.0.1-0)
  • Conan version: Conan version 1.44.1
  • Python version: Python 3.9.2

Steps to reproduce (Include if Applicable)

from conans import ConanFile
from conan.tools.google import BazelToolchain, BazelDeps


class ExampleConanIntegration(ConanFile):
    name = "example"
    version = "0.0.1"
    generators = ['BazelDeps', 'BazelToolchain']
    requires = [
        'glew/2.2.0'
    ]

    def configure(self):
          pass

    def imports(self):
          pass

Then run:

conan install . --build=missing -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 -s build_type=Debug

Logs (Executed commands with output) (Include/Attach if Applicable)

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

conanfile.py (tijara-conan-integration/0.0.1): Installing package
Requirements
    glew/2.2.0 from 'conancenter' - Cache
    glu/system from 'conancenter' - Cache
    opengl/system from 'conancenter' - Cache
Packages
    glew/2.2.0:44741af961cbe3bae7bd261b66459e5b6dc65693 - Cache
    glu/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache

Installing (downloading, building) binaries...
opengl/system: Already installed!
glu/system: Already installed!
glew/2.2.0: Already installed!
conanfile.py (tijara-conan-integration/0.0.1): Generator txt created conanbuildinfo.txt
conanfile.py (tijara-conan-integration/0.0.1): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
conanfile.py (tijara-conan-integration/0.0.1): Generator 'BazelDeps' calling 'generate()'
ERROR: Error in generator 'BazelDeps': encoding without a string argument
@memsharded
Copy link
Member

Thanks for reporting, with easy to reproduce instructions. I have managed to reproduce and submitted a quick fix in #10472, trying to get it for 1.45 tomorrow. Certainly the bazel integration is very preliminary at the moment, it is missing functionality and can have bugs. Please keep the feedback coming!

@memsharded memsharded added this to the 1.45 milestone Jan 31, 2022
@memsharded
Copy link
Member

#10472 merged, to be released 1.45

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

Successfully merging a pull request may close this issue.

2 participants