build_openroad.sh: kepler-formal is installed with an absolute RUNPATH, so a moved or re-pointed install loads another build's libraries
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 90/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bash, cmake, linux
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với phần kepler-formal trong build_openroad.sh quanh dòng 441 và so sánh CMAKE_INSTALL_RPATH của phần đó với RUNPATH tương đối đến $ORIGIN được các thư viện naja sử dụng. Build lại, sau đó dùng readelf -d và ldd để xác minh rằng kepler-formal phân giải libnaja_*.so từ bản cài đặt đã được di chuyển của chính nó thay vì từ đường dẫn build ban đầu. Hoàn tất khi RUNPATH được cài đặt là đường dẫn tương đối và vẫn hợp lệ sau khi di chuyển hoặc trỏ lại tiền tố cài đặt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Verilog
- Star
- 767
- Fork
- 544
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 96
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của The-OpenROAD-Project/OpenROAD-flow-scripts
-
Make SYNTH_HDL_FRONTEND=slang defaultCó thể làm lại được @jeffng-or đã nhận 31 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4548 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Clock period improvements left on the table due to SYNTH_MINIMUM_KEEP_SIZE counting macrosCó thể đã có người làm @joaomai đã nhận 2 ngày trước. Đang mở
The-OpenROAD-Project/OpenROAD-flow-scripts#4714 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use percent of minimum clock periodCó thể đã có người làm @migueldalberto đã nhận 23 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4583 · 7 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
asap7 cva6 fails in PSM with demo constraint fileCó thể đã có người làm @gadfort đã nhận 38 ngày trước. Đang mởpsm
The-OpenROAD-Project/OpenROAD-flow-scripts#4539 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GF180 platform tech LEF omits Nwell, causing SRAM OBS truncation on OpenDB importCó thể đã có người làm @bandhambalaji đã nhận 4 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
The-OpenROAD-Project/OpenROAD-flow-scripts#4496 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của The-OpenROAD-Project/OpenROAD-flow-scripts
Issue tương tự
-
[mimalloc] update to 3.6.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenCó thể đã có người làm @kou đã nhận hôm nay. Đang mởType: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/arrow-adbc#4947 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MinGW build faillureĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
facebookresearch/faiss#5775 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Appimage ConventionsĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
AOSSIE-Org/OpenVerifiableLLM#216 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày