I’m using a cluster without having root access. The problem is that it’s running an old software. Here is how I setup my toolchain on this cluster. This is an ongoing work and this post will be updated from time to time.
The cluster is running: bash 4.1.2, Binutils 184.108.40.206.2, bison 2.4.1, bzip2 1.0.5, Coreutils 8.4, diff 2.8.1, find 4.4.2, Gawk 3.1.7, GCC 4.4.7, Glibc 2.12, grep 2.6.3, gzip 1.3.12, Linux kernel 2.6.32, m4 1.4.13, Make 3.81, patch 2.6, Perl 5.10.1, sed 4.2.1, tar 1.23, makeinfo 4.13, xz 5.0.5. I am tring the following three approaches:
Using Linuxbrew (Not Working)
Linuxbrew is a fork of Homebrew for use on Linux systems. It would be nice if it works since it contains lots of packages.
The problem is that Linuxbrew depends on more recent versions of Ruby and Git. After compiling them from source I was able to install Linuxbrew, but cannot install any package from there due to pkg-config issues.
Using Spack (Working)
Spack is developed by LLNL for package managing by using explicit RPATH.
Installing environment-modules fails. The errors all seem to be associated with LMSPLIT_SIZE. This variable is used to solve the problem that some early SunOS C-shells couldn’t handle env.vars. that is too long. It seems that the cluster does not need to do the splitting, but the configure script fails to realise that. One way to fix this is to edit the package to feed –without-split-size to the configure script.
Note: On Mac, spack’s zlib formula seems invalid. One way to fix it is to replace the download link to releases on Github. Also, to compile xz, I had to undef HAVE_CLOCK_GETTIME manually in configured header files (since the configure script failed to do so).
Caveat: There is currently no GLIBC package in Spack.
Linux From Scratch (Not Working)
Motivated by this blog post by Tim, it is possible to build an embedded linux from scratch and use stuff from there.
However, the linker on the cluster failed to link GCC 6.2.0. (access beyond end of merged section). Reason is unknown.
TODO: try earlier versions of LFS to see if it works.