Bug 107478 - Regression: Mesa compile broken (snprintf) with Visual Studio 2013 (vs2013)
Summary: Regression: Mesa compile broken (snprintf) with Visual Studio 2013 (vs2013)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 18.1
Hardware: x86 (IA32) Windows (All)
: medium blocker
Assignee: Dylan Baker
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-04 02:52 UTC by Chris Kawano
Modified: 2018-08-16 00:45 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kawano 2018-08-04 02:52:38 UTC
Mesa build off of v18.1.5 using Visual Studio 2013 (Update 5) has broken due to the following two commits:

73f1e33d34b2044f2252a73e0fdd827d39724505 (mesa: remove snprintf macro in imports.h to fix MSVC build)

Errors:
src\compiler\glsl_types.cpp(462) : error C3861: 'snprintf': identifier not found
src\compiler\glsl_types.cpp(470) : error C3861: 'snprintf': identifier not found
src\compiler\glsl_types.cpp(471) : error C3861: 'snprintf': identifier not found
src\compiler\glsl_types.cpp(474) : error C3861: 'snprintf': identifier not found
src\compiler\glsl_types.cpp(856) : error C3861: 'snprintf': identifier not found

43d66c8c2d4d3d4dee1309856b6ce6c5393682e5 (mesa: include mtypes.h less)
- NOTE: This commit already has a proposed patch in commit (9d220fa950850d751fbbbc2cd4ec24d024fcad70 - glsl: use util_snprintf()

Errors:
src\compiler\glsl\opt_dead_builtin_varyings.cpp(325) : error C3861: 'snprintf': identifier not found
src\compiler\glsl\opt_dead_builtin_varyings.cpp(332) : error C3861: 'snprintf': identifier not found
src\compiler\glsl\opt_dead_builtin_varyings.cpp(344) : error C3861: 'snprintf': identifier not found
src\compiler\glsl\opt_dead_builtin_varyings.cpp(368) : error C3861: 'snprintf': identifier not found
src\compiler\glsl\opt_dead_builtin_varyings.cpp(374) : error C3861: 'snprintf': identifier not found

Build config:
- MS Visual Studio 2013 Update 5
- LLVM 3.9 (last version supporting VS2013)

- Built with -MT CRT threading option.

Scons command line:

scons build=release texture_float=True llvm=yes platform=windows machine=x86 gallium opengl32

NOTES:

Reverting commit 73f1e33d34b2044f2252a73e0fdd827d39724505 and applying the patch proposed in commit 9d220fa950850d751fbbbc2cd4ec24d024fcad70 fixes the compile.  However, as of writing, the resultant binary has not been tested.
Comment 1 Dylan Baker 2018-08-15 21:41:46 UTC
9d220fa950850d751fbbbc2cd4ec24d024fcad70 is in the 18.1.6 release. Can you test again with 18.1.6 and confirm the issue is fixed?
Comment 2 Chris Kawano 2018-08-16 00:45:52 UTC
I can confirm the build has been fixed in v18.1.6.  x86 and x64 were built successfully and binaries were very briefly tested.  Much appreciation!


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.