1

I am trying to compile GLIBC from source however during that process I get the following error:

../sysdeps/ieee754/flt-32/e_gammaf_r.c: In function ‘__ieee754_gammaf_r’:
../sysdeps/ieee754/flt-32/e_gammaf_r.c:127:32: error: implicit declaration of function ‘__builtin_roundeven’; did you mean ‘__builtin_round’? [-Werror=implicit-function-declaration]
   double m = z - 0x1.7p+1, i = __builtin_roundeven(m), step = __builtin_copysign(1.0,i);
                                ^~~~~~~~~~~~~~~~~~~
                                __builtin_round
cc1: all warnings being treated as errors

I have tried compiling using the following:

git clone https://sourceware.org/git/glibc.git glibc-devel
cd glibc-devel
mkdir build
cd build
../configure --prefix=/home/a0504063/bin/python/glibc --host=x86_64-linux-gnu --build=x86_64-linux-gnu CC="gcc -m64" CXX="g++ -m64" CFLAGS="-O2 -Wno-error" CXXFLAGS="-O2 -Wno-error"
make

This yields the above error. As is demonstrated in the configure command I am using -Wno-error to try and suppress the default "all warnings being treated as errors" behavior. However, this option is prepended to the default options list which causes it to be ignored.

I am currently using:

  • git commit hash: 18596c5415
  • gcc/g++ version: 8.5.0
  • OS: RedHat 8 (this is what the company servers currently run and I have no option to change)
1

1 Answer 1

1

gcc/g++ version: 8.5.0

Your GCC is too old.

From the patch comment:

__builtin_roundeven is not support on gcc older than version 10.

Your options are:

  • use older GLIBC sources
  • use newer GCC
  • apply above patch
  • wait for that patch to be committed, and then build newest GLIBC sources

P.S. GLIBC-2.32 release notes show that it was tested on x86_64 using GCC 8.2.1.

So using latest released GLIBC version should be fine with your version of GCC.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.