Bug 1307439 - edk2: FTBFS in rawhide
edk2: FTBFS in rawhide
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: edk2 (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Paolo Bonzini
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F24FTBFS
  Show dependency treegraph
 
Reported: 2016-02-13 16:15 EST by Fedora Release Engineering
Modified: 2016-02-15 13:08 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-15 13:08:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
build.log (17.84 KB, text/plain)
2016-02-13 16:15 EST, Fedora Release Engineering
no flags Details
root.log (81.68 KB, text/plain)
2016-02-13 16:15 EST, Fedora Release Engineering
no flags Details
state.log (653 bytes, text/plain)
2016-02-13 16:15 EST, Fedora Release Engineering
no flags Details
BaseTools: LzmaCompress: eliminate _maxMode and bogus indentation (5.85 KB, patch)
2016-02-14 02:35 EST, Laszlo Ersek
no flags Details | Diff

  None (edit)
Description Fedora Release Engineering 2016-02-13 16:15:01 EST
Your package edk2 failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=12813578

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
Comment 1 Fedora Release Engineering 2016-02-13 16:15:06 EST
Created attachment 1124387 [details]
build.log
Comment 2 Fedora Release Engineering 2016-02-13 16:15:09 EST
Created attachment 1124388 [details]
root.log
Comment 3 Fedora Release Engineering 2016-02-13 16:15:11 EST
Created attachment 1124389 [details]
state.log
Comment 4 Cole Robinson 2016-02-13 21:36:33 EST
The error is:

Sdk/C/LzmaEnc.c: In function 'GetOptimum':
Sdk/C/LzmaEnc.c:1376:9: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
         {
         ^
Sdk/C/LzmaEnc.c:1372:7: note: ...this 'if' clause, but it is not
       if (repIndex == 0)
       ^~
cc1: all warnings being treated as errors



Laszlo, do you know if that particular warning is fixed upstream?
If so, suggestion for a particular git commit to rebase Fedora too? Probably doesn't matter much since we are just shipping the tools, but figured I'd ask
Comment 5 Laszlo Ersek 2016-02-14 02:29:53 EST
Hi Cole,

I think this is a new warning class that is only detected / emitted by gcc-6. Is that right?

The current upstream edk2 source has the same wart, but it's never been reported, because the latest gcc version upstream edk2 supports is gcc-4.9. (OVMF happens to build with gcc-5.* too, using the gcc-4.9 settings.)

So, I can try to write a patch for this (both upstream & Fedora), which might make this exact warning go away, but there's no telling in advance what else will break -- other new warnings could be triggered, and even runtime issues could surface.

Earlier we saw a case when building BaseTools on ArchLinux, with a pre-6.0, but still "modern", gcc toolchain triggered preexistent undefined behavior in one of the edk2 utilities. The bug was really in the edk2 code, but it lay dormant until it was compiled with the then-newest gcc.

So porting edk2, both BaseTools and the real code, forward to a new compiler release (no matter if it's about Visual Studio, clang / xcode, or gcc), is always a dedicated upstream effort. But, as I said, we can start with a simple patch here; I'll attach it soon.
Comment 6 Laszlo Ersek 2016-02-14 02:35 EST
Created attachment 1126964 [details]
BaseTools: LzmaCompress: eliminate _maxMode and bogus indentation

Can you please test if this builds, Cole? If so, I will submit it to the upstream list. Thanks.
Comment 7 Cole Robinson 2016-02-15 13:08:40 EST
(In reply to Laszlo Ersek from comment #6)
> Created attachment 1126964 [details]
> BaseTools: LzmaCompress: eliminate _maxMode and bogus indentation
> 
> Can you please test if this builds, Cole? If so, I will submit it to the
> upstream list. Thanks.

Yup it works! Thanks a lot Laszlo!

I've built it in rawhide now, so closing

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