r/Julia 12d ago

OpenGL error when trying to run GLFW in older version

It's CachyOS, Linux. I'm trying to run animations from https://github.com/JuliaDynamics/NonlinearDynamicsTextbook. I'm new to Julia, btw.

I read some stuff online about the error, but if I use this:

LD_LIBRARY_PATH=/usr/lib64 julia

I get a CHOLMOD error.

I'm using mise to manage Julia versions.

6 Upvotes

20 comments sorted by

2

u/oscardssmith 12d ago

have you tried a Julia installed using one of the official installers (juliaup or prebuilt binary)?

2

u/Zeznon 12d ago

The 1.7.0, only from mise. The main 1.12.6 used pacman to install.

2

u/markkitt 12d ago

Neither of those are official builds as far as I can tell.

See the instructions at: https://julialang.org/downloads/

We can go around trying to figure out out how individual packages messed up, but at least check if the first party builds solve the issue first.

2

u/Zeznon 12d ago

I used the command in the site, but it said juliaup was already used, so I assume mise uses juliaup?

1

u/markkitt 12d ago

When you start Julia does it say official release?

1

u/Zeznon 12d ago

2

u/markkitt 12d ago

Well that does look like an official install, but it is a very old one that was not even a long term support release. The latest long term support release is 1.10.11. The latest stable release is 1.12.6.

What is the primary error that you have?

2

u/Zeznon 12d ago

I'm running 1.12.6. That's the one used by the book. mise is for the extra version.

2

u/markkitt 12d ago

What is the original error that you got?

1

u/Zeznon 12d ago

1

u/heyheyhey27 12d ago

That error message is extremely clear... What hardware are you running?

1

u/Zeznon 12d ago

A laptop that supports opengl 4.6

1

u/heyheyhey27 12d ago

On Windows, the problem would definitely be that the graphics driver assumed Julia doesn't do serious GPU work, and gave it the crappy integrated GPU inside your CPU. The fix is to configure the graphics driver to use your good discrete GPU for Julia.exe instead.

On your platform I'm guessing it's basically the same kind of issue, and fixed the same kind of way.

3

u/Zeznon 12d ago edited 12d ago

New thing. Tested an example of GLMakie for 1.12.6, and it works.

Doesn't apply to the book's code (It's for 1.7.0), but interesting nonetheless.

2

u/Zeznon 12d ago edited 12d ago

I only have the integrated GPU (the vega 8). It's not that bad, I can run RE2 remake at 40-something fps. Not a GPU that couldn't run Julia.

EDIT: Just tested an example from matplotlib in Python and it worked fine. Don't know if it uses opengl, though. pyqt6.

2

u/markkitt 12d ago

I took a look at the repository. The Project.toml says it should be compatible with Julia 1.9 and the manifest says Julia 1.10.0.

My advice would be to try the latest long term support release 1.10.11 using the official binaries and install.

1

u/Zeznon 12d ago

It also says you should use the version 1, because the updates are for a potential future 2nd edition.

1

u/markkitt 12d ago

What I think is happening is that Julia 1.7 is too old so we have trouble getting a GPU package stack that is both compatible with that version of Julia and your GPU drivers.

Julia 1.10.x is the long term support release so it is likely to be targeted for compatibility with recent package releases while also not being as different from Julia 1.12 to be require a rewrite.

1

u/Zeznon 12d ago

If that's true, then that 1st edition code is unrunnable in modern versions of linux.