Open anpin opened 2 months ago
here is what I have tried. it doesn't fail to load libraries any more, but fail to start nonetheless. perhaps it tries to create a folder under /nix/store/...
where binaries are. see log in attach.
jetbrains =
let extraLdPath = with final; with xorg; [
icu
udev
libX11
libICE
libSM
mesa
fontconfig
gtk3
final.stdenv.cc.cc
]; in
prev.jetbrains // {
rider = prev.jetbrains.rider.overrideAttrs (oldAttrs: rec {
inherit extraLdPath;
postInstall =
oldAttrs.postInstall +
''
extra="${final.lib.makeLibraryPath extraLdPath}"
echo "extra: $extra"
IFS=':'
for libpath in $extra; do
ln -sf "$libpath"/* $out/rider/plugins/dotTrace.dotMemory/DotFiles/
done
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
patchelf --set-rpath ${final.lib.makeLibraryPath extraLdPath} $out/rider/plugins/dotTrace.dotMemory/DotFiles/linux-x64/libSkiaSharp.so
patchelf --set-interpreter $interp $out/rider/plugins/dotTrace.dotMemory/DotFiles/linux-x64/JetBrains.Profilers.Rider
ls -al $out/rider/plugins/dotTrace.dotMemory/DotFiles/
unset IFS
'';
});
};
related issue in jetbrains system : https://youtrack.jetbrains.com/issue/DMRY-11331/rider-memory-profiler-fails-to-start
Had to patch another binary inside of a jar. Here is my working overlay:
jetbrains =
let extraLdPath = with final; with xorg; [
icu
udev
libX11
libICE
libSM
mesa
fontconfig
gtk3
libGL
libglvnd
libGLU
final.stdenv.cc.cc
]; in
prev.jetbrains // {
rider = prev.jetbrains.rider.overrideAttrs (oldAttrs: rec {
inherit extraLdPath;
# look at nixpkgs derivation for explanations
postInstall =
oldAttrs.postInstall +
''
extra="${final.lib.makeLibraryPath extraLdPath}"
echo "extra: $extra"
IFS=':'
for libpath in $extra; do
ln -sf "$libpath"/* $out/rider/plugins/dotTrace.dotMemory/DotFiles/
done
unset IFS
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
patchelf --set-rpath ${final.lib.makeLibraryPath extraLdPath} $out/rider/plugins/dotTrace.dotMemory/DotFiles/linux-x64/libSkiaSharp.so
patchelf --set-interpreter $interp $out/rider/plugins/dotTrace.dotMemory/DotFiles/linux-x64/JetBrains.Profilers.Rider
jar=$(find $out -name "skiko-awt-runtime-linux-x64*.jar")
${final.jdk}/bin/jar xvf $jar libskiko-linux-x64.so
patchelf --set-rpath ${final.lib.makeLibraryPath extraLdPath} libskiko-linux-x64.so
${final.jdk}/bin/jar uvf $jar libskiko-linux-x64.so
rm -f libskiko-linux-x64.so
'';
@anpin Did you ever get around the issue with Size should be >= (1,1)
when you try to activate the profiler on a project?
It is reported as this issue on Youtrack: https://youtrack.jetbrains.com/issue/DMRY-10986/Size-should-be-11-Parameter-name-size-EXCEPTION-1-2-ArgumentException-Message-Size-should-be-11-ExceptionPath however I'm not sure if it's caused by Nix or by Rider doing something strange
Haven't seen that error, profiler works just fine for me after applying above overlay.
Haven't seen that error, profiler works just fine for me after applying above overlay.
Just out of curiosity, or you using Rider from stable or unstable nix? Because I believe stable is still on the 2023.x series?
Describe the bug
Jetbrains Memory Profiler fails to start due to missing dependency
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Plugin works
Screenshots
Additional context
The plugin uses avalonia under the hood, so adding following list of libraries to ldpath should do the trick (waiting for the update to finish to verify that):
Rider logs
Notify maintainers
@raphaelr
Metadata
Add a :+1: reaction to issues you find important.