I need to use an OpenGL/GLFW program on a remote machine. x11vnc works for this, but performance is not great / I only need the one window not the full desktop.
Edit: alas, I spoke prematurely… it does indeed work for simple demo apps like glxgears but doesn’t work for say vglrun julia. It seems the issue is nix-specific and I think is due to some conflict between how vglrun uses LD_PRELOAD, and how nix uses it… Any thoughts?
❯ vglrun bash -c 'echo $LD_PRELOAD'
[VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to
[VGL] 128.12.176.76, the IP address of your SSH client.
/nix/store/wx4rf2zp434dgfin0c0n0b3g7c9f7r56-virtualgl-lib-2.6.5/lib/libdlfaker.so:/nix/store/wx4rf2zp434dgfin0c0n0b3g7c9f7r56-virtualgl-lib-2.6.5/lib/libvglfaker.so
❯ vglrun +v +tr julia
[VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to
[VGL] 128.12.176.76, the IP address of your SSH client.
[VGL] dlopen (filename=/nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 flag=2 retval=0x7f17533ca5c0)
[VGL] dlopen (filename=NULL flag=2 retval=0x7f1753400130)
[VGL] dlopen (filename=/nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so flag=2 retval=0x01209800)
[VGL] dlopen (filename=NULL flag=257 retval=0x7f1753400130)
[VGL] dlopen (filename=libpcre2-8 flag=9 retval=0x00000000)
[VGL] dlopen (filename=libpcre2-8.so flag=9 retval=0x00000000)
fatal: error thrown and no exception handler available.
#<null>
jl_errorf at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_load_dynamic_library at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_get_library_.part.0 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_load_and_lookup at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jlplt_pcre2_compile_8_7047 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
compile at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
compile at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
normpath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
abspath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
abspath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
__init__ at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
jfptr___init___46815 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
jl_module_run_initializer at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
_julia_init at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
main at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/julia (unknown line)
__libc_start_main at /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libc.so.6 (unknown line)
_start at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/julia (unknown line)
Edit 2: seems this error has nothing to do with virtualgl but is instead a Nix/Julia error (doesn’t happen on non-nix julia):
❯ export LD_PRELOAD="/nix/store/wx4rf2zp434dgfin0c0n0b3g7c9f7r56-virtualgl-lib-2.6.5/lib/libdlfaker.so:/nix/store/wx4rf2zp434dgfin0c0n0b3g7c9f7r56-virtualgl-lib-2.6.5/lib/libvglfaker.so"
❯ julia
fatal: error thrown and no exception handler available.
#<null>
jl_errorf at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_load_dynamic_library at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_get_library_.part.0 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jl_load_and_lookup at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
jlplt_pcre2_compile_8_7047 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
compile at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
compile at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
normpath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
abspath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
abspath at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
__init__ at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
jfptr___init___46815 at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/lib/julia/sys.so (unknown line)
jl_module_run_initializer at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
_julia_init at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/../lib/libjulia.so.1 (unknown line)
main at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/julia (unknown line)
__libc_start_main at /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libc.so.6 (unknown line)
_start at /nix/store/lqyhf3ympk18f41prmhaxd450xpmp8h9-julia-1.5.2/bin/julia (unknown line)
@cstich do you have any ideas by chance? Saw you added this comment in julia derivation:
# Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
# as using a wrapper with LD_LIBRARY_PATH causes segmentation
# faults when program returns an error:
# $ julia -e 'throw(Error())'
I think I’m seeing a segfault related to LD_PRELOAD, but am a bit confused as to what is causing this since I don’t see the same Julia behavior on ubuntu. Appreciate any thoughts!
Sorry for the late reply. I missed this one. I don’t really remember why exactly I wrote this comment/ I am not sure I wrote it in the first place. Sorry for not being more helpful.