Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCons 4.8.0 breaks the current build files #17

Closed
TCROC opened this issue Jul 15, 2024 · 0 comments · Fixed by #18
Closed

SCons 4.8.0 breaks the current build files #17

TCROC opened this issue Jul 15, 2024 · 0 comments · Fixed by #18
Labels
bug Something isn't working

Comments

@TCROC
Copy link

TCROC commented Jul 15, 2024

godot-nir-static can no longer be built with the SCons 4.8.0 update. It appears that wildcard imports no longer work. So things like

from SCons.Variables import *

Won't import BoolVariable and such.

This has been recently discovered on this StackOverflow question: https://stackoverflow.com/questions/78746956/error-name-boolvariable-is-not-defined-when-using-scons-on-godot-with-c

And this blog: https://devcodef1.com/news/1330890/godot-c-error-undefined-boolvariable-in-scons

Note that the only thing in the blog that discusses this error is the title. Then it rambles on about booleans, gdextension, and c++ bindings. I'm guessing it was probably written by AI or something. Impressive that it somehow caught the issue tho! Even tho the proposed answer is wildly incorrect.

The solution is 1 of 2 things:

  1. Require users to be on SCons 2.7.0 or earlier. (I don't reccomend this approach. In my experience, locking in on old versions of software eventually creates future and more challenging headaches).
  2. Change all wildcard imports to explicit imports.

Here are some areas that are affected:

from SCons.Variables import *

from SCons.Variables import *

Also, os now needs to be explicitly imported.

I actually originally reported this over here: godotengine/godot#94410. And as I was grabbing code examples, I realized most (maybe all) examples were from this godot-nir-static repo and the mesa submodule

@Calinou Calinou added the bug Something isn't working label Jul 16, 2024
@TCROC TCROC changed the title SCons 2.8.0 breaks the current build files SCons 4.8.0 breaks the current build files Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants