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

cmake files shipped with the "fmt" library are broken #87473

Closed
delroth opened this issue May 10, 2020 · 2 comments · Fixed by #89114
Closed

cmake files shipped with the "fmt" library are broken #87473

delroth opened this issue May 10, 2020 · 2 comments · Fixed by #89114
Labels
0.kind: bug Something is broken

Comments

@delroth
Copy link
Contributor

delroth commented May 10, 2020

Describe the bug
The .cmake files shipped in the dev output of the fmt library refer to invalid include paths. This prevents building software with the library if they trying finding it using cmake (instead of pkg-config).

To Reproduce
Steps to reproduce the behavior:

  1. Add fmt to buildInputs of the dolphinEmuMaster package (currently it's falling back on its vendored copy).
  2. nix-build the package.

Expected behavior
dolphinEmuMaster builds.

Additional context
In /nix/store/63l9fc9j8d565aass76jkx3wzxgalzfm-fmt-6.2.0-dev/lib/cmake/fmt/fmt-targets.cmake:

set(_IMPORT_PREFIX "/nix/store/8ngsi39v983v7xnjx5pqwimkfz73mh7m-fmt-6.2.0")

# Create imported target fmt::fmt
add_library(fmt::fmt SHARED IMPORTED)

set_target_properties(fmt::fmt PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "FMT_LOCALE;FMT_SHARED"
  INTERFACE_COMPILE_FEATURES "cxx_variadic_templates"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "-Wl,--as-needed"
)

The include directory is invalid, looking up /include in the default output.

Notify maintainers

cc @jeroendehaas

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.5.13-hardened, NixOS, 20.09.git.53bbb34d874 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.4
  • channels(delroth): ""
  • nixpkgs: /etc/nixpkgs
@delroth delroth added the 0.kind: bug Something is broken label May 10, 2020
@delroth
Copy link
Contributor Author

delroth commented May 10, 2020

(Seems like a variant of fmtlib/fmt#1657 -- cc @jtojnar as well)

@jtojnar
Copy link
Member

jtojnar commented May 10, 2020

The file seems to be generated here: https://github.com/fmtlib/fmt/blob/963ee0831049b2e07d2b37e975a4b974a437749f/CMakeLists.txt#L280-L283

Maybe it is a CMake bug? I do not understand CMake enough to be able to tell for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants