Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 663928

Summary: =app-arch/gzip-1.9: build failure against gcc-8/glibc-2.28: cc1: error: -Wabi won't warn about anything [-Werror=abi]
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=667598
https://bugs.gentoo.org/show_bug.cgi?id=654766
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 260867, 663916    
Attachments: app-arch:gzip-1.9:20180817-221541.log

Description Sergei Trofimovich (RETIRED) gentoo-dev 2018-08-17 22:18:42 UTC
Created attachment 543860 [details]
app-arch:gzip-1.9:20180817-221541.log

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -fno-common -W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmultichar -Wnarrowing -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wopenmp-simd -Woverflow -Woverlength-strings -Woverride-init -Wpacked -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-sign-compare -Wno-unused-parameter -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wno-format-nonliteral -Wsuggest-attribute=pure -Wno-logical-op -fdiagnostics-show-option -funit-at-a-time -Werror -march=sandybridge -mtune=sandybridge --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -c -o cloexec.o cloexec.c
cc1: error: -Wabi won't warn about anything [-Werror=abi]
cc1: note: -Wabi warns about differences from the most up-to-date ABI, which is also used by default
cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
In file included from cloexec.c:20:
./config.h:1323:48: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
             || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
                                                ^~~~~~~~~~~~~~~
Comment 1 Matt Whitlock 2018-08-22 21:42:05 UTC
I don't experience this error when building app-arch/gzip-1.9 with sys-devel/gcc-8.2.0.

Where are all those compiler flags coming from? Are those in your CFLAGS? I see this command line to build cloexec.c:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.      -pipe -march=native -ggdb -O3 -c -o cloexec.o cloexec.c

In general, you probably don't want to specify -Wabi and -Werror together since -Wabi with no parameter will, on some versions of GCC, always emit a warning, and -Werror will always turn that warning into an error.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2018-08-22 22:18:39 UTC
(In reply to Matt Whitlock from comment #1)
> I don't experience this error when building app-arch/gzip-1.9 with
> sys-devel/gcc-8.2.0.
> 
> Where are all those compiler flags coming from? Are those in your CFLAGS? I
> see this command line to build cloexec.c:
> 
> x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.      -pipe -march=native -ggdb
> -O3 -c -o cloexec.o cloexec.c
> 
> In general, you probably don't want to specify -Wabi and -Werror together
> since -Wabi with no parameter will, on some versions of GCC, always emit a
> warning, and -Werror will always turn that warning into an error.

I specify neither -Wabi nor -Werror. My CFLAGS are:

    CFLAGS="-march=sandybridge -mtune=sandybridge --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches"
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-14 09:51:27 UTC
I think it was fixed in gnulib as: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=63e719c9c3be133432d02ddb1274dbf57e6a8857
Comment 4 Larry the Git Cow gentoo-dev 2018-10-14 10:20:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=324cd4cb51413b09983348d55230e20a8f730b18

commit 324cd4cb51413b09983348d55230e20a8f730b18
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-10-14 10:14:27 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-10-14 10:20:06 +0000

    app-arch/gzip: disable -Werror, bug #663928
    
    Bug: https://bugs.gentoo.org/663928
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-arch/gzip/gzip-1.9.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-14 10:22:45 UTC
I dropped -Werror but now gzip needs a gnulib update similar to bug #663242:

fseeko.c: In function 'rpl_fseeko':
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
    ^~~~~
Comment 6 Larry the Git Cow gentoo-dev 2018-10-14 10:52:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4952386d936a48aba253b0b850cea4a245298a8e

commit 4952386d936a48aba253b0b850cea4a245298a8e
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-10-14 10:51:53 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-10-14 10:52:26 +0000

    app-arch/gzip: fix build failure against glibc-2.28, bug #663928
    
    Adopted gnulib's upstream patch:
    http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
    
    Closes: https://bugs.gentoo.org/663928
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../gzip/files/gzip-1.9-gnulib-glibc-2.28.patch    | 134 +++++++++++++++++++++
 app-arch/gzip/gzip-1.9.ebuild                      |   1 +
 2 files changed, 135 insertions(+)