Bug 1552529 - gcc 8 with default Fedora CFLAGS/LDFLAGS fails to compile the simplest program
Summary: gcc 8 with default Fedora CFLAGS/LDFLAGS fails to compile the simplest program
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1548692
TreeView+ depends on / blocked
Reported: 2018-03-07 09:37 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2018-03-07 12:33 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-07 12:33:41 UTC

Attachments (Terms of Use)

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):

How reproducible:

Steps to Reproduce:
1. cat conftest.c
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
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.

Note You need to log in before you can comment on or make changes to this bug.