JuliaGL / GLFW.jl

Julia interface to GLFW, a multi-platform library for creating windows with OpenGL contexts and managing input and events.
http://www.glfw.org/
MIT License
138 stars 32 forks source link

No GLXFBConfigs returned #194

Open jpsamaroo opened 4 years ago

jpsamaroo commented 4 years ago

The switch to the new JLL packages seems to cause problems for me and GLFW.jl. When running tests on GLFW master:

  Updating `/tmp/jl_5BPbJ4/Project.toml`
  [f7f18e0c] + GLFW v3.2.1 [`~/.julia/dev/GLFW`]
  [8dfed614] + Test
  Updating `/tmp/jl_5BPbJ4/Manifest.toml`
  [f7f18e0c] + GLFW v3.2.1 [`~/.julia/dev/GLFW`]
  [8ba89e20] + Distributed
  [8dfed614] + Test
Running sandbox
Status `/tmp/jl_5BPbJ4/Project.toml`
  [f7f18e0c] GLFW v3.2.1 [`~/.julia/dev/GLFW`]
  [0656b61e] GLFW_jll v3.3.0+1
  [8dfed614] Test
3.3.0 X11 GLX EGL OSMesa clock_gettime evdev shared
ERROR: LoadError: LoadError: GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned
Stacktrace:
 [1] _ErrorCallbackWrapper(::Int32, ::Cstring) at /home/jpsamaroo/.julia/dev/GLFW/src/callback.jl:43
 [2] CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /home/jpsamaroo/.julia/dev/GLFW/src/glfw3.jl:487 (repeats 3 times)
 [3] top-level scope at /home/jpsamaroo/.julia/dev/GLFW/test/windowclose.jl:3
 [4] include(::String) at ./client.jl:439
 [5] top-level scope at /home/jpsamaroo/.julia/dev/GLFW/test/runtests.jl:13
 [6] include(::String) at ./client.jl:439
 [7] top-level scope at none:6
in expression starting at /home/jpsamaroo/.julia/dev/GLFW/test/windowclose.jl:3
in expression starting at /home/jpsamaroo/.julia/dev/GLFW/test/runtests.jl:12

Julia versioninfo:

julia> versioninfo()
Julia Version 1.4.0-DEV.653
Commit f6ca73ad0b (2019-12-22 09:03 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, haswell)
Environment:
  JULIA_REVISE_POLL = 1
  JULIA_LOAD_PATH = @dev:@:@v#.#:@stdlib
  JULIA_PKG3_PRECOMPILE = 1

OS is Gentoo Linux x64 Output of glxinfo: https://paste.sr.ht/%7Ejpsamaroo/bc3362d8f2de7fd764b3a058667e672b2463df38

jpsamaroo commented 4 years ago

Note that this occurs on two of my Gentoo laptops (both have Intel GPUs), however I can pin GLFW to v3.1.0 (before the JLLs) and the issue goes away.

jpsamaroo commented 4 years ago

I should also mention that I'm running on Wayland, however XWayland is also running and available (and Xorg-using programs work fine otherwise).

luap-pik commented 4 years ago

I run into a the same error message with GLFW v3.2.2 on Julia v1.3.0 (not using Wayland). The background is that I actually want to add Makie.jl. However, pinning GLFW to v3.1.0 solves the problem for me too.

(v1.3) pkg> add GLFW
(v1.3) pkg> build GLFW
julia> using GLFW
julia> window = GLFW.CreateWindow(640, 480, "GLFW.jl")
ERROR: GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned
Stacktrace:
 [1] _ErrorCallbackWrapper(::Int32, ::Cstring) at /home/paul/.julia/packages/GLFW/g1nX6/src/callback.jl:43
 [2] CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /home/paul/.julia/packages/GLFW/g1nX6/src/glfw3.jl:487 (repeats 3 times)
 [3] top-level scope at REPL[4]:1

Output of glxinfo:

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 Mesa 18.0.5
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

OS: Linux Mint 4.15.0-76-generic #86~16.04.1-Ubuntu

jpsamaroo commented 4 years ago

So I briefly investigated this with strace, and I noticed a TON of failing openat() calls like the following:

openat(AT_FDCWD, "/home/jpsamaroo/.julia/artifacts/3972ca006494ebc42af5d795a626fc324f15e313/lib/libGLX_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or direc
tory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 19
fstat(19, {st_mode=S_IFREG|0644, st_size=253502, ...}) = 0
mmap(NULL, 253502, PROT_READ, MAP_PRIVATE, 19, 0) = 0x7facfbb98000
close(19)                               = 0
openat(AT_FDCWD, "/lib64/libGLX_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libGLX_mesa.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7facfbb98000, 253502)          = 0
openat(AT_FDCWD, "/home/jpsamaroo/.julia/artifacts/3972ca006494ebc42af5d795a626fc324f15e313/lib/libGLX_indirect.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or d
irectory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 19
fstat(19, {st_mode=S_IFREG|0644, st_size=253502, ...}) = 0
mmap(NULL, 253502, PROT_READ, MAP_PRIVATE, 19, 0) = 0x7facfbb98000
close(19)                               = 0
openat(AT_FDCWD, "/lib64/libGLX_indirect.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libGLX_indirect.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7facfbb98000, 253502)          = 0
getpid()                                = 15619
poll([{fd=17, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=17, revents=POLLOUT}])
writev(17, [{iov_base="\226\23\3\0\0\0\0\0\366 \0\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
poll([{fd=17, events=POLLIN}], 1, -1)   = 1 ([{fd=17, revents=POLLIN}])

(the above lines repeat for maybe 50 iterations, and appear to be identical). The above-referenced libraries do not exist in the artifact, as expected.

I suspect that a library somewhere (maybe one being pulled in from the system) is trying to load libraries according to a system-specific list.

jpsamaroo commented 4 years ago

Looks like upgrading my system's Mesa from 18.x to 19.3.5 fixed this issue for me, probably because it now ships libGLX_mesa.so. @luap-pik can you try upgrading your system's mesa to 19.x? If that doesn't work, please show run julia under strace -o strace.log julia and post a gist/pastebin of strace.log.

luap-pik commented 4 years ago

OK, thanks! I will try to upgrade Mesa. Also, I created a gist of running strace on using GLFW; window = GLFW.CreateWindow(640, 480, "GLFW.jl"); for your comparison. (I now have Julia 1.4.1 but the error message is still the same.)

jpsamaroo commented 4 years ago

The gist you linked doesn't seem to contain the calls I was expecting to see. Can you do an strace of a larger piece of code with more GLFW calls? I tested with CImGui.jl's examples/demo.jl.

luap-pik commented 4 years ago

Sure, I updated the gist

wehlutyk commented 3 years ago

I'm running into this problem on Guix, with julia 1.5.2:

(@v1.5) pkg> activate .
 Activating environment at `~/Code/Research/tmp/Project.toml`

(tmp) pkg> build GLFW

julia> using GLFW

julia> window = GLFW.CreateWindow(640, 480, "GLFW.jl")
ERROR: GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned
Stacktrace:
 [1] _ErrorCallbackWrapper(::Int32, ::Cstring) at /home/sl/.julia/packages/GLFW/CBo9c/src/callback.jl:43
 [2] CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /home/sl/.julia/packages/GLFW/CBo9c/src/glfw3.jl:499 (repeats 3 times)
 [3] top-level scope at REPL[4]:1

Here is Project.toml, Manifest.toml, strace.log. Also:

$ glxinfo | grep OpenGL                                                                                                                                                                             
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4400 (HSW GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 20.0.8
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

and:

julia> versioninfo()
Julia Version 1.5.2
Commit 539f3ce943* (2020-09-23 23:17 UTC)
Platform Info:
  OS: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)
Environment:
  JULIA_LOAD_PATH = :
  JULIA_DEPOT_PATH = :/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/:/home/sl/.guix-profile/share/julia/

Any idea where this comes from?

jpsamaroo commented 3 years ago

After some thinking, I think I understand the issue:

The reason this works for some people is likely due to Libglvnd finding a system-provided libGLX implementation in /usr/lib{64}. For me on an Alpine system, Mesa isn't built with glvnd support, so I don't have libGLX_mesa.so. It's probably a similar situation for other distros too.

@giordano unless it's possible to make GLFW use a different approach (EGL, etc.), then I think we'll need to build Mesa for Linux and enable glvnd support. What do you think?

giordano commented 3 years ago

@giordano unless it's possible to make GLFW use a different approach (EGL, etc.), then I think we'll need to build Mesa for Linux and enable glvnd support. What do you think?

I think I know zero about all this stuff :slightly_smiling_face: Is https://github.com/JuliaPackaging/Yggdrasil/pull/3192 somewhat relevant? Read all the discussion there

theottm commented 2 years ago

Having the same error in Guix. Downgrading to 3.1.0 is not an option since it fails to build for because of some cmake error.

pkg> test GLFW 3.3.5 X11 GLX EGL OSMesa clock_gettime evdev shared ERROR: LoadError: LoadError: GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned

I have a qualitatively different strace output however. There is no mention of mesaor glx. I can compile and run a GLFW/OpenGL minimal code written in C however so the problem can't come from this side.

I have other problems with some julia packages in Guix I guess problem comes from the way they operate together. I know that in guix some linking functions differently but I have no understanding of this. Anyway I guess julia is somehow not finding things it need to work properly. So I'll ask in the guix community if there are some required configs I missed.

@wehlutyk did you make any progress on this ?

wehlutyk commented 2 years ago

Unfortunately no, and I haven't tried again over the last year. @theottm thanks for reviving this though!

jonas-schulze commented 2 years ago

I'm hitting the same problem when trying to use/install GLMakie inside an apptainer environment. I didn't follow all the discussion, e.g. on Yggdrasil, but has there been progress on this?

I tested

Julia Version 1.6.7
Commit 3b76b25b64 (2022-07-19 15:11 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, icelake-client)
Environment:
  JULIA_GPG = 3673DF529D9049477F76B37566E3C7DC03D6E495
  JULIA_PATH = /usr/local/julia
  JULIA_VERSION = 1.6.7

and

Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, rocketlake)
  Threads: 1 on 16 virtual cores
Environment:
  JULIA_GPG = 3673DF529D9049477F76B37566E3C7DC03D6E495
  JULIA_PATH = /usr/local/julia
  JULIA_VERSION = 1.8.1
  LD_LIBRARY_PATH = /.singularity.d/libs

running inside apptainer (e.g. apptainer run docker://julia) using a fresh temporary Pkg environment. Pinning GLFW to v3.1.0 did not work for me, that gave some odd cmake error, here is the output for julia v1.8:

julia> Pkg.build("GLFW")
    Building CMake → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/50a8b41d2c562fccd9ab841085fc7d1e2706da82/build.log`
    Building GLFW ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c1dd609f16d3d791a5caf9064b4fa3e1478d03e5/build.log`
ERROR: Error building `GLFW`: 
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/jschulze/.julia/packages/GLFW/e257h/deps/usr/downloads/src/build/CMakeFiles/CMakeOutput.log".
[ Info: Unpacking /home/jschulze/.julia/packages/GLFW/e257h/deps/usr/downloads/src.tar.gz into /home/jschulze/.julia/packages/GLFW/e257h/deps/usr/downloads/src
┌ Warning: 
│ 
│ ================================================================
│ ================================================================
│ === Building GLFW has failed. Most common problem is,        ===
│ === that you don't have x-org installed.                     ===
│ === You can install it via: `sudo apt-get install xorg-dev`  ===
│ ================================================================
│ ================================================================
└ @ Main ~/.julia/packages/GLFW/e257h/deps/build.jl:56
ERROR: LoadError: failed process: Process(`/home/jschulze/.julia/packages/CMake/ULbyn/deps/usr/bin/cmake -DBUILD_SHARED_LIBS=on -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF ..`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:480
 [3] run
   @ ./process.jl:477 [inlined]
 [4] (::var"#5#6")()
   @ Main ~/.julia/packages/GLFW/e257h/deps/build.jl:51
 [5] cd(f::var"#5#6", dir::String)
   @ Base.Filesystem ./file.jl:112
 [6] top-level scope
   @ ~/.julia/packages/GLFW/e257h/deps/build.jl:43
 [7] include(fname::String)
   @ Base.MainInclude ./client.jl:476
 [8] top-level scope
   @ none:5
in expression starting at /home/jschulze/.julia/packages/GLFW/e257h/deps/build.jl:21
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
  [2] (::Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String})()
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1060
  [3] withenv(::Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, ::Pair{String, String}, ::Vararg{Pair{String}})
    @ Base ./env.jl:172
  [4] (::Pkg.Operations.var"#107#112"{String, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.PackageSpec})()
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1619
  [5] with_temp_env(fn::Pkg.Operations.var"#107#112"{String, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.PackageSpec}, temp_env::String)
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1493
  [6] (::Pkg.Operations.var"#105#110"{Dict{String, Any}, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1582
  [7] mktempdir(fn::Pkg.Operations.var"#105#110"{Dict{String, Any}, Bool, Bool, Bool, Pkg.Operations.var"#66#73"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec, String}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:764
  [8] mktempdir(fn::Function, parent::String) (repeats 2 times)
    @ Base.Filesystem ./file.jl:760
  [9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project; preferences::Dict{String, Any}, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1540
 [10] build_versions(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}; verbose::Bool)
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1041
 [11] build(ctx::Pkg.Types.Context, uuids::Set{Base.UUID}, verbose::Bool)
    @ Pkg.Operations /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:898
 [12] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; verbose::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:1024
 [13] build(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
 [14] build(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
 [15] #build#99
    @ /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
 [16] build
    @ /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
 [17] #build#98
    @ /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
 [18] build(pkg::String)
    @ Pkg.API /usr/local/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:143
 [19] top-level scope
    @ REPL[5]:1
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RKL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
apraga commented 1 year ago

Somehow, I also have this issue the nix package julia and julia-bin but not using the official binaries (on gentoo).

vale981 commented 1 year ago

try launching julia with

> LD_LIBRARY_PATH=/run/opengl-driver/lib/ julia
AtilaSaraiva commented 1 year ago

try launching julia with

> LD_LIBRARY_PATH=/run/opengl-driver/lib/ julia

This solved the problem for me on NixOS.

bs-lab commented 1 year ago

Any progress on this? I'm get the same error with GLFW.jl v3.4.1 using Julia 1.9.2 on RHEL 9.

julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 96 × AMD EPYC 7643 48-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
  Threads: 1 on 96 virtual cores
Environment:
  JULIA_EDITOR = nvim

and

$ glxinfo | grep OpenGL
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 22.3.0
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 22.3.0
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.3.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

UPDATE: Success! Or at least a hacky workaround that someone else might find useful. Launching Julia with

LD_LIBRARY_PATH=/usr/lib64 julia

allows GLFW.jl to work, but a subsequent installation of GLMakie (my ultimate goal) does not, presumably due to a conflict in one or more of the numerous lib files it finds in /usr/lib64. Through trial & error, I determined that /usr/lib64/libGLX.so.0 is all that GLFW.jl needs to dynamic load, so I made a directory with a link to just that one file and launch Julia with

LD_LIBRARY_PATH=/path/to/new/folder/containing/libGLXfile julia
Antoinemarteau commented 3 weeks ago

try launching julia with

> LD_LIBRARY_PATH=/run/opengl-driver/lib/ julia

This also works for me on NixOS, but doesn't work if I set this variable inside julia with

ENV["LD_LIBRARY_PATH"] = "/run/opengl-driver/lib/"

even if I do that before using GLFW. @vale981 @AtilaSaraiva, do you see any way to make this work from julia ? (preferably from startup.jl ...)

jariji commented 3 weeks ago

@Antoinemarteau In NixOS you can make an overlay with wrapProgram to set LD_LIBRARY_PATH for your $out/bin/julia so julia will always be started with that variable.

Antoinemarteau commented 3 weeks ago

Thanks for the idea. Using this looks a bit too involved for my usage, I just made an alias...

shellAliases.ju = "LD_LIBRARY_PATH=/run/opengl-driver/lib/ julia";