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

Older versions of SCons are no longer supported #91986

Closed
ultsi opened this issue May 15, 2024 · 7 comments · Fixed by #92041
Closed

Older versions of SCons are no longer supported #91986

ultsi opened this issue May 15, 2024 · 7 comments · Fixed by #92041

Comments

@ultsi
Copy link

ultsi commented May 15, 2024

Tested versions

Reproducible after this commit #91792

System information

20.04.1-Ubuntu - Godot 4.3.dev

Issue description

Newest master fails to build with scons v.3.1.2, which comes with sudo apt install scons on Ubuntu 20.04.

The error:

$ scons platform=linuxbsd 
scons: Reading SConscript files ...
TypeError: 'SConsEnvironment' object is not a mapping:
  File "/home/ultsi/dev/godot/godot-src/SConstruct", line 368:
    opts.Update(env, {**ARGUMENTS, **env})

After removing the old version of scons and installing newest one from pip with pip3 install scons, I was able to build Godot again.

Issue probably is that this step in compile instructions will install an older version of SCons on some distros and compiling will fail.

Steps to reproduce

  1. Install some older version of scons (v3.1.2 tested)
  2. Try to build

Minimal reproduction project (MRP)

empty.zip

zip empty because project not needed.

See also:

Documentation issue? godotengine/godot-docs#9380

@Calinou
Copy link
Member

Calinou commented May 15, 2024

On Windows, we recommend using pip to install an up-to-date SCons, but the Linux compilation instructions never did that for some reason. The most likely rationale is that $HOME/.local/bin is not part of PATH by default on most distributions, so you'd need to add it manually to the PATH to be able to run pip-installed scons (with pip install --user).

We should modify the docs so all platforms recommend installing SCons through pip, and telling the user to ensure that pip-installed programs are in PATH (or prepend it for a single session with export PATH="$HOME/.local/bin:$PATH").

#43377 will need to be updated accordingly as well.

@Calinou Calinou added documentation and removed bug labels May 15, 2024
@AThousandShips
Copy link
Member

Would be useful to update the minimum version check for scons to give better messages as well, if we accept the shift in version limitation

@akien-mga akien-mga added the bug label May 15, 2024
@akien-mga akien-mga added this to the 4.3 milestone May 15, 2024
@akien-mga akien-mga self-assigned this May 15, 2024
@akien-mga akien-mga moved this from Untriaged to In progress / Assigned in Buildsystem Issue Triage May 15, 2024
@akien-mga
Copy link
Member

I'll check which SCons version added what we need, and assess whether we want to bump the min requirement.

@BloodyMess
Copy link

BloodyMess commented May 17, 2024

I'll check which SCons version added what we need, and assess whether we want to bump the min requirement.

I really think the min requirement should NOT be bumped. I'm building and running Godot master branch just fine on an ubuntu 18.0.4 based distro, and the only issue I'm having is this change to the required scons version.

The minimum system and tool requirements should be based on what the engine itself actually needs in order to run, and the build process should be kept compatible with those system & tool versions.

@akien-mga
Copy link
Member

akien-mga commented May 17, 2024

Like all things, it's a tradeoff. If a higher minimum version means we can use more high level features to make the life of contributors easier, saving them a significant amount of time on a regular basis, IMO it's worth it if the counterpart is that users on an EOL distro like Ubuntu 18.04 have to do pip install scons once to compile Godot.

For the record, I do not recommend making Godot builds on Ubuntu 18.04. It's outdated and while the SCons version might be functional enough, the compiler versions have known bugs and you're missing on a lot of performance optimization from using a more modern version of GCC or Clang.

We recommend using our own Linux SDK to compile portable Godot binaries from any Linux distro: https://github.com/godotengine/buildroot/
The usual advice to compile on the oldest distro you aim to support is widespread (I used to give it too), but now obsolete when we have those Linux toolchains already configured for this use case.

@BloodyMess
Copy link

you're missing on a lot of performance optimization from using a more modern version of GCC or Clang.

Actually, I'm not missing that. I build Clang from source also. So I have Clang 16.x on my system.

@akien-mga
Copy link
Member

Then I think you can install SCons 4.7.0 through pip and also enjoy faster build times :)

@github-project-automation github-project-automation bot moved this from Fix pending review to Done in Buildsystem Issue Triage May 17, 2024
MewPurPur pushed a commit to MewPurPur/godot that referenced this issue Jul 11, 2024
2nafish117 pushed a commit to 2nafish117/godot that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants