Bug 90048

Summary: shaderapi.h:235:50: error: expected ‘{’ before ‘,’ token
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: blocker    
Priority: medium CC: lemody, martin.peres
Version: gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: fix attempt

Description Vinson Lee 2015-04-16 07:36:52 UTC
mesa: f78b2c432f31a18794b9f62f0a0cfb8eca256151 (master 10.6.0-devel)

MinGW build error

  Compiling src/mesa/drivers/common/meta_tex_subimage.c ...
In file included from src/mesa/drivers/common/meta_tex_subimage.c:37:0:
src/mesa/main/shaderapi.h:235:50: error: expected ‘{’ before ‘,’ token
                                  GLenum interface, const char *name);
                                                  ^
Comment 1 Vinson Lee 2015-04-16 07:49:20 UTC
161f57f6103802de55d792bcc6a4370afa5c5173 is the first bad commit
commit 161f57f6103802de55d792bcc6a4370afa5c5173
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Tue Mar 10 09:30:30 2015 +0200

    mesa: glGetProgramResourceIndex
    
    Patch adds required helper functions to shaderapi.h and
    the actual implementation.
    
    v2: code cleanup (Ilia Mirkin)
    
    corresponding Piglit test:
       arb_program_interface_query-getprogramresourceindex
    
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: Martin Peres <martin.peres@linux.intel.org>

:040000 040000 1c1cd0464953b6239e43d7007db9454e87a1c12c 1ff2ac35aa06aecdb2251b5af4db831b4ccece15 M	src
bisect run success
Comment 2 Tapani Pälli 2015-04-16 07:57:40 UTC
sorry, will try to dig what is causing this
Comment 3 Tapani Pälli 2015-04-16 08:04:57 UTC
Created attachment 115113 [details] [review]
fix attempt

does this fix the issue?
Comment 4 Vinson Lee 2015-04-16 08:10:05 UTC
(In reply to Tapani Pälli from comment #3)
> Created attachment 115113 [details] [review] [review]
> fix attempt
> 
> does this fix the issue?

No.
Comment 5 Vinson Lee 2015-04-16 08:38:43 UTC
A definition of interface must be getting included from some MinGW header file.

This patch works around the compile error.

diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 0cd2fad..d313581 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -35,6 +35,7 @@
 extern "C" {
 #endif
 
+#undef interface
 
 struct _glapi_table;
 struct gl_context;
Comment 6 Tapani Pälli 2015-04-16 08:40:49 UTC
(In reply to Vinson Lee from comment #5)
> A definition of interface must be getting included from some MinGW header
> file.
> 
> This patch works around the compile error.
> 
> diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
> index 0cd2fad..d313581 100644
> --- a/src/mesa/main/shaderapi.h
> +++ b/src/mesa/main/shaderapi.h
> @@ -35,6 +35,7 @@
>  extern "C" {
>  #endif
>  
> +#undef interface
>  
>  struct _glapi_table;
>  struct gl_context;

ok, thanks for fixing the issue!

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Comment 7 Jose Fonseca 2015-04-16 09:40:32 UTC
Sorry, I noticed the build failure, and checked if there was any patch posted to mesa-dev, but I didn't notice this bug report until now (because the subject has some non-ASCII characters so the subject of the notification emails I got were totally garbled.)

In fact I just took the liberty of pushing a different fix:

  http://cgit.freedesktop.org/mesa/mesa/commit/?id=037e0e78abf0c312f737d33f3c33e37b22bf226d


My apologies.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.