Created attachment 143208 [details] Mesa3D MSVC build fails with Scons >= 3.0.2 It appears that Scons 3.0.3 and newer (3.0.4 at the time of writing this) cannot be used to build Mesa3D. Have to stick to 3.0.1. Scons 3.0.2 has been quickly pulled. Something trips the build into looking for a missing header.
Created attachment 143412 [details] Scons source code bisect to determine when this became an issue.
Created attachment 143462 [details] [review] A hack patch that removes the functionality from the build system that Scons >= 3.0.2 doesn't like
If you comment out line 311 in mesascons/gallium.py # env.Decider('MD5-timestamp') You can use SCons 3.0.4. 3.0.4 had a bugfix for a longstanding issue where it was possible that md5-timestamp in conjunction with changing the number of implicit dependencies (think header files) could yield (infrequently) corrupted content signatures in the sconsign file. By defaulting the decider to MD5, you'll have a temporary workaround and be able to use SCons 3.0.4 I'm investigating this further currently. It looks like with the bugfix in 3.0.4 api_exec.obj somehow doesn't have nir_opcodes.h (which is a generated file) as an implicit dependency, thus nir_opcodes.h isn't being generated before api_exec.c is compiled.
Created attachment 143466 [details] [review] Trial patch to fix issue Trial patch to SCons to address issue. Please apply to SCons/Node/FS.py and let me know if it resolves the issue. The bug seems to be windows only and has to do with looking up info about previous build to decide if a target needs to be built. I'm still running tests locally on it against mesa win build. Next I'll run against SCons' own test suite.
Found some issues with the patch I attached. Should have an updated one tomorrow.
How about this as workaround: diff --git a/scons/gallium.py b/scons/gallium.py index 963834a5fbc..565f19f3f1a 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -308,7 +308,10 @@ def generate(env): if env.GetOption('num_jobs') <= 1: env.SetOption('num_jobs', num_jobs()) - env.Decider('MD5-timestamp') + scons_version = distutils.version.StrictVersion(SCons.__version__) + if scons_version < distutils.version.StrictVersion('3.0.2') or \ + scons_version >= distutils.version.StrictVersion('3.0.4'): + env.Decider('MD5-timestamp') env.SetOption('max_drift', 60) # C preprocessor options
I'd go for this way as 3.0.4 is also affected: diff --git a/scons/gallium.py b/scons/gallium.py index 963834a5fbc..565f19f3f1a 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -308,7 +308,10 @@ def generate(env): if env.GetOption('num_jobs') <= 1: env.SetOption('num_jobs', num_jobs()) - env.Decider('MD5-timestamp') + scons_version = distutils.version.StrictVersion(SCons.__version__) + if scons_version < distutils.version.StrictVersion('3.0.2') or \ + scons_version > distutils.version.StrictVersion('3.0.4'): + env.Decider('MD5-timestamp') env.SetOption('max_drift', 60) # C preprocessor options
(In reply to Alex Granni from comment #7) > I'd go for this way as 3.0.4 is also affected. OK. I'll assume I have your Tested-By and post it for review.
Workaround pushed. Thanks everybody.
If you'd like to be notified when the fix gets merged into SCons please add yourself to: https://github.com/SCons/scons/pull/3311 Hopefully I'll get this wrapped up (need a test to cover this) and into master this weekend and it'll make it into the next release (3.0.5 or 3.1 are the most likely version strings)
I've pushed out an alpha package for you to verify your issue is now resolved. https://github.com/SCons/scons/releases/tag/3.0.5a2 Also available at: pip install --index-url https://test.pypi.org/simple/ scons==3.0.5.a2 Please let us know if this works!
Yes, 3.0.5.a.2 has this problem solved. Thank you.
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.