Changes in Fedora 40 For Developers

PyTorch

Fedora 40 is the first Fedora release that provides PyTorch, a machine learning framework based on the Torch library, used for applications such as computer vision and natural language processing, originally developed by Meta AI and now part of the Linux Foundation umbrella. It is free and open-source software released under the modified BSD license.

Providing PyTorch as a Fedora package means that users can now use DNF to install instead of pip. The initial version provided in Fedora 40 is 2.1.2. To install, run dnf install python-torch.

To get started with PyTorch, see the official documentation. Those specifically interested in PyTorch in Fedora - developers, packagers, end-users, and so on - may join the PyTorch Fedora Special Interest Group.

PHP 8.3

The stack for the PHP programming language interpreter has been upgraded to version 8.3, which provides multiple bug fixes and enhancements. Notable changes include:

  • Explicit typing of class constants

  • Dynamic class constant fetch

  • New #[\Override] attribute

  • Deep-cloning of readonly properties

  • New json_validate() function

  • New Randomizer::getBytesFromString() method

  • Command line linter supports multiple files

For full extent of updates, see the upstream release notes.

Golang 1.22

Fedora 40 provides Golang version 1.22. See the upstream release notes for a complete list of changes.

Retire Python 3.7

Starting with this release, Python version 3.7 is considered retired without replacement due to being considered End of Life since June 2023.

LLVM 18

All LLVM sub-projects have been updated to version 18, which includes a soname version change for llvm libraries. Compatibility packages clang17, llvm17, and lld17 have been added to ensure that packages that currently depend on clang and llvm version 17 libraries will continue to work.

Other notable changes include:

  • clang will emit DWARF-5 by default instead of DWARF-4. This matches the upstream default. Fedora has been using DWARF-4 as the default for the last few releases due to https://bugzilla.redhat.com/show_bug.cgi?id=2064052.

  • The compatibility packages will now include the same content as the main package. In previous releases, the compatibility packages contained only libraries and headers, and the binaries and other content was stripped out. These packages will be supported for use as dependencies for other RPM packages, but not for general purpose usage by end users. Fedora users should use Clang/LLVM 18.

  • The compatibility packages added for Fedora 40 will be retired prior to the Fedora 41 branch.

  • We will be enabling Fat LTO in redhat-rpm-config if this feature is complete in time for the upstream LLVM 18 release. Fat LTO is a feature that allows the compiler to produce libraries that contain LTO bitcode along side the traditional ELF binary code so that the libraries can be linked in both LTO mode and non-LTO mode. gcc also supports this feature and has it enabled in Fedora. In Fedora 39 and older, with LTO enabled, clang produces binaries with only LTO bitcode, so we need to run a post-processing script (brp-llvm-compile-to-elf) on the libraries to convert them to ELF code so they can be used by other packages. Enabling Fat LTO allows Fedora Project to remove this script and simplify the build process.

See the upstream release notes for details.

GNU toolchain updates

The GNU Compiler Collection, GNU Binary Utilities, GNU C Library, and the GNU Debugger make up the core part of the GNU Toolchain and it is useful for our users to transition these components as a complete implementation when making a new release of Fedora.

Components of the GNU Toolchain (gcc, glibc, binutils, gdb) have been updated to the following versions in Fedora 40:

Boost 1.83

Fedora 40 includes Boost 1.83. For more information, see the upstream release notes.

Ruby 3.3

The Ruby language has been updated to version 3.3 in Fedora 40, up from version 3.2 provided in the previous Fedora release. The new version adds a new parser called Prism, uses Lrama as a parser generator, adds a new pure-Ruby JIT compiler called RJIT, and provides many performance improvements, especially YJIT.

For full details, see the upstream NEWS and the release announcement.

java-21-openjdk as the system JDK

The system JDK has been updated from version 17 to version 21 in Fedora 40.

For more information about Java 21, see the JDK 21 release notes, and the migration guide.

Also see the Change page for a quick FAQ about this change.