GLIBCXX missing when compiling julia 1.6.2

I have been compiling Julia without any problems over the last few years, and suddenly it is not working anymore. I just upgraded my fedora version so I assume it is connected to that, but I don’t really understand how.

Running make in the 1.6.2 branch I get

...
    JULIA usr/lib/julia/corecompiler.ji
ERROR: Unable to load dependent library /local/home/albheim/git/julia/usr/bin/../lib/libjulia-internal.so.1
Message:/local/home/albheim/git/julia/usr/bin/../lib/libstdc++.so.6: version 'GLIBCXX_3.4.29' not found (required by /local/home/albheim/git/julia/usr/bin/../lib/libjulia-internal.so.1)
make[1]: *** [sysimage.mk:61: /local/home/albheim/git/julia/usr/lib/julia/corecompiler.ji] Error 1
make: *** [Makefile:82: julia-sysimg-ji] Error 2

where running strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX_3.4.29 does return a value, but strings ~/git/julia/usr/lib/libstdc++.so.6 | grep GLIBCXX_3.4.29 does not. But why would Julia request 3.4.29 if it ships libstdc++ that does not contain that version, is it my system messing with this somehow?

Also, I can still compile the 1.7 beta without problems it seems.

A colleague suggested this was because my compiler is too new for the library that julia supplies which I think might be the more correct interpretation of the error. It is not julia that wants 3.4.29, but my local compiler and julia tries to supply an older version of the library.

By deleting the usr/lib/libstdc++.so.6 and symlinking in the one in my system it seems to work. Not sure if it is a good idea…

Thanks to https://github.com/JuliaLang/julia/pull/41645, which will be backported to the v1.6 branch: Backports for julia-1.6.3 by KristofferC · Pull Request #41554 · JuliaLang/julia · GitHub

It happened to me in the last Fedora. I just copied libstdc++.so.6 from /us/lib64 to usr/lib and it worked as expected.

1 Like