Using/workaround for unsupported/EOLd operating systems, e.g. CentOS 6. Was: Test julia basic functionality

Hi,

Thanks a lot. I will do the second part first.

@keshav Could you resolve the problem in the end?

Now I have run into the same issue: I want to upgrade the julia installation (from 1.8 to current 1.10) on our workstation in order to use some packages which need the newer julia version. The workstation is on CentOS 6.10, with glibc 2.12. I have no root rights (which is probably better for the safer).

To update julia, I downloaded juliaup via
curl -fsSL https://install.julialang.org | sh

and the automatically started installation (with default options) did not throw any errors. However, trying to run julia I get the above mentioned error

/home/AAA/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia: /lib64/libc.so.6: version `GLIBC_2.14’ not found (required by /home/AAA/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/…/lib/libjulia.so.1.10)

Unfortunately I could not find any official statement of glibc requirement (even in the documentation), however above in this thread I saw 2.17, so I manually installed glibc 2.17 into my local home directory via

$ mkdir glibc217
$ cd glibc217
$ wget http://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
$ tar -zxvf glibc-2.17.tar.gz
$ mkdir glibc-build
$ mkdir glibc-installation
$ cd glibc-build
$ ../glibc-2.17/configure --prefix=/home/AAA/glibc217/glibc-installation/ #very long output, but I dont see any errors
$ make -j16 # again long output, but no errors
$ make install -j16 # another long output, but no errors

This did not resolve the issue, as I get the same error message as above when trying to run julia. As far as I understand I need to tell either tho whole system (by changing the LD_LIBRARY_PATH; but this is not recommended) or at least julia to use the new library. Hence I did the above mentioned

$ readelf -d .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia | grep RUNPATH # 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib:$ORIGIN/../lib/julia]
$ ln -s /home/AAA/glibc217/glibc-installation/lib/libc.so.6 .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/lib/julia/
$ ldd .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia
#ldd .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia
#linux-vdso.so.1 =>  (0x00007ffdf1ec0000)
#libdl.so.2 => /lib64/libdl.so.2 (0x000000350a800000)
#libpthread.so.0 => /lib64/libpthread.so.0 (0x000000350b000000)
#libc.so.6 => /home/AAA/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/../lib/julia/libc.so.6 (0x00007f3a3a1d3000)
#libjulia.so.1.10 => /home/AAA/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/../lib/libjulia.so.1.10 (0x00007f3a3a765000)
#/lib64/ld-linux-x86-64.so.2 (0x00007f3a3a583000)

So as far as I understand the linking was successful (at least it does not complain about not having access to glicb 2.14). Attempting to run julia however still produces an error, which I don’t understand:

$ julia
#/home/AAA/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument

I’m sorry, I am not an expert on Unix systems and installation procedures. However it seems a somewhat widespread problem (I agree though that the OS is outdated), and I think it would be nice to have a solution to it. Maybe there is already a misconception, and julia does not need a newer glibc version? Any help is much appreciated.

CentOS is no longer supported (EOLed) so you likely shouldn’t be using it… (I guess you know… maybe have issue with upgrading), your issue would be fixed by going to CentOS 7 even, though seemingly better to at least 8 (or other distro).

I read here now that Julia requires Glibc 2.17 (like some other software e.g. Firefox), so it’s not an unusual requirement (maybe some older Julia only needs your version, e.g. Julia 6 LTS, though I wouldn’t recommend it, nor any older; but temporarily of enough?). Firefox lists requirements of e.g. Glibc and more (e.g. the kernel), but Julia only kernel requirement. I suppose they’re not asking for much, and should make almost zero effort in supporting older, EOLed. At best document Glib requirement, and maybe e.g. “CentOS 6 and older not supported”.

Some info on updating only Glibc (to newer, but not new enough, info might though translate to 2.17):

Julia needs:
Linux (Glibc) 2.6.24+

Linux (Musl) 2.6.39+

I tried at some point installing Musl on my Glibc system, in addition. It seemingly worked, but I’m not saying it’s better than more recent Glibc install, i.e. two installed… At least it might work for CentOS 6, since it has a new enough kernel.

Yes, it’s seemingly irresponsible (for security, internet connected; at least for any other than a secured HPC cluster). Julia wants to support HPC/research, but I don’t think it should support that old, rather let users upgrade or do workarounds:

https://docs.sylabs.io/guides/latest/user-guide/introduction.html#legacy-code-on-old-operating-systems

Legacy code on old operating systems

Similar to the above example, while this is less than ideal it is a fact of the research ecosystem. As an example, I know of one Linux distribution which has been end of life for 15 years which is still in production due to the software stack which is custom built for this environment. SingularityCE has no problem running that operating system and application stack on a current operating system and hardware.

Hi @physh,

I was not able to run julia on CentOS 6.7 . On contacting the sys admin, he gave me access to a new cluster (fortunately or unfortunately) which was completely updated. I still have to do, what kerim suggested.

On your issue, the julia seems to be linked correctly. The problem (as I understand) is different. It was discussed in stackexchange here. The point given there is

The most likely cause of the error is a mismatch between /lib64/ld-linux-x86-64.so.2 and ./libdl.so.2 . Removing the 5 libraries listed above from this directory should make the application work.

Hope this helps. I would definitely like to know if julia finally works on your system.

Thank you for your answer @keshav , I’m happy you found a solution for yourself.

Unfortunately, your link did not help. If I understand correctly, the problem for them was that some glibc files that were inconsistent with the system files were packed into some application. Hence removing them from that “packing” (to be honest I dont really know what that means) seems to have resolved their issue.

In our case the problem is more that our application (Julia) needs newer glibc files than the system can support, hence we try to provide them additionally. I think removing those inconsistencies will just lead to the original error message that glibc 2.14 is missing.

I have the feeling that I would need to do

$ readelf -d .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia | grep RUNPATH # 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib:$ORIGIN/../lib/julia]
$ ln -s /home/AAA/glibc217/glibc-installation/lib/libc.so.6 .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/lib/julia/
$ ldd .julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia

for more files, however after chaning this file I receive another error message (see above) and I cannot figure out if there are more problematic files that need relinking.

For now, I realized that I can upgrade to Julia 1.9.2 (which is the latest release that works with glibc 2.12 accoring to an answer at julialang’s github), which is new enough for my packages to run.

Overall, I am a bit unhappy that the underlying problem remains unresolved, but I am not a unix expert and therefore dont want to use more time on such an issue (maybe you can relate :slight_smile: ).

1 Like

Thank you for your reply. I agree that the versions available to me are old, and I dont request Julia to support them. Nevertheless I thought there might at least be some kind of “semi-official” workaround. By now I have read many threads on stackoverflow, and tried several approaches, but it seems to me that trying them results in more problems. For example somewhere it was suggested to use patchelf to link to the new glibc version, but there is no patchelf on my system and installing it seems to require some glibc version itself, etc.

Maybe the link about Singularity might be a good approach, but for now I realized that I can use Julia 1.9.2 which appears to be a sweet-spot in terms of usability for me. Therefore I stopped searching for a solution of the glibc linking for Julia 1.10+

1 Like