Discussion:
About GCC-5.5.0
Rene
2018-05-24 02:57:21 UTC
Permalink
Hello,

I am updating my Guix repository on Debian/Hurd and I have the following error in the 'configure' phase of glibc(glibc-intermediate-2.23).
We have tried to add the flag '-fno-stack-protector' to glibc, however the error remains.

Any idea of how we can approach it?

---

checking if i586-pc-gnu-gcc accepts -fno-tree-loop-distribute-patterns with __at

tribute__ ((__optimize__))... yes

checking for libgd... no

checking for is_selinux_enabled in -lselinux... no

checking for _FORTIFY_SOURCE predefine... no

checking whether i586-pc-gnu-gcc implicitly enables -fstack-protector... configu

re: error: unexpected symbols in test:

---

Thank you

Rene
Samuel Thibault
2018-05-24 23:41:30 UTC
Permalink
Hello,
Post by Rene
I am updating my Guix repository on Debian/Hurd and I have the following error
in the 'configure' phase of glibc(glibc-intermediate-2.23).
We have tried to add the flag '-fno-stack-protector' to glibc, however the error remains.
Any idea of how we can approach it?
Getting the config.log would allow to have more ideas :)
Post by Rene
---
checking if i586-pc-gnu-gcc accepts
-fno-tree-loop-distribute-patterns with __at
tribute__ ((__optimize__))... yes
checking for libgd... no
checking for is_selinux_enabled in -lselinux... no
checking for _FORTIFY_SOURCE predefine... no
checking whether i586-pc-gnu-gcc implicitly enables
-fstack-protector... configu
---
Thank you
Rene
Rene
2018-05-25 02:28:38 UTC
Permalink
Hello Samuel,

yes, I attach the log file.


​Thank you
Rene
Post by Samuel Thibault
Post by Rene
Any idea of how we can approach it?
Getting the config.log would allow to have more ideas :)
Rene
2018-05-25 04:03:19 UTC
Permalink
In this new execution, I have set CFLAGS='-fno-stack-protector', but the variable stack_protector still with null value (stack_protector='' ).

Attached log files.
Ludovic Courtès
2018-05-28 09:48:04 UTC
Permalink
Hello Rene,
configure:6227: checking whether i586-pc-gnu-gcc implicitly enables -fstack-protector
configure:6244: i586-pc-gnu-gcc -c -g -O2 conftest.c >&5
configure:6244: $? = 0
libc_undefs=''
This comes from this code in the configure.ac file of the glibc 2.23ish
package that’s used in Guix for GNU/Hurd (this code is absent in the
2.26ish glibc used for GNU/Linux):

--8<---------------cut here---------------start------------->8---
AC_CACHE_CHECK([whether $CC implicitly enables -fstack-protector],
libc_cv_predef_stack_protector, [
AC_TRY_COMPILE([extern void foobar (char *);],
[char large_array[2048]; foobar (large_array);], [
libc_undefs=`$NM -u conftest.o |
LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \
2>&AS_MESSAGE_LOG_FD` || {
AC_MSG_ERROR([confusing output from $NM -u])
}
echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'"
# On some architectures, there are architecture-specific undefined
# symbols (resolved by the linker), so filter out unknown symbols.
# This will fail to produce the correct result if the compiler
# defaults to -fstack-protector but this produces an undefined symbol
# other than __stack_chk_fail. However, compilers like that have not
# been encountered in practice.
libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'`
case "$libc_undefs" in
foobar) libc_cv_predef_stack_protector=no ;;
'__stack_chk_fail
foobar') libc_cv_predef_stack_protector=yes ;;
*) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;;
esac],
[AC_MSG_ERROR([test compilation failed])])
])
--8<---------------cut here---------------end--------------->8---

So it looks like the right-hand size of the ‘libc_undefs’ assignment
expands to the empty string.

Could you check the value of $NM in there? Could it be that it got it
wrong?

HTH,
Ludo’.
Rene
2018-05-29 12:30:38 UTC
Permalink
Hello Ludovic,
Post by Ludovic Courtès
So it looks like the right-hand size of the ‘libc_undefs’ assignment
expands to the empty string.
Could you check the value of $NM in there? Could it be that it got it
wrong?
In the config.log file the $NM value is: NM='nm'


Thank you

Loading...