LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   glibc above 2.27 fails to configure. (https://www.linuxquestions.org/questions/gentoo-87/glibc-above-2-27-fails-to-configure-4175643362/)

whansard 11-29-2018 05:01 PM

glibc above 2.27 fails to configure.
 
i'm getting this same error in 2 different gentoo distributions on my system. one is 32 bit and the other is 64.
this is the relevant section from config.log
configure:6161: checking for redirection of built-in functions
configure:6174: i686-pc-linux-gnu-gcc -Wall -fno-builtin -D_LARGEFILE_SOURCE -D_LARGEFILE_SOURCE64 -DLARGEOFFSET_BITS=64 -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -fuse-ld=bfd -O3 -S conftest.c -o - | grep -F my_strstr > /dev/null
configure:6177: $? = 1
configure:6186: result: no
configure:6189: error: support for the symbol redirection needed

the best i can tell is it doesn't like something about my gcc.

my output of #gcc -v is

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/7.3.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0/configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/7.3.0 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/7.3.0/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/7.3.0 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/7.3.0/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/7.3.0/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/7.3.0/include/g++-v7 --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/7.3.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 7.3.0-r3 p1.4' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-altivec --disable-fixed-point --with-arch=i686 --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.3.0 (Gentoo 7.3.0-r3 p1.4)

i can't find anything referencing that error by googling.

whansard 02-01-2019 10:00 PM

this is the section that fails.

Code:

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for redirection of built-in func$
$as_echo_n "checking for redirection of built-in functions... " >&6; }
if ${libc_cv_gcc_builtin_redirection+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat > conftest.c <<\EOF
extern char *strstr (const char *, const char *) __asm ("my_strstr");
char *foo (const char *a, const char *b)
{
  return __builtin_strstr (a, b);
}
EOF
if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null'
  { { eval echo ""\$as_me":${as_lineno-$LINENO}: "$ac_try""; } >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; };
then
  libc_cv_gcc_builtin_redirection=yes
else
  libc_cv_gcc_builtin_redirection=no

i can't figure out what i need to fix.

edit. i am able to configure and build the glibc using the configure script from the build log. i was going to try to find which option caused the problem, but they all seem to be fine. i'm thinking it must be some variable set by gentoo just before the configure, but i don't know how to check a list of those. understanding the ebuild is way beyond me.

whansard 06-26-2019 08:41 PM

i've finally figured this out. i have for years had the cflag -fno-builtin in my profile. i removed all the cflags and cxxflags, and glibc built. it took me another 45 minutes to figure out which one it was. the thing is, i can build glibc at the command line with configure, and the -fno-builtin flag doesn't cause any trouble. with all the cflags and cxxflags removed from make.conf, glibc still would give the same configure error. anyway, something changed and now -fno-builtin keeps glibc from configuring with with the error message
Code:

configure:6161: checking for redirection of built-in functions
configure:6174: i686-pc-linux-gnu-gcc -Wall -fno-builtin -D_LARGEFILE_SOURCE -D_LARGEFILE_SOURCE64 -DLARGEOFFSET_BITS=64 -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -fuse-ld=bfd -O3 -S conftest.c -o - | grep -F my_strstr > /dev/null
configure:6177: $? = 1
configure:6186: result: no
configure:6189: error: support for the symbol redirection needed



All times are GMT -5. The time now is 08:08 PM.