sampler_test.cpp build failed with "qrmi.h: No such file or directory" error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- cpp
- Área
- build-system
Línea de trabajo
Comienza con samples/sampler_test.cpp y compara el encabezado del servicio incluido con service/qiskit_runtime_service.hpp y service/qiskit_runtime_service_qrmi.hpp. Sigue los pasos de compilación de la README para qiskit y qiskit-ibm-runtime-c y, después, vuelve a compilar los samples; se considera terminado cuando sampler_test.cpp se compila sin el error de que falta qrmi.h.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
-
Qiskit C++ Version: Git clone from the latest main branch (2026/03/09)
-
Qiskit Version: Git clone from the latest main branch (2026/03/09)
-
C++ Compiler: gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11)
-
Operating system: Rocky 9 Linux (x86_64)
-
Underlying API client: qiskit-ibm-runtime-c
What is happening?
Building sampler_test.cpp failed with "qrmi.h: No such file or directory".
[root@login build]# cmake -DQISKIT_ROOT=/shared/sandbox/qiskit-cpp/qiskit -DQISKIT_IBM_RUNTIME_C_ROOT=/shared/sandbox/qiskit-cpp/qiskit-ibm-runtime-c ..
-- The CXX compiler identification is GNU 11.5.0
-- The C compiler identification is GNU 11.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1282 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
CMakeLists.txt:21 (FetchContent_Declare)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using the multi-header code from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/build/_deps/json-src/include/
Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/build
((pyenv) ) [root@login build]# make
[ 12%] Building CXX object CMakeFiles/circuit_test.dir/circuit_test.cpp.o
[ 25%] Linking CXX executable circuit_test
[ 25%] Built target circuit_test
[ 37%] Building CXX object CMakeFiles/observable_test.dir/observable_test.cpp.o
[ 50%] Linking CXX executable observable_test
[ 50%] Built target observable_test
[ 62%] Building CXX object CMakeFiles/sampler_test.dir/sampler_test.cpp.o
In file included from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/providers/qrmi_backend.hpp:22,
from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/service/qiskit_runtime_service_qrmi.hpp:25,
from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/sampler_test.cpp:25:
/shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/providers/qrmi_job.hpp:27:10: fatal error: qrmi.h: No such file or directory
27 | #include "qrmi.h"
| ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/sampler_test.dir/build.make:76: CMakeFiles/sampler_test.dir/sampler_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:158: CMakeFiles/sampler_test.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
How can we reproduce the issue?
Follow the README
- Clone qiskit repo and "make c"
- Clone qiskit-ibm-runtime-c and build
- Clone qiskit-cpp repo and build sample
What should happen?
Samples should be built with qiskit-ibm-runtime-c.
Any suggestions?
I think sampler_test.cpp should have
#include "service/qiskit_runtime_service.hpp"
instead of
#include "service/qiskit_runtime_service_qrmi.hpp"
No response
- Lenguaje dominante
- C++
- Estrellas
- 41
- Forks
- 26
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Qiskit/qiskit-cpp
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
Qiskit/qiskit-cpp#167 ·
-
QASM3 load with qiskit-cppAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Qiskit/qiskit-cpp#166 ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Qiskit/qiskit-cpp#165 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
Qiskit/qiskit-cpp#163 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
Qiskit/qiskit-cpp#162 ·
Todos los issues de Qiskit/qiskit-cpp
Issues similares
-
44-x-y bug :beetle:
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
electron/electron#55528 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
70 Instance - Raid - Outland
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
azerothcore/azerothcore-wotlk#28328 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día