Bug 17468

Summary: gcc in Cauldron gives bogus "unknown type name" compile error
Product: Mageia Reporter: David Walser <luigiwalser>
Component: RPM PackagesAssignee: Thomas Backlund <tmb>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: gcc-5.3.1-0.20160105.1.mga6.src.rpm CVE:
Status comment:

Description David Walser 2016-01-09 05:07:02 CET
In building libsmi 0.5.0:
http://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20160108002132.luigiwalser.valstar.10611/log/libsmi-0.5.0-1.mga6/build.0.20160108002203.log

Cauldron's GCC gives this:
scanner-sming.l:47:30: error: unknown type name 'YYSTYPE'
 #define YY_DECL int yylex(YYSTYPE *lvalp, void *parser)
                              ^
scanner-sming.c:5653:1: note: in expansion of macro 'YY_DECL'
 YY_DECL
 ^

which is bogus, because YYSTYPE is defined in parser-sming.tab.h which is included by both scanner-sming.c and scanner-sming.l.

It builds fine with Mageia 5's compiler.

Reproducible: 

Steps to Reproduce:
Comment 1 Thomas Backlund 2016-01-09 11:29:22 CET
By a first look it's not gcc issue, it just trips over it.

it's almost certainly a flex/bison issue
Comment 2 David Walser 2016-01-09 14:52:54 CET
(In reply to Thomas Backlund from comment #1)
> By a first look it's not gcc issue, it just trips over it.
> 
> it's almost certainly a flex/bison issue

I suppose that's possible, and we do have newer versions of each in Cauldron.  It doesn't make any sense to me though :o(
Comment 3 Thomas Backlund 2016-01-09 15:01:55 CET
A quick googling shows that either circular deps or broken parallell build can trigger issues like that... so maybe an include is missing that the new flex/bison screws up on...

I also see in the initial phase:

./configure: line 12316: ./libtool: No such file or directory

Maybe that fails to set something needed...
Comment 4 David Walser 2016-01-09 15:42:17 CET
(In reply to Thomas Backlund from comment #3)
> A quick googling shows that either circular deps or broken parallell build
> can trigger issues like that... so maybe an include is missing that the new
> flex/bison screws up on...

OK, I looked into this further.  The bison package is the same in Cauldron as Mageia 5.  The flex package was recently updated to 2.6.0, so I tried updating that in my Mageia 5 build VM and libsmi still builds fine.

> I also see in the initial phase:
> 
> ./configure: line 12316: ./libtool: No such file or directory
> 
> Maybe that fails to set something needed...

Perhaps, but that message also appears in my successful builds on Mageia 5.

This is starting to look like it really is a compiler bug.
Comment 5 David Walser 2016-01-09 15:56:32 CET
(In reply to Thomas Backlund from comment #3)
> A quick googling shows that either circular deps or broken parallell build

Nevermind, you were right.  Parallel build issue.  Disabled that and it builds.

Thanks for looking at this!

Status: NEW => RESOLVED
Resolution: (none) => INVALID