Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695888 - flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists -> breaks sys-libs/glibc-2.30-r1 with ../misc/syslog.c:121:30: error: inlining failed in call to always_inline ‘syslog’: function not inlinable
Summary: flag-o-matic.eclass: test-flag-PROG(): verify selected compiler exists -> bre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 695930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-09-30 07:19 UTC by Pavol Cupka
Modified: 2019-09-30 19:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_695888.txt,7.35 KB, text/plain)
2019-09-30 07:23 UTC, Pavol Cupka
Details
build log (glibc-build.log.xz,82.28 KB, application/x-xz)
2019-09-30 07:33 UTC, Pavol Cupka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavol Cupka 2019-09-30 07:19:35 UTC
After latest changes to flag-o-matic.eclass (https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/flag-o-matic.eclass?id=cab160d3c614472e20f145e65a2d7f72bdf615b7) I am unable to emerge glibc-2.30-r1.



Reproducible: Always

Steps to Reproduce:
1. emerge glibc-2.30-r1

Actual Results:  
This fails with:
../misc/syslog.c:121:30: error: inlining failed in call to always_inline ‘syslog’: function not inlinable
...
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.30-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/sysd-rules:229: /var/tmp/portage/sys-libs/glibc-2.30-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/misc/syslog.os] Error 1            
make[2]: *** Waiting for unfinished jobs....                                                                                                                                                                                     
make[2]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r1/work/glibc-2.30/misc'                                                                                                                                        
make[1]: *** [Makefile:260: misc/subdir_lib] Error 2                                                                                                                                                                             
make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r1/work/glibc-2.30'                                                                                                                                             
make: *** [Makefile:9: all] Error 2                                                                                                                                                                                              
make: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r1/work/build-x86-x86_64-pc-linux-gnu-nptl'



Expected Results:  
glibc compiles fine with the latest change to flag-o-matic reversed.
Comment 1 Pavol Cupka 2019-09-30 07:23:18 UTC
Created attachment 591272 [details]
emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-30 07:28:21 UTC
Can you also attach full build logs for completeness? I'll try to reproduce locally meanwhile.
Comment 3 Pavol Cupka 2019-09-30 07:33:53 UTC
Created attachment 591274 [details]
build log
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-30 07:46:03 UTC
Yeah, we have 2 problems here:

1. type -P does not like extra arguments:

$ type -P x86_64-pc-linux-gnu-gcc -m64; echo $?
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
1

$ type -P x86_64-pc-linux-gnu-gcc     ; echo $?
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
0

2. The effect of this change is to drop CFLAGS passing completely without any warning.
Comment 5 Larry the Git Cow gentoo-dev 2019-09-30 09:00:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60328373651331a8d1beab33f4a499e0b3ad61d7

commit 60328373651331a8d1beab33f4a499e0b3ad61d7
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-09-30 08:52:04 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-09-30 09:00:31 +0000

    flag-o-matic.eclass: fix test-flag-PROG() for CC="gcc -m64"
    
    bug #695706 added compiler validation via 'type -p ${CC}', but that
    does not take into account possible options present in ${CC} itself:
    
      $ type -P x86_64-pc-linux-gnu-gcc -m64; echo $?
      /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
      1
    
      $ type -P x86_64-pc-linux-gnu-gcc     ; echo $?
      /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
      0
    
    The change picks first argument (binary name) and validates only that.
    
    Reported-by: Pavol Cupka
    Closes: https://bugs.gentoo.org/695888
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=695706
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/flag-o-matic.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Comment 6 Pavol Cupka 2019-09-30 14:25:00 UTC
Thank you for the fast fix!
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-09-30 19:02:18 UTC
*** Bug 695930 has been marked as a duplicate of this bug. ***