build_openroad.sh: kepler-formal is installed with an absolute RUNPATH, so a moved or re-pointed install loads another build's libraries
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 90/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bash, cmake, linux
- Ambito
- build-system
Direzione di ricerca
Inizia dalla sezione kepler-formal in build_openroad.sh, intorno alla riga 441, e confronta il suo CMAKE_INSTALL_RPATH con il RUNPATH relativo a $ORIGIN utilizzato dalle librerie naja. Ricompila, quindi usa readelf -d e ldd per verificare che kepler-formal risolva libnaja_*.so dalla propria installazione spostata anziché dal percorso di build originale. L’operazione è completata quando il RUNPATH installato è relativo e rimane valido dopo lo spostamento o la ridefinizione del prefisso di installazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Verilog
- Stelle
- 777
- Fork
- 549
- Merge medio
- 2g 14h
- PR unite (30g)
- 97
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di The-OpenROAD-Project/OpenROAD-flow-scripts
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4726 ·
I maintainer di solito rispondono entro 1 giorno
-
Make SYNTH_HDL_FRONTEND=slang defaultForse di nuovo libera @jeffng-or l’ha presa 33 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
PDN/TAP: rows kept at the edge of a macro halo get followpins PDN can't connect (PDN-0179 on asap7/swerv_wrapper)Forse già presa @gadfort l’ha presa 2 giorni fa. Apertapdn
The-OpenROAD-Project/OpenROAD-flow-scripts#4724 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Clock period improvements left on the table due to SYNTH_MINIMUM_KEEP_SIZE counting macrosForse già presa @joaomai l’ha presa 4 giorni fa. Aperta
The-OpenROAD-Project/OpenROAD-flow-scripts#4714 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Use percent of minimum clock periodForse già presa @migueldalberto l’ha presa 25 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4583 · 7 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di The-OpenROAD-Project/OpenROAD-flow-scripts
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
agent:Windows bug code-review MEDIUM tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
mgradwohl/tasksmack#2960 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Link Checker ReportApertaautomated issue linkchecker report
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
QuantEcon/lecture-dp#68 ·
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 ·
I maintainer di solito rispondono entro 1 giorno
-
package_info fails analysis with --incompatible_stop_exporting_build_file_pathForse già presa @mkanat l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bazelbuild/rules_license#184 ·