Bug 1552529

Summary: gcc 8 with default Fedora CFLAGS/LDFLAGS fails to compile the simplest program
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, davejohansen, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-07 12:33:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1548692    

Description Dominik 'Rathann' Mierzejewski 2018-03-07 09:37:24 UTC
Description of problem:
mkvtoolnix configure script fails to complete ("error: C compiler cannot create executables") due to GCC failure to compile the simplest program. Last successful build was with gcc-7.2.1-7.fc28 (https://koji.fedoraproject.org/koji/buildinfo?buildID=1020300).

Version-Release number of selected component (if applicable):
gcc-8.0.1-0.16.fc29.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. cat conftest.c
int
main ()
{

  ;
  return 0;
}

2. gcc -save-temps -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c

Actual results:
conftest.s: Assembler messages:
conftest.s:113: Error: unknown .loc sub-directive `view'
conftest.s:113: Error: junk at end of line, first unrecognized character is `-'
conftest.s:116: Error: unknown .loc sub-directive `view'
conftest.s:116: Error: unknown pseudo-op: `.lvu1'
conftest.s:117: Error: unknown .loc sub-directive `view'
conftest.s:117: Error: unknown pseudo-op: `.lvu2'

Expected results:
Successful compilation.

Additional info:
Suprisingly, removing '-g' from CFLAGS makes it compile fine. '-g1' also works.

Comment 1 Jakub Jelinek 2018-03-07 09:39:38 UTC
That means you are trying to use f29 gcc with some older binutils (non-f29).  Don't do that.

Comment 2 Jakub Jelinek 2018-03-07 09:41:20 UTC
Note that gcc 8.0.1-0.16.fc29 should BuildRequires: binutils >= 2.30, so not sure how that can happen.

Comment 3 Dominik 'Rathann' Mierzejewski 2018-03-07 12:17:38 UTC
Thanks for the quick reply. It looks like I actually have
$ rpm -q gcc binutils
gcc-8.0.1-0.14.fc28.x86_64
binutils-2.29.1-19.fc28.x86_64
in my mock buildroot. I'll scrub all caches and regenerate the buildroot.

Comment 4 Dominik 'Rathann' Mierzejewski 2018-03-07 12:33:41 UTC
Right, that helped. Sorry for the noise.