Unable to launch julia 1.6 - SSL and glibc issues

I recently installed Julia 1.6 on a CentOS 7 cluster, but am unable to run it.

[affans@hpc ~]$ julia
ERROR: Unable to load dependent library /home/affans/julia-1.6.1/bin/../lib/julia/libjulia-internal.so.1
Message:/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/affans/julia-1.6.1/bin/../lib/julia/libjulia-internal.so.1)

From the official 1.6 launch thread and some help on Slack, I was able to solve this issue. Turns out glibc libraries on the cluster are version 2.17 but Julia apparently requires 2.22. The issue is with the libstdc++.so.6 library. I fixed this by running

# for julia 1.6, the glibc libraries are too old so make sure to use the julia shipepd ones
export LD_LIBRARY_PATH=/home/affans/julia-1.6.1/lib/julia:$LD_LIBRARY_PATH

This made everything work and it was great for a few hours… until I tried git clone and it failed with a BADCERT_NOT_TRUSTED error. Digging a bit more, it wasn’t a git issue, but a more generic issue with ssl certificates… for example:

[affans@hpc ~]$ curl https://julialang.org/
curl: (60) Cert verify failed: BADCERT_NOT_TRUSTED
More details here: http://curl.haxx.se/docs/sslcerts.html

If I comment out the LD_LIBRARY_PATH export (so it goes back to system libraries), all the ssl errors go away. So why is it that when I use the Julia’s shipped version of glibc libraries, it clashes?

This stuff is way out of my domain so any help would be sincerely appreciated.

This is not correct, official binaries of Julia for x86_64 platforms require glibc 2.12.2, which is way older than what you have in your system. The library which is giving you troubles is libstdc++, not glibc.

I see. So what does the symbol GLIBCXX_3.4.20 mean? And why does switching to the Julia library break ssl?

Some extra information. The libstdc++.so.6 in my system (/usr/lib64) has these “strings” (not sure what this means). I don’t see GLIBC_3.4.20 in here… but still, I am confused to why other things are breaking if I switch to the Julia library. Is there a way to fix this? Maybe building from source?

[affans@hpc lib64]$ strings libstdc++.so.6 | grep GLIBC

That indicates the minimum version of libstdc++ required to load the library: ABI Policy and Guidelines. You system’s libstdc++ gets up to 3.4.19, which corresponds to gcc 4.8.3. BTW, since this is on a cluster you likely have a way to load a module with a more recent gcc toolchain, the default one is often fairly old. Clearing up LD_LIBRARY_PATH before starting Julia is a good idea anyway.

I recommend editing LD_LIBRARY_PATH only to run Julia, don’t modify the rest of the system just for Julia.

Well, if I get rid of the LD_LIBRARY_PATH (where I append the Julia folder first in the order), that’s when the ssl issues start. As soon as I comment that now, the ssl issues go away. So it does seem that when using to Julia’s libstdc++ has something to do with it.

Is there a way to do:

I recommend editing LD_LIBRARY_PATH only to run Julia, don’t modify the rest of the system just for Julia.

I mean I have

export LD_LIBRARY_PATH=/home/affans/julia-1.6.1/lib/julia:$LD_LIBRARY_PATH

which makes Julia work, but like I said, it somehow clashes with ssl certificates. It would be nice for Julia to use it’s own libstdc++ while the rest of the system uses whatever is there is /usr/lib64

Start Julia with


and that’s it.

1 Like

Oh! That works. So I just commented out the entire export LD_LIBRARY_PATH from my bashrc file. Not sure why I had it in there (maybe for some other program? will have to see what breaks).

Okay, so when LD_LIBRARY_PATH = "" , and I type in julia, what version of libstdc++ does it use? Does it use the system one (unlikely since the minimum version is only 3.4.19) or does it use the one that itself shipped with? I am guessing the latter.

And ofcourse, other programs that use libstdc++ use the system one… since how would they be aware of the Julia one (unless I append it to LD_LIBRARY_PATH which I was doing and it was messing things up).

Ah, 30 minutes to learn linux… a lifetime to master.

The latter. Official binaries of Julia v1.6 come with libstdc++.so.6.0.26, which corresponds to GCC 9.1.

1 Like