-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia loading Julia's libstdc++ instead of system, causes inscrutable errors #198
Comments
What version of GLFW.jl are you using? |
The Manifest lists GLFW_jll version = "3.3.2+0" and GLFW version = "3.2.2". The GLFW from the repos is "glfw-x11 3.3.2-1". |
Is there any way we can fix this? Seems like quite a few people run into this! |
There is this issue: JuliaLang/julia#34276 |
Is there a MWE to reproduce the error? I have GCC v9.3.0 with |
I think you need an AMD card, since this seems to be a radeon driver issue |
Yes, I have an AMD card, and it is the radeon driver specifically that can't be loaded while Julia's included libstdc++ is loaded. |
It's not just radeon; I've just been hit by this and I've got an Intel integrated GPU with the iris driver. Thankfully now works with this fix 😄 |
I have this issue for testing Makie (Ubuntu 20.04, Julia 1.4, NVIDIA @weech thanks for posting the work around. I'm new to Julia. Can you please elaborate on your work around.
Thanks. |
Hi, |
@weech thanks for the quick reply. I tried doing just step 1 but unfortunately it still does not work. When I try
FYI when I run
Any suggestions? Thanks. (fyi @SimonDanisch, still stuck trying to set-up Makie) |
I think this might be a separate problem? I haven't seen the "No matching fbConfigs or visuals found" error before, and there's no error saying it couldn't load your driver. Can you compile and run the following program to test that the system GLFW is working? It's just a hello world app from the GLFW website that creates a window with the title "Hello World". Since you're on Ubuntu you might have to install the dev libraries and tweak where the headers are. I compiled it with #include <GL/gl.h>
#include <GLFW/glfw3.h>
int main(void)
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */
glClear(GL_COLOR_BUFFER_BIT);
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
}
glfwTerminate();
return 0;
} |
@weech thanks I think it worked, if the picture below is correct. I followed these steps:
How do I run julia with that environment variable |
After running
I still get nothing after running |
I upgraded to |
I got
Unfortunately proposed walk-around sounds a bit hacky, as in my opinion replacing stdc++ with other version for which Julia's binaries weren't build although might solve GLMakie build problem, it may as well cause other issues. What worked for me instead (Nvidia users only)
|
@jayschwa, you think we could improve the situation, by loading the systems glfw library? try
using GLFW_jll
catch e
@warn "BinaryBuilder GLFW doesn't load see issue #198, trying to load system GLFW" exception=e
try
const libglfw = Libdl.open("...") # I kinda forgot how to do this cleanly, but shouldn't be to hard to figure out
catch e
@error "Could not load system GLFW, make sure its installed (show some tips)" exception=e
end
end Anyone running into this issue care to try out such a solution? |
I gave roughly that a try, and it didn't help anything. I replaced global libglfw_handle = Libdl.dlopen("/usr/lib/libglfw.so")
const libglfw = "libglfw" and ran the tests, and it gave the normal GPU driver errors. By the way, this issue was opened in 1.3 times, but it's still a problem with 1.5.1. |
Ok, so bumping this issue seems to be our only hope: |
An alternative is building Julia from source, that should use system libstdc++ as far as I know 🙃 |
Is it possible to use the |
I've experienced the same problems on openSUSE Tumbleweed and Julia 1.7.2. After a bit of fiddling around, I've updated Julia to 1.7.3 and removed the Edit: It worked once. After that it threw the same errors as before. I seriously have no idea why that's the case. Anyways, deleting |
It helped me to remove the symbolic link indeed, as it was referencing an older version of libstdc++; If you're in Ubuntu, have a look at |
I'm getting
Not sure why the triple error message, |
Do you have the file |
Er... no, that would have been a good thing to check.
This is on pop!_os (ubunty jammy) |
@giordano so should I delete that link instead? |
So, following this SO answer, I get
So I did But I noticed that the variable was not set in
That file is there in |
Careful with As for the error message: what is your graphics card ? BTW there are others with a similar problem... |
Ah, I actually have this same problem on my laptop and the remote server I use. This makes me think it might be an OS thing, rather than graphics thing, since one is nvidia and one is AMD. Both are running pop!_os (ubuntu jammy)
|
Same problem with Debian testing with GLMakie parabola test gives: libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri) with iris_dri.so and and swrast_dri.so present in /usr/lib/x86_64-linux-gnu/dri. glwgears runs without problems. export LD_PRELOAD=/usr/lib64/libstdc++.so.6 before calling julia |
a precision : julia 1.7.3 |
On Arch, this happens for me everytime a Julia version goes stale, i.e. when I update Unfortunately, even recompiling Julia does not fix the issue because it will not pick up the newer Setting |
A fix is planned in JuliaCI/julia-buildkite#205, where the newest libstdc++ out of (bundled, system) is chosen at startup time. |
I've run into this problem as well. Pop OS (Ubuntu variant). |
Hopefully this will be fixed by JuliaLang/julia#46976 |
Fixed forever?? ❤️ Jeez, 1.9 looks like it will be an amazing release for Makie :) |
Yes, until gcc will completely break the ABI |
Maybe this can be marked as closed now that Julia 1.9-beta2 is out? |
JuliaLang/julia#46976 is also in Julia v1.8.4 |
Hi,
GLFW.jl is affected by the outdated libstdc++ issue. It's a problem that has been affecting several projects and has been documented in at least one Discourse thread. What happens is that Julia ships with an old version of libstdc++, and something in the linking process fails on systems that expect a newer version of libstdc++. If you run a GLFW.jl function with the
LIBGL_DEBUG=verbose
environment variable set, you get an error message likelibGL: MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /home/alex/pkgs/julia-1.3.0/bin/../lib/julia/libstdc++.so.6: version
GLIBCXX_3.4.26' not found (required by /usr/lib/libLLVM-9.so)`. The libstdc++ shipped with Julia 1.3 is version 3.4.24.There's an open issue on the main Julia repo. Other packages like RCall have been adding notices in their docs with workarounds in the meantime. The error message GLFW.jl gives right now is especially lacking. Without the
LIGBL_DEBUG=verbose
, on my machine it is:The workaround right now is to:
julia-1.3.0/lib/julia/libstdc++.so.6
whereis libstdc++
julia-1.3.0/lib/julia-libstdc++.so.6
usingln
.I think it'd be worthwhile to put a notice up on the README that this issue is occurring. I encountered the problem while trying to use Makie, and this repo was one of the first places I went to debug it since the error comes from this library. It's probably worthwhile to put a notice up in Makie too.
The text was updated successfully, but these errors were encountered: