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] PkgConfigDeps error #9292

Closed
ericLemanissier opened this issue Jul 20, 2021 · 1 comment · Fixed by #9341
Closed

[bug] PkgConfigDeps error #9292

ericLemanissier opened this issue Jul 20, 2021 · 1 comment · Fixed by #9341
Assignees
Milestone

Comments

@ericLemanissier
Copy link
Contributor

ericLemanissier commented Jul 20, 2021

Environment Details (include every applicable attribute)

  • Operating System+version: Windows/Linux
  • Compiler+version:*
  • Conan version: 1.38.0
  • Python version: 3.8.0/3.8.5

Steps to reproduce (Include if Applicable)

conanfiletxt:

[requires]
glib/2.69.0
[generators]
PkgConfigDeps

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

$ conan install .
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=9
os=Linux
os_build=Linux
cmake:build_type=Release
ninja:build_type=Release
[options]
[build_requires]
[env]

conanfile.txt: Installing package
Requirements
    bzip2/1.0.8 from 'conan-center' - Cache
    glib/2.69.0 from 'conan-center' - Cache
    libelf/0.8.13 from 'conan-center' - Cache
    libffi/3.3 from 'conan-center' - Cache
    libmount/2.36 from 'conan-center' - Cache
    libselinux/3.1 from 'conan-center' - Cache
    pcre/8.44 from 'conan-center' - Cache
    pcre2/10.37 from 'conan-center' - Cache
    zlib/1.2.11 from 'conan-center' - Cache
Packages
    bzip2/1.0.8:da606cf731e334010b0bf6e85a2a6f891b9f36b0 - Cache
    glib/2.69.0:0385e7273c0d55fb125e44f6a019048e475655f4 - Cache
    libelf/0.8.13:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    libffi/3.3:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    libmount/2.36:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    libselinux/3.1:6b0384e3aaa343ede5d2bd125e37a0198206de42 - Cache
    pcre/8.44:5a9dce922eb15fddb52dd3f1ac71ae033f4e570d - Cache
    pcre2/10.37:3b544e62795c293d95ba624360f2fc91ca32ce44 - Cache
    zlib/1.2.11:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache

Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: /home/eric/.conan/data/bzip2/1.0.8/_/_/package/da606cf731e334010b0bf6e85a2a6f891b9f36b0/bin
libelf/0.8.13: Already installed!
libffi/3.3: Already installed!
libmount/2.36: Already installed!
zlib/1.2.11: Already installed!
pcre/8.44: Already installed!
pcre/8.44: Appending PATH environment variable: /home/eric/.conan/data/pcre/8.44/_/_/package/5a9dce922eb15fddb52dd3f1ac71ae033f4e570d/bin
pcre2/10.37: Already installed!
pcre2/10.37: Appending PATH environment variable: /home/eric/.conan/data/pcre2/10.37/_/_/package/3b544e62795c293d95ba624360f2fc91ca32ce44/bin
libselinux/3.1: Already installed!
glib/2.69.0: Already installed!
glib/2.69.0: Appending PATH env var with: /home/eric/.conan/data/glib/2.69.0/_/_/package/0385e7273c0d55fb125e44f6a019048e475655f4/bin
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generator 'PkgConfigDeps' calling 'generate()'
ERROR: Error in generator 'PkgConfigDeps': {'ref': pcre/unknown@unknown/unknown, 'build': False, 'direct': True}

When using conanfile.py, the log is more detailed:

Calling generate()
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conans/errors.py", line 34, in conanfile_exception_formatter
    yield
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conans/client/generators/__init__.py", line 226, in write_toolchain
    conanfile.generate()
  File "/home/conan/.conan/data/fluidsynth/2.1.9/bincrafters/stable/export/conanfile.py", line 151, in generate
    pkgconf.generate()
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conan/tools/gnu/pkgconfigdeps.py", line 190, in generate
    generator_files = self.content
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conan/tools/gnu/pkgconfigdeps.py", line 88, in content
    components = self._get_components(dep.ref.name, dep)
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conan/tools/gnu/pkgconfigdeps.py", line 63, in _get_components
    comp_requires_gennames.append(self._get_require_comp_name(pkg_name, require))
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conan/tools/gnu/pkgconfigdeps.py", line 53, in _get_require_comp_name
    req = self._conanfile.dependencies.direct_host[pkg]
  File "/opt/pyenv/versions/3.7.5/lib/python3.7/site-packages/conans/model/dependencies.py", line 68, in __getitem__
    return self._data[r]
KeyError: {'ref': pcre/unknown@unknown/unknown, 'build': False, 'direct': True}
@franramirez688
Copy link
Contributor

Hi @ericLemanissier
Thanks for reporting the issue. I'm performing another local test because it seemed a bug (sorry for being too much fast) but it could be a problem in the recipe. Let me be sure before tagging it again as a bug or whatever.

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