Closed schlichtanders closed 2 years ago
setenv
is a Julia function. It tries to run /home/ssahm/.julia/artifacts/cf570328554ecb898e625367a9c9fb2c01f55267/bin/ssh-keygen
, does that not exist or something?
I investigated further
➜ bin ldd /home/ssahm/.julia/artifacts/cf570328554ecb898e625367a9c9fb2c01f55267/bin/ssh-keygen
linux-vdso.so.1 (0x00007ffdb55f7000)
libcrypto.so.1.1 => not found
librt.so.1 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib/librt.so.1 (0x00007f9d1328c000)
libdl.so.2 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib/libdl.so.2 (0x00007f9d13287000)
libutil.so.1 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib/libutil.so.1 (0x00007f9d12ffb000)
libz.so.1 => not found
libresolv.so.2 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib/libresolv.so.2 (0x00007f9d12fe6000)
libc.so.6 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib/libc.so.6 (0x00007f9d12de8000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210/lib64/ld-linux-x86-64.so.2 (0x00007f9d13293000)
the file is there, but libcrypto.so.1.1 and libz.so.1 are not found
Sounds like a misconfigured installation of Julia then?
yes, it might mean that the official julia-bin
is broken for nixos (despite being binary packaging)
I opened an issue at nixpkgs, it would be really great if julia could support nixos in a better or more official way.
Quite an horror to update your operating system and julia itself gets buggy...
Sounds like a misconfigured installation of Julia then?
or the use of the keygen artifact is not properly managing its c-dependencies
Quite sure this is not an issue with DocumenterTools -- we literally just call whatever OpenSSH_jll provides us. I presume this will also fail on your system?
using OpenSSH_jll
run(`$(ssh_keygen())`)
But it might be related to how BinaryBuilder packages binary dependencies and it somehow doesn't work on NixOS. Does NixOS run everything in containers or something? This looks similar: https://github.com/JuliaPackaging/Yggdrasil/issues/4046
Side note: the OpenSSH JLL finds the two dependencies from other JLLs. The setenv
magic comes from the _jll
package and is crucial for the dynamic linker finding those shared libraries. So the ldd
call not finding the libraries is totally expected.
Thank you @mortenpi I understood what is going and it was just luck that it worked before for me on nixos. Now I see the difficulties which arise because Julia's package binaries are assuming a standard linux file system for dynamically linked libraries.
Closing this issue, as the reason is at Julia or BinaryBuilder.jl itself
Here the link to a freshly created issue on BinaryBuilder.jl https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/1214
Thank you for the connection. Everything is understood and I found a final and good fix in https://discourse.nixos.org/t/making-lib64-ld-linux-x86-64-so-2-available/19679
DocumenterTools.genkeys(MyPackate)
as well asDocumenterTools.genkeys(user=..., repo=...)
fails on my system with the following error:as you can see, I am running on nixos, nevertheless DocumenterTools should not depend on the operating system.
To replicate this bug, create a NixOS on channel 22.05 with
julia-bin
package (probablynix-shell -p julia-bin --run julia
will also fail)I hope someone understands what is going on. A similar sounding problem was already reported and resolved for parallel somewhen back. Don't know whether it is the same underlying problem.
Maybe it is just that you assume there is
setenv
available in your terminal. Please don't assume something like this.