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

Updating SDCC to 4.5.0 #1511

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Conversation

steveschnepp
Copy link
Contributor

Also changing newer as 4.5.0 is meant as the best 4.x version.

As stated in https://sourceforge.net/p/sdcc/mailman/message/59123734/

Personally, I think SDCC 4.5.0 will be the most stable and
reliable release among SDCC from 4.1.0 to 4.7.0, and
recommend users of previous version to upgrade to
SDCC 4.5.0 soon.

Also changing `newer` as 4.5.0 is meant as the best 4.x version.

As stated in https://sourceforge.net/p/sdcc/mailman/message/59123734/

> Personally, I think SDCC 4.5.0 will be the most stable and
> reliable release among SDCC from 4.1.0 to 4.7.0, and 
> recommend users of previous version to upgrade to 
> SDCC 4.5.0 soon.
bin/yaml/c.yaml Outdated
- 4.2.0
- 4.3.0
- 4.4.0
newer:
untar_dir: sdcc
targets:
- 4.1.0
- 4.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't cause the version to change here. We don't reinstall over directories every time; if the directory exists and the check_exe works, we assume all's well.

I'll take a look and try and work out what's going on here. Our current installations are:

 ls -ld /opt/compiler-explorer/sdcc*
drwxr-xr-x 4 ubuntu ubuntu 6144 Jan 30  2020 /opt/compiler-explorer/sdcc-4.0.0
drwxr-sr-x 4   1001   1001 6144 Mar  6  2021 /opt/compiler-explorer/sdcc-4.1.0
drwxr-xr-x 4 ubuntu ubuntu 6144 Mar  8  2022 /opt/compiler-explorer/sdcc-4.2.0
drwxr-xr-x 5 ubuntu ubuntu 6144 Jul  7  2023 /opt/compiler-explorer/sdcc-4.3.0
drwxr-xr-x 5 ubuntu ubuntu 6144 Jan 29  2024 /opt/compiler-explorer/sdcc-4.4.0

dkm and others added 2 commits January 29, 2025 10:05
…r-explorer#1510)

- Work to add a `ce_install config-dump` command which dumps a sequence of JSON lines of the entire expanded configuration of everything.
-  A change where (carefully) all the `{` were turned into jinja `{{` and `}}` etc. At various stages of this change, and most importantly at the end, the output of `ce_install config-dump` was compared and no actual config changes occurred.
- The ability to use single `{` was removed from the config loader, and tests updated and added.

This should allow single quotes to be used as normal, and in some cases `{% raw %}` type things (though this is not perfect for that, we may need more work, I have ideas on how to fix that but let me know if this is enough to start with @partouf.

Some junky editor config (both from intellij and vscode) made it into the change too, I can extract if it's annoying.

Example of the first few lines of the config dump output:
```json
{"name": "compilers/ada/gnat/arm 10.3.0-2", "type": "TarballInstallable(compilers/ada/gnat/arm 10.3.0-2, arm/gnat-arm-elf-linux64-10.3.0-2)", "config": {"check_file": "", "install_path": "arm/gnat-arm-elf-linux64-10.3.0-2", "language": "ada", "name": "compilers/ada/gnat/arm 10.3.0-2", "remove_older_pattern": "", "target_name": "10.3.0-2", "untar_path": "gnat-arm-elf-linux64-10.3.0-2", "untar_to": ".", "url": "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-10.3.0-2/gnat-arm-elf-linux64-10.3.0-2.tar.gz"}}
{"name": "compilers/ada/gnat/arm 11.2.0-3", "type": "TarballInstallable(compilers/ada/gnat/arm 11.2.0-3, arm/gnat-arm-elf-linux64-11.2.0-3)", "config": {"check_file": "", "install_path": "arm/gnat-arm-elf-linux64-11.2.0-3", "language": "ada", "name": "compilers/ada/gnat/arm 11.2.0-3", "remove_older_pattern": "", "target_name": "11.2.0-3", "untar_path": "gnat-arm-elf-linux64-11.2.0-3", "untar_to": ".", "url": "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-11.2.0-3/gnat-arm-elf-linux64-11.2.0-3.tar.gz"}}
{"name": "compilers/ada/gnat/riscv64 10.3.0-2", "type": "TarballInstallable(compilers/ada/gnat/riscv64 10.3.0-2, riscv64/gnat-riscv64-elf-linux64-10.3.0-2)", "config": {"check_file": "", "install_path": "riscv64/gnat-riscv64-elf-linux64-10.3.0-2", "language": "ada", "name": "compilers/ada/gnat/riscv64 10.3.0-2", "remove_older_pattern": "", "target_name": "10.3.0-2", "untar_path": "gnat-riscv64-elf-linux64-10.3.0-2", "untar_to": ".", "url": "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-10.3.0-2/gnat-riscv64-elf-linux64-10.3.0-2.tar.gz"}}
{"name": "compilers/ada/gnat/riscv64 11.2.0-3", "type": "TarballInstallable(compilers/ada/gnat/riscv64 11.2.0-3, riscv64/gnat-riscv64-elf-linux64-11.2.0-3)", "config": {"check_file": "", "install_path": "riscv64/gnat-riscv64-elf-linux64-11.2.0-3", "language": "ada", "name": "compilers/ada/gnat/riscv64 11.2.0-3", "remove_older_pattern": "", "target_name": "11.2.0-3", "untar_path": "gnat-riscv64-elf-linux64-11.2.0-3", "untar_to": ".", "url": "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-11.2.0-3/gnat-riscv64-elf-linux64-11.2.0-3.tar.gz"}}
{"name": "compilers/nightly/dex2oat dex2oat-latest", "type": "ScriptInstallable(compilers/nightly/dex2oat dex2oat-latest, dex2oat-latest)", "config": {"check_file": "x86_64/bin/dex2oat64", "install_path": "dex2oat-latest", "language": "nightly", "name": "compilers/nightly/dex2oat dex2oat-latest", "script": "mkdir dex2oat-latest\ncd dex2oat-latest\n/home/matthew/dev/ce/infra/bin/yaml/android-java/fetch_art_release_from_head.sh\nunzip art_release.zip\nrm art_release.zip\n/home/matthew/dev/ce/infra/bin/yaml/android-java/create_boot_images.sh", "target_name": "dex2oat-latest"}}
{"name": "compilers/android-d8 8.1.56", "type": "SingleFileInstallable(compilers/android-d8 8.1.56, r8-8.1.56)", "config": {"check_file": "", "filename": "r8-8.1.56.jar", "install_path": "r8-8.1.56", "language": "android-d8", "name": "compilers/android-d8 8.1.56", "target_name": "8.1.56", "url": "https://dl.google.com/android/maven2/com/android/tools/r8/8.1.56/r8-8.1.56.jar"}}
{"name": "compilers/android-d8 8.1.72", "type": "SingleFileInstallable(compilers/android-d8 8.1.72, r8-8.1.72)", "config": {"check_file": "", "filename": "r8-8.1.72.jar", "install_path": "r8-8.1.72", "language": "android-d8", "name": "compilers/android-d8 8.1.72", "target_name": "8.1.72", "url": "https://dl.google.com/android/maven2/com/android/tools/r8/8.1.72/r8-8.1.72.jar"}}
{"name": "compilers/android-d8 8.2.33", "type": "SingleFileInstallable(compilers/android-d8 8.2.33, r8-8.2.33)", "config": {"check_file": "", "filename": "r8-8.2.33.jar", "install_path": "r8-8.2.33", "language": "android-d8", "name": "compilers/android-d8 8.2.33", "target_name": "8.2.33", "url": "https://dl.google.com/android/maven2/com/android/tools/r8/8.2.33/r8-8.2.33.jar"}}
{"name": "compilers/android-d8 8.2.42", "type": "SingleFileInstallable(compilers/android-d8 8.2.42, r8-8.2.42)", "config": {"check_file": "", "filename": "r8-8.2.42.jar", "install_path": "r8-8.2.42", "language": "android-d8", "name": "compilers/android-d8 8.2.42", "target_name": "8.2.42", "url": "https://dl.google.com/android/maven2/com/android/tools/r8/8.2.42/r8-8.2.42.jar"}}
{"name": "compilers/android-d8 8.2.47", "type": "SingleFileInstallable(compilers/android-d8 8.2.47, r8-8.2.47)", "config": {"check_file": "", "filename": "r8-8.2.47.jar", "install_path": "r8-8.2.47", "language": "android-d8", "name": "compilers/android-d8 8.2.47", "target_name": "8.2.47", "url": "https://dl.google.com/android/maven2/com/android/tools/r8/8.2.47/r8-8.2.47.jar"}}
```
@mattgodbolt
Copy link
Member

so; testing this locally:

2025-01-29 10:05:27,905 lib.installation_context INFO     100% of https://downloads.sourceforge.net/project/sdcc/sdcc-linux-amd64/4.5.0/sdcc-4.5.0-amd64-unknown-linux2.5.tar.bz2
2025-01-29 10:05:27,905 lib.installation_context INFO     Piping to tar jxf -
2025-01-29 10:05:32,870 lib.ce_install  INFO     compilers/c/sdcc/newer 4.5.0 failed to install: After unpacking, sdcc was not a directory
Traceback (most recent call last):
  File "/home/matthew/dev/ce/infra/bin/lib/ce_install.py", line 426, in install
    installable.install()
  File "/home/matthew/dev/ce/infra/bin/lib/installable/archives.py", line 239, in install
    self.stage(staging)
  File "/home/matthew/dev/ce/infra/bin/lib/installable/archives.py", line 226, in stage
    raise RuntimeError(f"After unpacking, {self.untar_path} was not a directory")
RuntimeError: After unpacking, sdcc was not a directory

Installing compilers/c/sdcc/older 4.0.0

the 4.5.0 seems to need the untar_dir of the other.

and 4.1.0 fails too:

2025-01-29 10:06:07,206 lib.ce_install  INFO     compilers/c/sdcc/older 4.1.0 failed to install: After unpacking, sdcc-4.1.0 was not a directory
Traceback (most recent call last):
  File "/home/matthew/dev/ce/infra/bin/lib/ce_install.py", line 426, in install
    installable.install()
  File "/home/matthew/dev/ce/infra/bin/lib/installable/archives.py", line 239, in install
    self.stage(staging)
  File "/home/matthew/dev/ce/infra/bin/lib/installable/archives.py", line 226, in stage
    raise RuntimeError(f"After unpacking, {self.untar_path} was not a directory")
RuntimeError: After unpacking, sdcc-4.1.0 was not a directory

I think the condusing here is in the naming: the newer isn't actually used anywhere but was used to "fix" the installation of the 4.1.0. I'll update your PR and merge and install. Sorry for the confusion!

- removes confusing older/newer names
- makes explicit the fact 4.1.0 is different due to an upstream
  packaging change
@mattgodbolt
Copy link
Member

Thanks @steveschnepp - fixed up and again sorry for the confusing naming (fixed now!)

@mattgodbolt mattgodbolt merged commit 5ff8f60 into compiler-explorer:main Jan 29, 2025
5 checks passed
@steveschnepp
Copy link
Contributor Author

Indeed, the current file is now much more clear.

Thanks for your stellar maintainership!

See you for 4.6.0. 😉

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

Successfully merging this pull request may close these issues.

3 participants