I made a softwareupdate on a simulationsoftware which needs a newer version of glibc. Therefore I wanted to install the glibc version 2.14 on a new prefix.
According to How to upgrade glibc from version 2.12 to 2.14 on CentOS?
i tried to install it on a sles11sp3
mkdir /var/mpi/Libraries/glibc_install; cd /var/mpi/Libraries/glibc_install
wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
tar zxvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build
../configure --prefix=/var/mpi/Libraries/glibc-2.14
make -j4
During the make I get the following error:
readlink.c:26: error: conflicting types for ‘__readlink’
../include/unistd.h:120: error: previous declaration of ‘__readlink’ was here
make[2]: *** [/var/mpi/Libraries/glibc_install/glibc-2.14/build/io/readlink.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/mpi/Libraries/glibc_install/glibc-2.14/io'
make[1]: *** [io/subdir_lib] Error 2
make[1]: Leaving directory `/var/mpi/Libraries/glibc_install/glibc-2.14'
make: *** [all] Error 2
Do you have a clue how to solve this problem?
2
Answers
io/readlink.c
is just a stub implementation which always fails at run time. It is not supposed to be compiled at all when building for GNU/Linux. Instead, the implementation should come from the generic system call wrapper insysdeps/unix/syscalls.list
:However, recent Linux architectures (those called
generic
in Linux parlance, currently aarch64, csky, nios2, and riscv) no longer have areadlink
system call, and the function as to be implemented usingreadlinkat
. This implementation is in the filesysdeps/unix/sysv/linux/generic/readlink.c
.It’s not clear what you are doing so that the wrong file is compiled. Are you sure you have installed compatible kernel headers?
The particular upstream commit (which went into glibc 2.15):
But given the fundamental nature of the build problem you encountered, I doubt that applying this patch, while addressing the immediate build failure, will give you a functional glibc build in the end.
GLIBC : 2.14 → 2011-06-01. The “bugfix version” 2.14.1 → 2011-10-07 https://ftp.gnu.org/gnu/glibc/
Note :
make -j4
is not recommended for glibc, as far as I remember.My tests (old SLE11 SP2) : The SLE 11 SP2 gcc 4.3.2 is too old for glibc-2.14.1, may be the SP3 minor gcc update (to 4.3.4) is also too old?
Using the “extra EL 6 gcc-4.9.3” …. for glibc-2.14.1 :
Extra gcc´s : how to install gcc 4.9.2 on RHEL 7.4