build_openroad.sh: kepler-formal is installed with an absolute RUNPATH, so a moved or re-pointed install loads another build's libraries
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 90/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bash, cmake, linux
- Área
- build-system
Línea de trabajo
Comienza por la sección kepler-formal en build_openroad.sh, alrededor de la línea 441, y compara su CMAKE_INSTALL_RPATH con el RUNPATH relativo a $ORIGIN que utilizan las bibliotecas naja. Recompila y luego usa readelf -d y ldd para comprobar que kepler-formal resuelve libnaja_*.so desde su propia instalación reubicada y no desde la ruta de compilación original. Termina cuando el RUNPATH instalado sea relativo y siga siendo válido después de mover o volver a apuntar el prefijo de instalación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Subject
[Build] for compilation-related issues.
Describe the bug
build_openroad.sh installs kepler-formal with an absolute DT_RUNPATH. In the kepler-formal section (master 0b56643596e8, line 441; the same line is in tags 26Q3 and 26Q4):
-DCMAKE_INSTALL_RPATH="${INSTALL_PATH}/kepler-formal/lib" \
The naja libraries in the same install already use $ORIGIN-relative RUNPATHs (libnaja_opt.so has $ORIGIN:$ORIGIN/../lib:$ORIGIN/../..), so only the binary is tied to the directory it was built in.
When the checkout is moved after building, or when the original path later becomes a symlink to a different ORFS checkout, kepler-formal loads libnaja_*.so from whatever now sits at the old path. In our case that was a newer ORFS build, and the LEC step stopped the flow in 4_1_cts with a symbol lookup error (log below). If the old path no longer exists, the loader cannot find libnaja_*.so at all. If the two builds happened to be ABI-compatible, the equivalence checker would run silently against the other build's libraries.
Proposed fix, one line:
- -DCMAKE_INSTALL_RPATH="${INSTALL_PATH}/kepler-formal/lib" \
+ -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" \
The backslash keeps bash from expanding $ORIGIN. CMake writes it verbatim into DT_RUNPATH, and the loader resolves it relative to bin/kepler-formal, i.e. to <prefix>/lib: the same directory as today for an install that never moves. CMAKE_BUILD_RPATH is unchanged.
I have not yet rebuilt with this change; I will report back here once I have.
Happy to open a PR with this change if that is preferred.
Expected Behavior
An installed kepler-formal loads the naja libraries of its own install, wherever the checkout lives, as the naja libraries themselves already do.
Environment
kernel: Linux 7.0.0-38-generic
os: Ubuntu 26.04.1 LTS (Resolute Raccoon)
cmake version 3.31.9
-- The C compiler identification is GNU 15.2.0
-- The CXX compiler identification is GNU 15.2.0
-- OpenROAD version: 26Q2-2517-g7304ba78ad
-- System name: Linux
-- Compiler: GNU 15.2.0
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 20
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- LTO/IPO is enabled
-- slang version: 10.0.150+f04e81565
-- Found Python: $HOME/miniforge3/bin/python3.13 (found version "3.13.13") found components: Interpreter
-- Build STATIC library as: svlang
-- Found system fmt library: $HOME/miniforge3/lib/libfmt.so.12.1.0
-- Using system fmt include: $HOME/miniforge3/include
-- Found system boost 1.89.0 at /usr/local/include
-- Found Threads: TRUE
-- Got YOSYS_SLANG_REVISION: 82effc8d9541be69e1ed3ec44759a4449f5d9247
-- Got SLANG_REVISION: f04e81565793c768b747a8fd058f3e7aeceee1b5
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.3.0", minimum required is "4.3")
-- boost: 1.89.0
-- absl: 20250512
-- Found GTest: /usr/local/lib/cmCMake Warning at src/CMakeLists.txt:222 (message):
-- GTest: 1.17.0
-- Found Python3: $HOME/miniforge3/include/python3.13 (found version "3.13.13") found components: Development Development.Module Development.Embed
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3.1")
-- spdlog: 1.17.0
-- Found BISON: /usr/bin/bison (found version "3.8.2")
-- Found Doxygen: /usr/bin/doxygen (found version "1.15.0") found components: doxygen dot
-- STA version: 3.1.0
-- STA git sha: 8572175ac45c42ce8d3d772f73bbb059786b9c66
-- System name: Linux
-- Compiler: GNU 15.2.0
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- IPO/LTO: enabled for Release builds
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- std::format: available
-- CUDD library: /usr/local/lib/libcudd.a
-- CUDD header: /usr/local/include/cudd.h
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.3.0", minimum required is "3.0")
-- SWIG version: 4.3.0
-- STA library: /tmp/tmp.XXXX/libOpenSTA.a
-- STA executable: /tmp/tmp.XXXX/sta
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.8")
-- Found re2: /opt/or-tools/lib/cmake/re2/re2Config.cmake (found version "11.0.0")
-- Found Clp: /opt/or-tools/lib/cmake/Clp/ClpConfig.cmake (found version "1.17.10")
-- Found Cbc: /opt/or-tools/lib/cmake/Cbc/CbcConfig.cmake (found version "2.10.12")
-- Found SCIP: /opt/or-tools/lib/cmake/scip/scip-config.cmake (found version "9.2.2")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found OR-Tools: /opt/or-tools/lib/cmake/ortools (version: 9.14.6206)
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- GUI is enabled
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS)
-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so
-- TCL header: /usr/include/tcl/tcl.h
-- Found Eigen3: /usr/local/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.1")
-- Tcl Extended disabled
-- Python3 enabled
--
-- =========================================================
-- OpenROAD Configuration Summary
-- =========================================================
-- C++ Standard : 20
-- Build Type : RELEASE
-- GUI Support : ON
-- Python Bindings: ON
-- Tests Enabled : ON
-- =========================================================
-- Configuration complete.
--
-- Configuring done (6.9s)
-- Generating done (1.0s)
-- Build files have been written to: /tmp/tmp.XXXX
(76 CMake 'Cannot generate a safe runtime search path' warnings omitted)
ORFS: tag 26Q3 (adeb389e7), built with ./build_openroad.sh --local
kepler-formal submodule: b596df4121f2
To Reproduce
- Build one ORFS tag with
./build_openroad.sh --localin/work/orfs-a. - Build another tag in
/work/orfs-b. mv /work/orfs-a /work/orfs-a-kept && ln -s /work/orfs-b /work/orfs-areadelf -d /work/orfs-a-kept/tools/install/kepler-formal/bin/kepler-formal | grep RUNPATHprints/work/orfs-a/tools/install/kepler-formal/lib, andlddon the same binary resolveslibnaja_*.sounder/work/orfs-b.- A flow run from
/work/orfs-a-keptwith LEC enabled stops in4_1_ctswith the error below.
Relevant log output
$ readelf -d tools/install/kepler-formal/bin/kepler-formal | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: [/work/orfs-a/tools/install/kepler-formal/lib]
$ tools/install/kepler-formal/bin/kepler-formal --help
tools/install/kepler-formal/bin/kepler-formal: symbol lookup error: tools/install/kepler-formal/bin/kepler-formal: undefined symbol: _ZN4naja8NAJA_OPT20LoadlessLogicRemover20getLoadlessInstancesERKNS_3DNL3DNLINS2_15DNLInstanceFullENS2_15DNLTerminalFullEEERKN3tbb6detail2d124concurrent_unordered_setImSt4hashImESt8equal_toImENSB_13tbb_allocatorImEEEE
Screenshots
No response
Additional Context
No response
- Lenguaje dominante
- Verilog
- Estrellas
- 777
- Forks
- 549
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 92
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin 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 The-OpenROAD-Project/OpenROAD-flow-scripts
-
pr-head should not vote on PRsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4726 ·
Los mantenedores suelen responder en 1 día
-
Make SYNTH_HDL_FRONTEND=slang defaultQuizá libre de nuevo @jeffng-or la tomó hace 34 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4735 ·
Los mantenedores suelen responder en 1 día
-
gf180: final report stops with [ERROR PSM-0021] because Via1-Via4 have no RESISTANCE in the tech LEFAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4734 ·
Los mantenedores suelen responder en 1 día
-
PDN/TAP: rows kept at the edge of a macro halo get followpins PDN can't connect (PDN-0179 on asap7/swerv_wrapper)Posiblemente ocupada @gadfort la tomó hace 2 días. Abiertopdn
The-OpenROAD-Project/OpenROAD-flow-scripts#4724 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de The-OpenROAD-Project/OpenROAD-flow-scripts
Issues similares
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
NVIDIA/flare-local-inference#90 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
osam-cologne/archlinux-proaudio#917 ·
Los mantenedores suelen responder en 1 día