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

Bug 559534

Summary: media-gfx/argyllcms-1.8.0 fails to build with gcc-5.2 - numlib/numsup.h:327:32: error: expected declaration specifiers before 'error' + lots more errors
Product: Gentoo Linux Reporter: Alexandre Rostovtsev (RETIRED) <tetromino>
Component: [OLD] GCC PortingAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 536984    
Attachments: emerge --info + build.log

Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-03 15:22:45 UTC
# emerge -1 argyllcms
[...]
In file included from numlib/numlib.h:7:0,
                 from gamut/gamut.c:43:
numlib/numsup.h: In function ‘__declspec’:
numlib/numsup.h:327:32: error: expected declaration specifiers before ‘error’
 extern void ATTRIBUTE_NORETURN error(char *fmt, ...);
                                ^
numlib/numsup.h:328:13: error: storage class specified for parameter ‘warning’
 extern void warning(char *fmt, ...);
             ^
numlib/numsup.h:329:13: error: storage class specified for parameter ‘verbose’
 extern void verbose(int level, char *fmt, ...);
             ^
numlib/numsup.h:331:12: error: storage class specified for parameter ‘ret_null_on_malloc_fail’
 extern int ret_null_on_malloc_fail;
            ^
numlib/numsup.h:333:13: error: storage class specified for parameter ‘check_if_not_interactive’
 extern void check_if_not_interactive();
             ^
numlib/numsup.h:334:12: error: storage class specified for parameter ‘not_interactive’
 extern int not_interactive;
            ^
numlib/numsup.h:335:13: error: storage class specified for parameter ‘cr_char’
 extern char cr_char;
             ^
In file included from numlib/numlib.h:15:0,
                 from gamut/gamut.c:43:
numlib/sobol.h:12:1: warning: empty declaration
 struct _sobol {
 ^
numlib/sobol.h:33:26: error: storage class specified for parameter ‘sobol’
 }; typedef struct _sobol sobol;
                          ^
numlib/sobol.h:36:1: error: expected declaration specifiers before ‘sobol’
 sobol *new_sobol(int dim);
 ^
In file included from numlib/aatree.h:28:0,
                 from numlib/numlib.h:16,
                 from gamut/gamut.c:43:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/include/stddef.h:149:26: error: storage class specified for parameter ‘ptrdiff_t’
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
                          ^
/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/include/stddef.h:429:3: error: storage class specified for parameter ‘max_align_t’
 } max_align_t;
   ^
[...]
 * ERROR: media-gfx/argyllcms-1.8.0::gentoo failed (compile phase):
 *   (no error message)

Build log and emerge --info attached.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-03 15:24:30 UTC
Created attachment 410930 [details]
emerge --info + build.log
Comment 2 Bernard Cafarelli gentoo-dev 2015-09-03 15:41:36 UTC
My bet is on a GCC5 specific error, can you test with the patch from:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777779 ?
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2015-09-04 00:58:21 UTC
You are right.

Builds fine with gcc-4.9.2 out of the box.

Builds fine with gcc-5.2.0 + patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=30_gcc5.patch;bug=777779;att=1;msg=21
Comment 4 Bernard Cafarelli gentoo-dev 2015-09-04 11:49:24 UTC
OK :) Patch added to current ebuild