fix(nix): fix runtime error of runtime difftest ld#62
Merged
good-circle merged 1 commit intoOpenXiangShan:masterfrom Aug 26, 2025
Merged
fix(nix): fix runtime error of runtime difftest ld#62good-circle merged 1 commit intoOpenXiangShan:masterfrom
good-circle merged 1 commit intoOpenXiangShan:masterfrom
Conversation
Contributor
Author
|
@Tang-Haojin @ngc7331 Can you please take a look? |
Member
|
Two questions regarding
|
Contributor
Author
|
|
ngc7331
approved these changes
Jul 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fix the problem of LD generated when running Xiangshan difftest by adding $LD_LIBRARY_PATH environment variable.
The reason is that glibc used in
nix shelllacks libz.so related dependenciesFor example, you can execute:
❯ ldd ./XiangShan/ready-to-run/riscv64-nemu-interpreter-so linux-vdso.so.1 (0x00007c39ecb48000) libz.so.1 => not found libstdc++.so.6 => not found libm.so.6 => /nix/store/g3s0z9r7m1lsfxdk8bj88nw8k8q3dmmg-glibc-2.40-66/lib/libm.so.6 (0x00007c399cf17000) libgcc_s.so.1 => /nix/store/fdsndp18qa1fk375vcd4vrn00c0p4zpr-xgcc-14.2.1.20250322-libgcc/lib/libgcc_s.so.1 (0x00007c39ecb14000) libc.so.6 => /nix/store/g3s0z9r7m1lsfxdk8bj88nw8k8q3dmmg-glibc-2.40-66/lib/libc.so.6 (0x00007c399cc00000) /nix/store/g3s0z9r7m1lsfxdk8bj88nw8k8q3dmmg-glibc-2.40-66/lib64/ld-linux-x86-64.so.2 (0x00007c39ecb4a000)At the same time, this PR also made some simple changes to the nix script