On 2020-02-01 16:50 -0600, Bruce Dubbs via lfs-dev wrote: > I am building a fresh LFS with the latest glibc and binutils and ran > into a problem when building gcc-pass2 in Chapter 5. > > linux-5.5.1 > glibc-2.31 > binutils-2.34 > > What the error looks like is somewhat complex and it looks like (long > lines so there is wrapping in the email): > > In file included from > ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1 > 93: > ../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:72: > error: narrowing conversion of '-1' from 'int' to 'long unsigned int' > [-Wnarrowing] > 339 | typedef char IMPL_PASTE(assertion_failed_##_, > line)[2*(int)(pred)-1] > | > ^ > ../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30: > note: in expansion of macro 'IMPL_COMPILER_ASSERT' > 333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__) > > ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:15 > 11:3: > note: in expansion of macro 'COMPILER_CHECK' > 1511 | COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) > == \ > > ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1 > 161:1: > note: in expansion of macro 'CHECK_SIZE_AND_OFFSET' > 1161 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode); > > > The command line includes -Werror even if I specify --disable-werror in > configure. > > I've been able to work around the problem with: > > sed -e '1161 s|^|//|' \ > -i libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc > > and it is probably all right since it is just an internal assertion check.
I don't think it's right. It's a "static assertion": char _static_assert_233[something_should_be_true() ? 1 : -1]; It makes the compilation to fail if something is out of the developers's assumption. I think GCC needs some fixes for Glibc-2.31. I'll search through GCC trunk. -- Xi Ruoyao <xry...@mengyan1223.wang> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page