Bug 95158

Summary: glx-test compilation fails in `make check`
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Jose Fonseca <jfonseca>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: brianp, sroland
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Mark Janes 2016-04-26 17:04:30 UTC
The series ending in a2fe35bcdf3d383aaa5ad915b80630c8895d703d fails to compile the check target:

-------------------------------
Author:     Jose Fonseca <jfonseca@vmware.com>
scons: Support Clang on Windows.

- Introduce 'gcc_compat' env flag, for all compilers that define __GNUC__,
  (which includes Clang when it's not emulating MSVC.)

- Clang doesn't support whole program optimization

- Disable enumerator value warnings (not sure why Clang warns about them,
  as my understanding is that MSVC promotes enums to unsigned ints
  automatically.)

This is not enough to build with Clang + AddressSanitizer though.  More
follow up changes will be required for that.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>

-------------------------------
In file included from ../../../include/c99_compat.h:28:0,
                 from ../../../src/util/macros.h:29,
                 from ../../../src/glx/glxclient.h:55,
                 from fake_glx_screen.h:24,
                 from fake_glx_screen.cpp:23:
../../../include/no_extern_c.h:47:1: error: template with C linkage
 template<class T> class _IncludeInsideExternCNotPortable;
 ^
Comment 1 Mark Janes 2016-04-26 17:07:34 UTC
First compilation error occurs in c068610a7df370af94fd6177598a35c4425a75f9.
Comment 2 Jose Fonseca 2016-04-26 18:35:18 UTC
The problem are the following lines in src/glx/tests/fake_glx_screen.h :

extern "C" {
#include "glxclient.h"
};

Including headers like that inside extern C should be avoided.  My change just happened to trigger it.


I'll try to fix it.
Comment 3 Jose Fonseca 2016-04-26 20:29:17 UTC
Should be fixed with 52c7443932bd38d6708fcab2a8dfcc7ed3d678f2.

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.