cuda-quantum icon indicating copy to clipboard operation
cuda-quantum copied to clipboard

Downstream cmake integration fails to find `fmt`

Open boschmitt opened this issue 9 months ago • 0 comments

Required prerequisites

  • [X] Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • [X] Make sure you've read the documentation. Your issue may be addressed there.
  • [X] Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • [ ] If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

When trying to create a downstream project with CUDAQ cmake integration, the configuration step fails to find the fmt library required by CUDAQ.

The issue is that fmt honors CMAKE_INSTALL_LIBDIR while CUDAQ does not. Hence, on certain systems, installing CUDAQ will end up placing the required fmt in lib64/ instead of lib/. CUDAQ cmake modules will fail to find it as it looks for it in lib/. (It is unclear at this point if this could affect other scenarios, i.e., not only downstream integration.)

Steps to reproduce the bug

Follow the docs on a system where CMAKE_INSTALL_LIBDIR is lib64.

Expected behavior

Correctly find fmt in the downstream cmake integration.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA Quantum version: nvq++ Version proto-0.8.0 (https://github.com/NVIDIA/cuda-quantum 6016e2f23216b64f0fca083bef22fb8266ea9049)
  • Operating system: Linux fedora 6.8.9-200.fc39.x86_64

Suggestions

We should honor CMAKE_INSTALL_LIBDIR and change all hardcoded lib in the building system. Alternatively, we could force CMAKE_INSTALL_LIBDIR to lib in our main configuration file or change the downstream integration to look for fmt in the correct location (based on CMAKE_INSTALL_LIBDIR.

boschmitt avatar May 22 '24 20:05 boschmitt