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

Cannot compile Godot due error in SConstruct with SCons 4.0.1 #91049

Closed
qarmin opened this issue Apr 23, 2024 · 3 comments · Fixed by #91072
Closed

Cannot compile Godot due error in SConstruct with SCons 4.0.1 #91049

qarmin opened this issue Apr 23, 2024 · 3 comments · Fixed by #91072

Comments

@qarmin
Copy link
Contributor

qarmin commented Apr 23, 2024

Tested versions

Works - 7316918
Not works - 7abe0c6

System information

Ubuntu 22.04 CI

Issue description

scons -j2 dev_build=yes target=editor use_asan=yes use_ubsan=yes linker=gold

cause to show on Github CI this error

 KeyError: 'platform':
  File "/home/runner/work/Qarminer/Qarminer/godot/SConstruct", line 287:
    selected_platform = env["platform"]
  File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 405:
    return self._dict[key]

Probably regression from - #90857

CI job - https://github.com/qarmin/Qarminer/actions/runs/8793092362

Steps to reproduce

Above

Minimal reproduction project (MRP)

N/A

@akien-mga
Copy link
Member

CC @Repiteo

@akien-mga akien-mga added this to the 4.3 milestone Apr 23, 2024
@akien-mga
Copy link
Member

akien-mga commented Apr 23, 2024

I can't reproduce the issue with SCons 4.7.0, but @qarmin's CI uses SCons 4.0.1.

I confirmed the bug with SCons 4.0.1 and 4.2.0, it seems like the syntax used in #90857 was added in SCons 4.3.0.

We currently still support SCons 3.0.0 as minimum version, to be able to support LTS Linux distros:

  • Ubuntu 20.04 LTS has SCons 3.1.2 and Python 3.8.2
  • Ubuntu 22.04 LTS has SCons 4.0.1 and Python 3.10.6

Maybe it's time to bite the bullet and use scons-local... But after removing their docbook sources it's still 68k extra lines of code that we'd vendor, and we'd run into issues where users don't have all the dependencies SCons needs that pip would have installed automatically.

The other option is to drop support for old Ubuntu SCons packages, and force those users to install SCons via pip. But we should test that pip is actually functional on these old distros, in my experience package managers like this tend to break after some time when the repos become centered around the current versions of the language, but your system version is old (like Python 3.8.2 on Ubuntu 20.04).

Finally, we can just revert that PR and bring back support for SCons 3.0.0 for the time being. But the pressure to use newer SCons features keeps increasing with every modernization PR.

@akien-mga akien-mga changed the title Cannot compile Godot due error in SConstruct Cannot compile Godot due error in SConstruct with SCons 4.0.1 Apr 23, 2024
@bruvzg
Copy link
Member

bruvzg commented Apr 23, 2024

I'm getting the same error with Scons 4.0.1, but it is working if platform=linuxbsd is added to the command, so the issue is with auto detection only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants