skip to Main Content

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


  1. 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 in sysdeps/unix/syscalls.list:

    readlink     -       readlink        i:spi   __readlink      readlink
    

    However, recent Linux architectures (those called generic in Linux parlance, currently aarch64, csky, nios2, and riscv) no longer have a readlink system call, and the function as to be implemented using readlinkat. This implementation is in the file sysdeps/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):

    commit 95b7042bac3e2cfc6fef7aec6acc7d46dd50eba5
    Author: Roland McGrath <[email protected]>
    Date:   Fri Nov 11 10:02:42 2011 -0800
    
        Fix __readlink declaration.
    

    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.

    Login or Signup to reply.
  2. 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 :

    cd build-glibc214/     # the recommended build directory outside the glibc source
    export CC=gcc49 CXX=g++49 && ../glibc-2.14.1/configure --prefix=/opt/glibc214
    make             # no errors
    # make install   # OK
    

    Extra gcc´s : how to install gcc 4.9.2 on RHEL 7.4

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search