Bug 82534

Summary: src\egl\main\eglapi.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2E02
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: medium CC: emil.l.velikov
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Jose's patch

Description Vinson Lee 2014-08-13 00:14:18 UTC
mesa: 52901ec2615761390f5ef97b11516dae330d27d1 (master 10.3.0-devel)

  Archiving build\windows-x86-debug\egl\main\egl.lib ...
src\egl\main\eglapi.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2E02
Comment 1 Emil Velikov 2014-08-13 00:48:40 UTC
It smells like msvc/scons issue, but it could easily be a bug on our end as well. GCC builds it like a champ :)

Can you let me know the version of msvc, python and scons that you're using ?
Comment 2 Vinson Lee 2014-08-13 00:54:48 UTC
MSVC 2012
Python 2.7.8
SCons 2.3.0
Comment 3 Emil Velikov 2014-08-13 12:45:34 UTC
Can you give http://patchwork.freedesktop.org/patch/31650/ a try ?

It brings us back to the original behaviour by dropping the headers as scons parses through the list. It will also allow us to put all headers in makefile.sources and (one day) have a fully working automake 'make dist' :)
Comment 4 Emil Velikov 2014-08-13 14:49:27 UTC
You can also try Jose's patch
http://patchwork.freedesktop.org/patch/31651/
Comment 5 Vinson Lee 2014-08-13 19:28:56 UTC
(In reply to comment #3)
> Can you give http://patchwork.freedesktop.org/patch/31650/ a try ?
> 
> It brings us back to the original behaviour by dropping the headers as scons
> parses through the list. It will also allow us to put all headers in
> makefile.sources and (one day) have a fully working automake 'make dist' :)

This patch fixes the build error for me.

Tested-by: Vinson Lee <vlee@freedesktop.org>
Comment 6 Vinson Lee 2014-08-13 19:29:06 UTC
(In reply to comment #4)
> You can also try Jose's patch
> http://patchwork.freedesktop.org/patch/31651/

This patch does not apply.
Comment 7 Emil Velikov 2014-08-13 19:37:19 UTC
Created attachment 104581 [details] [review]
Jose's patch

Can you give this a bash ? I'm guessing that some of the formatting has been causing problems.
Comment 8 Vinson Lee 2014-08-13 19:40:55 UTC
(In reply to comment #7)
> Created attachment 104581 [details] [review] [review]
> Jose's patch
> 
> Can you give this a bash ? I'm guessing that some of the formatting has been
> causing problems.

attachment 104581 [details] [review] fixes the build error for me too.

Tested-by: Vinson Lee <vlee@freedesktop.org>
Comment 9 Emil Velikov 2014-08-14 14:50:09 UTC
Pushed to master

commit d4a1f3fd270001b2fb0684dc981340391df8fb64
Author: Jose Fonseca <jfonseca@vmware.com>
Date:   Wed Aug 13 20:33:35 2014 +0100

    scons: do not include headers from the sources lists

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.