quartus-prime-lite: fix loading of libudev.so.0

Loading without a path was broken by nixpkgs commit
e2d06c5695. Fortunately we don't want
libudev.so.0 in modelsim now anyway which was the reason for loading by
name only, so we move it back to being 64-bit only and load it by
absolute path.
This commit is contained in:
Thomas Watson 2023-11-19 14:46:14 -06:00 committed by Bjørn Forsman
parent 10e860ea3b
commit cdc306ebe6

View File

@ -28,6 +28,7 @@ in buildFHSEnv rec {
xorg.libICE xorg.libICE
xorg.libSM xorg.libSM
zlib zlib
libudev0-shim
# qsys requirements # qsys requirements
xorg.libXtst xorg.libXtst
xorg.libXi xorg.libXi
@ -53,7 +54,6 @@ in buildFHSEnv rec {
xorg.libX11 xorg.libX11
xorg.libXext xorg.libXext
xorg.libXrender xorg.libXrender
libudev0-shim
libxcrypt-legacy libxcrypt-legacy
]; ];
@ -95,7 +95,6 @@ in buildFHSEnv rec {
# LD_PRELOAD fixes issues in the licensing system that cause memory corruption and crashes when # LD_PRELOAD fixes issues in the licensing system that cause memory corruption and crashes when
# starting most operations in many containerized environments, including WSL2, Docker, and LXC # starting most operations in many containerized environments, including WSL2, Docker, and LXC
# (a similiar fix involving LD_PRELOADing tcmalloc did not solve the issue in my situation) # (a similiar fix involving LD_PRELOADing tcmalloc did not solve the issue in my situation)
# we use the name so that quartus can load the 64 bit verson and modelsim can load the 32 bit version
# https://community.intel.com/t5/Intel-FPGA-Software-Installation/Running-Quartus-Prime-Standard-on-WSL-crashes-in-libudev-so/m-p/1189032 # https://community.intel.com/t5/Intel-FPGA-Software-Installation/Running-Quartus-Prime-Standard-on-WSL-crashes-in-libudev-so/m-p/1189032
# #
# But, as can be seen in the above resource, LD_PRELOADing libudev breaks # But, as can be seen in the above resource, LD_PRELOADing libudev breaks
@ -103,7 +102,7 @@ in buildFHSEnv rec {
# `(vlog-2163) Macro `<protected> is undefined.`), so only use LD_PRELOAD # `(vlog-2163) Macro `<protected> is undefined.`), so only use LD_PRELOAD
# for non-ModelSim wrappers. # for non-ModelSim wrappers.
if [ "$NIXPKGS_IS_MODELSIM_WRAPPER" != 1 ]; then if [ "$NIXPKGS_IS_MODELSIM_WRAPPER" != 1 ]; then
export LD_PRELOAD=''${LD_PRELOAD:+$LD_PRELOAD:}libudev.so.0 export LD_PRELOAD=''${LD_PRELOAD:+$LD_PRELOAD:}/usr/lib/libudev.so.0
fi fi
''; '';