Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73530 - [glibc] FTBFS from latest version

Attached to Project: Arch Linux
Opened by Jeffrey Pan (XieJiSS) - Thursday, 27 January 2022, 16:01 GMT
Last edited by freswa (frederik) - Thursday, 10 February 2022, 01:10 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
freswa (frederik)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When compiling glibc-2.33-5 with extra-x86_64-build and !lto appended to options array, this error occured:

(picked from log file)

gcc ../sysdeps/unix/sysv/linux/sethostid.c -c -std=gnu11 -fgnu89-inline -march=x86-64 -mtune=generic -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-strong -Wstrict-prototypes -Wold-style-definition -fmath-errno -fPIC -fcf-protection -ftls-model=initial-exec -U_FORTIFY_SOURCE -I../include -I/build/glibc/src/glibc-build/misc -I/build/glibc/src/glibc-build -I../sysdeps/unix/sysv/linux/x86_64/64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/x86_64/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../sysdeps/x86_64 -I../sysdeps/x86/include -I../sysdeps/x86 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include /build/glibc/src/glibc-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DSHARED -DTOP_NAMESPACE=glibc -o /build/glibc/src/glibc-build/misc/sethostid.os -MD -MP -MF /build/glibc/src/glibc-build/misc/sethostid.os.dt -MT /build/glibc/src/glibc-build/misc/sethostid.os
In file included from <command-line>:
../misc/syslog.c: In function ‘__vsyslog_internal’:
../misc/syslog.c:127:30: error: inlining failed in call to ‘always_inline’ ‘syslog’: function not inlinable
127 | ldbl_strong_alias (__syslog, syslog)
| ^~~~~~
./../include/libc-symbols.h:140:26: note: in definition of macro ‘_strong_alias’
140 | extern __typeof (name) aliasname __attribute__ ((alias (#name))) \
| ^~~~~~~~~
../sysdeps/generic/math_ldbl_opt.h:14:44: note: in expansion of macro ‘strong_alias’
14 | #define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
| ^~~~~~~~~~~~
../misc/syslog.c:127:1: note: in expansion of macro ‘ldbl_strong_alias’
127 | ldbl_strong_alias (__syslog, syslog)
| ^~~~~~~~~~~~~~~~~
In file included from ../sysdeps/unix/sysv/linux/syslog.c:4:
../misc/syslog.c:173:17: note: called from here
173 | syslog(INTERNALLOG,
| ^~~~~~~~~~~~~~~~~~~
174 | "syslog: unknown facility/priority: %x", pri);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional info:
* package version(s) 2.33-5
* config and/or log files etc. see problem description
* link to upstream bug report, if any

According to my investigation, the fatal error here is caused by wrong CFLAGS. Before configuration, CPPFLAGS is trimmed by:

CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}

However, CFLAGS left unchanged. Adding a line to trim the _FORTIFY_SOURCE from CFLAGS can fix the issue:

CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}

Note that we can't simply remove -D_FORTIFY_SOURCE because this will result in -Wp, (followed by a space) which causes gcc failure during configuration:

cannot compute suffix of object files: cannot compile

When more preprocessing -D(s) are added to the default CFLAGS, the -Wp, should not be trimmed.


Steps to reproduce:

1. asp checkout glibc
2. append !lto to options in PKGBUILD
3. extra-x86_64-build
This task depends upon

Closed by  freswa (frederik)
Thursday, 10 February 2022, 01:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  gcc-11.2.0-2 in [testing]

Loading...