Bug 5253

Summary: Mesa 6.4.1 fails to compile on Visual C++
Product: Mesa Reporter: Jose Martins <acidsoftware>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: highest    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: diffs for fix

Description Jose Martins 2005-12-06 21:50:37 UTC
Usually compiling Mesa is pretty straightforward... 6.4 compiles fine under 
Visual C++ 2005 Beta 2, so when 6.4.1 failed to compile I tried the following 
things:
1) Downloaded and tried the .gz2 version of the archive (was using the zip 
version)
2) Tried compiling it under Visual C++ 6.0

Both of these attempts have failed with the same error messages. At the end of 
the day I decided to switch back to 6.4 for the time being, so I redownloaded 
and extracted the old version (6.4) and everything compiled fine. So there is 
definately something wrong with the sources when compiling it under the Visual 
C++ compilers.

Please have a look into this.


Take care,
Jose
Comment 1 Brian Paul 2005-12-07 01:38:41 UTC
I can't test on Windows but if you'd provide the error messages I might be able
to help.
Comment 2 Karl Schultz 2005-12-07 10:28:07 UTC
(In reply to comment #1)
> I can't test on Windows but if you'd provide the error messages I might be able
> to help.
> 

I'll take a look at it shortly.  It is likely that something changed on another
platform between 6.4 and 6.4.1 that broke the Windows build, and I didn't get a
chance to test the build before 6.4.1 shipped.  The most common cause for this
is  the addition or removal of source code files from the build.  The Visual
Studio files need to be updated when this happens because that won't happen when
the makefiles are changed.  This may be a good place to start looking. 
Comment 3 Karl Schultz 2005-12-07 16:29:44 UTC
Created attachment 4015 [details]
diffs for fix
Comment 4 Karl Schultz 2005-12-07 16:33:42 UTC
A couple of invocations of the RENDER_SPAN macro in s_tritemp.h used to have {}
around them.  These {} were removed for another fix which caused a variable
declaration to appear in the middle of a block.  Added {} to the RENDER_SPAN
definition in s_triangle.c so caller need not be concerned with this.

Fixes applied to trunk and mesa_6_4_branch.

Diff attached.
Comment 5 Jose Martins 2005-12-08 00:03:38 UTC
Strangely enough I'm still having problems getting it to compile - though I'm 
having different problems now (occurs while building OSMESA), I guess I'll 
wait till the next official release and hopefully it will be fine on the VC++ 
compilers straight out of the box - so to speak.

Thanks everyone.
Comment 6 Brian Paul 2005-12-08 01:14:10 UTC
The more info you can provide, the better the odds of fixing the bug.
If you're seeing error messages, please post them.
Comment 7 Karl Schultz 2005-12-08 05:05:48 UTC
(In reply to comment #5)
> Strangely enough I'm still having problems getting it to compile - though I'm 
> having different problems now (occurs while building OSMESA), I guess I'll 
> wait till the next official release and hopefully it will be fine on the VC++ 
> compilers straight out of the box - so to speak.
> 
> Thanks everyone.

OK, I had to apply the same sort of fix to osmesa.c and had to make one addition
to mesa.def.  The mesa_6_4_branch now builds.  The trunk has these and a couple
of other problems to fix.  I'll get to those soon.

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.