You are not logged in.

#1 2021-05-19 08:04:01

dobo
Member
Registered: 2010-07-09
Posts: 18

[glibc] Function inlining error when trying to compile from ABS

Hi everyone!

I'm trying to compile a glibc package from ABS in a clean chroot. Instructions which I've made to compile it:

CHROOT=$HOME/chroot
mkdir $CHROOT
mkarchroot $CHROOT/root base-devel
arch-nspawn $CHROOT/root pacman -Syu

git clone --depth=1 https://github.com/archlinux/svntogit-packages -b packages/glibc
cd svntogit-packages/repos/core-x86_64
makechrootpkg -c -r $CHROOT -- -c --skippgpcheck

But building fails with:

gcc ttyslot.c -c -std=gnu11 -fgnu89-inline  -march=x86-64 -mtune=generic -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS -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   -fpie -fcf-protection   -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc  -I/tmp/svntogit-packages/repos/core-x86_64/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 /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -o /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/ttyslot.o -MD -MP -MF /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/ttyslot.o.dt -MT /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/ttyslot.o
gcc ../sysdeps/unix/sysv/linux/syslog.c -c -std=gnu11 -fgnu89-inline  -march=x86-64 -mtune=generic -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS -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   -fpie -fcf-protection -fexceptions  -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc  -I/tmp/svntogit-packages/repos/core-x86_64/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 /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -o /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/syslog.o -MD -MP -MF /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/syslog.o.dt -MT /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/syslog.o
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);
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [/tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/sysd-rules:213: /tmp/svntogit-packages/repos/core-x86_64/src/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory '/tmp/svntogit-packages/repos/core-x86_64/src/glibc-2.33/misc'
make[1]: *** [Makefile:479: misc/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/svntogit-packages/repos/core-x86_64/src/glibc-2.33'

I'm frankly surprised that it fails to build as it's compiled in a clean chroot and from an unchanged PKGBUILD from ABS. Am I missing something?

Thanks for help!

Offline

#2 2021-05-19 09:54:26

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,017
Website

Re: [glibc] Function inlining error when trying to compile from ABS

Arch packages are not being built with the current CFLAGS/CXXFLAGS distributed in makepkg.conf.  The PKGBUILD removes -D_FORTIFY_SOURCE=2, but that will fail with current CFLAGS.

Offline

#3 2021-05-19 10:06:49

dobo
Member
Registered: 2010-07-09
Posts: 18

Re: [glibc] Function inlining error when trying to compile from ABS

Thanks for the response! Could you point me the place where can I find the actual CFLAGS/CXXFLAGS which are used to compile official Arch packages?

Offline

#4 2021-05-19 10:21:40

dobo
Member
Registered: 2010-07-09
Posts: 18

Re: [glibc] Function inlining error when trying to compile from ABS

skunktrader wrote:
dobo wrote:

Could you point me the place where can I find the actual CFLAGS/CXXFLAGS which are used to compile official Arch packages?

/etc/makepkg.conf

Maybe I understood it wrongly. But from my understanding: Allan said that the official Arch packages are compiled with different CFLAGS/CXXFLAGS than that ones supplied in pacman package. That's the reason why glibc fails to compile for me. So it's why I'm asking where can I find the actual flags.

Offline

#5 2021-05-19 10:43:59

loqs
Member
Registered: 2014-03-06
Posts: 13,448

Re: [glibc] Function inlining error when trying to compile from ABS

devtools /usr/share/devtools/makepkg-x86_64.conf

Offline

#6 2021-05-19 11:41:39

dobo
Member
Registered: 2010-07-09
Posts: 18

Re: [glibc] Function inlining error when trying to compile from ABS

loqs wrote:

devtools /usr/share/devtools/makepkg-x86_64.conf

Thanks a lot, I wasn't aware of that! I've used that config file and it has compiled successfully.

I presume that makepkg.conf in pacman has been changed according to this proposal. And when the feedback is positive those flags will be also moved into the devtools.

Offline

#7 2021-05-19 12:23:48

loqs
Member
Registered: 2014-03-06
Posts: 13,448

Re: [glibc] Function inlining error when trying to compile from ABS

dobo wrote:

I presume that makepkg.conf in pacman has been changed according to this proposal. And when the feedback is positive those flags will be also moved into the devtools.

See https://bbs.archlinux.org/viewtopic.php?id=266352

Offline

Board footer

Powered by FluxBB