[ANNOUNCE] GHC 9.4.1-rc1 is now available

The GHC developers are happy to announce the availability of the first (and likely last) release candidate of GHC 9.4.1. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org]. This major release will include: - A new profiling mode, `-fprof-late`, which adds automatic cost-center annotations to all top-level functions *after* Core optimisation has run. This provides informative profiles while interfering significantly less with GHC's aggressive optimisations, making it easier to understand the performance of programs which depend upon simplification.. - A variety of plugin improvements including the introduction of a new plugin type, *defaulting plugins*, and the ability for typechecking plugins to rewrite type-families. - An improved constructed product result analysis, allowing unboxing of nested structures, and a new boxity analysis, leading to less reboxing. - Introduction of a tag-check elision optimisation, bringing significant performance improvements in strict programs. - Generalisation of a variety of primitive types to be levity polymorphic. Consequently, the `ArrayArray#` type can at long last be retired, replaced by standard `Array#`. - Introduction of the `\cases` syntax from [GHC proposal 0302] - A complete overhaul of GHC's Windows support. This includes a migration to a fully Clang-based C toolchain, a deep refactoring of the linker, and many fixes in WinIO. - Support for multiple home packages, significantly improving support in IDEs and other tools for multi-package projects. - A refactoring of GHC's error message infrastructure, allowing GHC to provide diagnostic information to downstream consumers as structured data, greatly easing IDE support. - Significant compile-time improvements to runtime and memory consumption. - On overhaul of our packaging infrastructure, allowing full traceability of release artifacts and more reliable binary distributions. - Reintroduction of deep subsumption (which was previously dropped with the *simplified subsumption* change) as a language extension. - ... and much more. See the [release notes] for a full accounting. Note that, as 9.4.1 is the first release for which the released artifacts will all be generated by our Hadrian build system, it is possible that there will be packaging issues. If you enounter trouble while using a binary distribution, please open a [ticket]. Likewise, if you are a downstream packager, do consider migrating to [Hadrian] to run your build; the Hadrian build system can be built using `cabal-install`, `stack`, or the in-tree [bootstrap script]. We will be publishing a blog post describing the migration process to Hadrian in the coming weeks. We would like to thank Microsoft Azure, GitHub, IOG, the Zw3rk stake pool, Tweag I/O, Serokell, Equinix, SimSpace, the Haskell Foundation, and other anonymous contributors whose on-going financial and in-kind support has facilitated GHC maintenance and release management over the years. Finally, this release would not have been possible without the hundreds of open-source contributors whose work comprise this release. As always, do give this release a try and open a [ticket] if you see anything amiss. Happy testing, - Ben [downloads.haskell.org]: https://downloads.haskell.org/ghc/9.4.1-rc1/ [GHC proposal 0302]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0302-ca... [ticket]: https://gitlab.haskell.org/ghc/ghc/-/issues/new [bootstrap script]: https://gitlab.haskell.org/ghc/ghc/-/blob/e2520df3fffa0cf22fb19c5fb872832d11... [Hadrian]: https://gitlab.haskell.org/ghc/ghc/-/blob/e2520df3fffa0cf22fb19c5fb872832d11... [release notes]: https://downloads.haskell.org/~ghc/9.4.1-rc1/docs/users_guide/9.4.1-notes.ht...

On Fri, 22 Jul 2022, Ben Gamari wrote:
The GHC developers are happy to announce the availability of the first (and likely last) release candidate of GHC 9.4.1. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org].
I try https://downloads.haskell.org/ghc/9.4.1-rc1/ghc-9.4.0.20220721-x86_64-deb11-... on Debian 11. $ /usr/local/ghc-9.4.0/bin/ghc --version /usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/bin/ghc-9.4.0.20220721: error while loading shared libraries: libffi.so.8: cannot open shared object file: No such file or directory Debian 11 seems to support only libffi7: $ dpkg --list "*libffi*" ii libffi-dev:amd64 3.3-6 amd64 Foreign Function Interface library (development files) un libffi4-dev <keine> <keine> (keine Beschreibung vorhanden) ii libffi7:amd64 3.3-6 amd64 Foreign Function Interface library runtime ii libffi7:i386 3.3-6 i386 Foreign Function Interface library runtime I think this dependency is new and was not present in the Alpha releases. Also many directories have no read and cd permissions for 'other' users.

Hi Henning, I can't reproduce this error you are seeing. How are you
installing the compiler? GHC should use the in-tree libffi which is
the correct version.
https://gitlab.haskell.org/ghc/ghc/-/issues/21956#note_446298
On Thu, Jul 28, 2022 at 5:27 PM Henning Thielemann
On Fri, 22 Jul 2022, Ben Gamari wrote:
The GHC developers are happy to announce the availability of the first (and likely last) release candidate of GHC 9.4.1. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org].
I try
https://downloads.haskell.org/ghc/9.4.1-rc1/ghc-9.4.0.20220721-x86_64-deb11-...
on Debian 11.
$ /usr/local/ghc-9.4.0/bin/ghc --version /usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/bin/ghc-9.4.0.20220721: error while loading shared libraries: libffi.so.8: cannot open shared object file: No such file or directory
Debian 11 seems to support only libffi7:
$ dpkg --list "*libffi*"
ii libffi-dev:amd64 3.3-6 amd64 Foreign Function Interface library (development files) un libffi4-dev <keine> <keine> (keine Beschreibung vorhanden) ii libffi7:amd64 3.3-6 amd64 Foreign Function Interface library runtime ii libffi7:i386 3.3-6 i386 Foreign Function Interface library runtime
I think this dependency is new and was not present in the Alpha releases.
Also many directories have no read and cd permissions for 'other' users. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, I can't reproduce this error you are seeing. How are you installing the compiler?
I used this archive: https://downloads.haskell.org/ghc/9.4.1-rc1/ghc-9.4.0.20220721-x86_64-deb11-... $ tar xf ghc-9.4.0.20220721-x86_64-deb11-linux.tar.lz $ cd ghc-9.4.0.20220721-x86_64-unknown-linux/ $ ./configure --prefix=/usr/local/ghc-9.4.0 $ sudo make install
GHC should use the in-tree libffi which is the correct version.
Interesting, maybe it is not used because it has wrong permissions, like some other files.

Hi Henning, which files in particular have the wrong permissions? They
look fine on my machine.
Matt
On Wed, Aug 3, 2022 at 10:42 AM Henning Thielemann
On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, I can't reproduce this error you are seeing. How are you installing the compiler?
I used this archive: https://downloads.haskell.org/ghc/9.4.1-rc1/ghc-9.4.0.20220721-x86_64-deb11-...
$ tar xf ghc-9.4.0.20220721-x86_64-deb11-linux.tar.lz $ cd ghc-9.4.0.20220721-x86_64-unknown-linux/ $ ./configure --prefix=/usr/local/ghc-9.4.0 $ sudo make install
GHC should use the in-tree libffi which is the correct version.
Interesting, maybe it is not used because it has wrong permissions, like some other files.

On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, which files in particular have the wrong permissions? They look fine on my machine.
$ ls -al /usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/bin/ drwxr-xr-x 2 root root 520 4. Aug 16:19 . drwxr-xr-x 4 root root 80 4. Aug 16:19 .. lrwxrwxrwx 1 root root 18 4. Aug 16:19 ghc -> ghc-9.4.0.20220721 -rwx------ 1 root root 2150120 4. Aug 16:19 ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 28 4. Aug 16:19 ghc-iserv -> ghc-iserv-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 32 4. Aug 16:19 ghc-iserv-dyn -> ghc-iserv-dyn-ghc-9.4.0.20220721 -rwx------ 1 root root 34856 4. Aug 16:19 ghc-iserv-dyn-ghc-9.4.0.20220721 -rwx------ 1 root root 32991032 4. Aug 16:19 ghc-iserv-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 33 4. Aug 16:19 ghc-iserv-prof -> ghc-iserv-prof-ghc-9.4.0.20220721 -rwx------ 1 root root 53225472 4. Aug 16:19 ghc-iserv-prof-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 22 4. Aug 16:19 ghc-pkg -> ghc-pkg-9.4.0.20220721 -rwx------ 1 root root 475864 4. Aug 16:19 ghc-pkg-9.4.0.20220721 lrwxrwxrwx 1 root root 26 4. Aug 16:19 haddock -> haddock-ghc-9.4.0.20220721 -rwx------ 1 root root 5448368 4. Aug 16:19 haddock-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 24 4. Aug 16:19 hp2ps -> hp2ps-ghc-9.4.0.20220721 -rwx------ 1 root root 43696 4. Aug 16:19 hp2ps-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 22 4. Aug 16:19 hpc -> hpc-ghc-9.4.0.20220721 -rwx------ 1 root root 647312 4. Aug 16:19 hpc-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 25 4. Aug 16:19 hsc2hs -> hsc2hs-ghc-9.4.0.20220721 -rwx------ 1 root root 694104 4. Aug 16:19 hsc2hs-ghc-9.4.0.20220721 lrwxrwxrwx 1 root root 21 4. Aug 16:19 runghc -> runghc-9.4.0.20220721 -rwx------ 1 root root 51704 4. Aug 16:19 runghc-9.4.0.20220721 lrwxrwxrwx 1 root root 21 4. Aug 16:19 runhaskell -> runghc-9.4.0.20220721 lrwxrwxrwx 1 root root 21 4. Aug 16:19 runhaskell-9.4.0.20220721 -> runghc-9.4.0.20220721 lrwxrwxrwx 1 root root 24 4. Aug 16:19 unlit -> unlit-ghc-9.4.0.20220721 -rwx------ 1 root root 13248 4. Aug 16:19 unlit-ghc-9.4.0.20220721 $ find /usr/local/ghc-9.4.0/ -iname "libffi*" find: ‘/usr/local/ghc-9.4.0/share/doc/ghc-9.4.0.20220721/html’: no permission find: ‘/usr/local/ghc-9.4.0/share/doc/ghc-9.4.0.20220721/archives’: no permission find: ‘/usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/lib/x86_64-linux-ghc-9.4.0.20220721’: no permission find: ‘/usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/lib/package.conf.d’: no permission find: ‘/usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/lib/latex’: no permission find: ‘/usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/lib/html’: no permission find: ‘/usr/local/ghc-9.4.0/lib/ghc-9.4.0.20220721/lib/bin’: no permission

Henning Thielemann
On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, which files in particular have the wrong permissions? They look fine on my machine.
I suspect that the problem is that Hadrian's bindist Makefile is using plain `cp` to copy binaries, etc. into place. This is almost certainly wrong. We should be using either `install` or, at very least, `cp -p`. That being said, like Matt, I am also unable to reproduce this locally in a Debian 11 docker image. Cheers, - Ben

Ben Gamari
Henning Thielemann
writes: On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, which files in particular have the wrong permissions? They look fine on my machine.
I suspect that the problem is that Hadrian's bindist Makefile is using plain `cp` to copy binaries, etc. into place. This is almost certainly wrong. We should be using either `install` or, at very least, `cp -p`.
I have opened #21965 to track this issue. Cheers, - Ben

On Thu, 4 Aug 2022, Ben Gamari wrote:
Henning Thielemann
writes: On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, which files in particular have the wrong permissions? They look fine on my machine.
I suspect that the problem is that Hadrian's bindist Makefile is using plain `cp` to copy binaries, etc. into place. This is almost certainly wrong. We should be using either `install` or, at very least, `cp -p`.
I guess that 'install' is better, yes.
That being said, like Matt, I am also unable to reproduce this locally in a Debian 11 docker image.
strange

Henning Thielemann
On Thu, 4 Aug 2022, Ben Gamari wrote:
Henning Thielemann
writes: On Wed, 3 Aug 2022, Matthew Pickering wrote:
Hi Henning, which files in particular have the wrong permissions? They look fine on my machine.
I suspect that the problem is that Hadrian's bindist Makefile is using plain `cp` to copy binaries, etc. into place. This is almost certainly wrong. We should be using either `install` or, at very least, `cp -p`.
I guess that 'install' is better, yes.
Henning, Could you perhaps try testing the Debian 11 binary distribution from !8763 (specifically, the artifact from [1] when it is finished)? I believe this change will fix your issue. Cheers, - Ben [1] https://gitlab.haskell.org/ghc/ghc/-/jobs/1130855

On Thu, 4 Aug 2022, Ben Gamari wrote:
Henning Thielemann
writes: I guess that 'install' is better, yes.
Henning,
Could you perhaps try testing the Debian 11 binary distribution from !8763 (specifically, the artifact from [1] when it is finished)? I believe this change will fix your issue.
I downloaded and tested the archive. The installation from this archive works in the sense that I can run ghc-9.5, but then it looks not right. E.g. most files in /usr/local/ghc-9.5/lib/ghc-9.5.20220804/lib/ are owned by the private user who unpacked the tarball and ran configure. The permissions are exclusive to this user. Instead, they should belong to 'root' and have read and executable permissions for all users. I installed by the usual steps: $ tar xf ... $ ./configure --prefix=/usr/local/ghc-9.5 $ sudo make install The 'sudo' before 'make' should install all files for user 'root', not the private user.

Henning Thielemann
On Thu, 4 Aug 2022, Ben Gamari wrote:
Henning Thielemann
writes: I guess that 'install' is better, yes.
Henning,
Could you perhaps try testing the Debian 11 binary distribution from !8763 (specifically, the artifact from [1] when it is finished)? I believe this change will fix your issue.
I downloaded and tested the archive.
The installation from this archive works in the sense that I can run ghc-9.5, but then it looks not right. E.g. most files in
/usr/local/ghc-9.5/lib/ghc-9.5.20220804/lib/
are owned by the private user who unpacked the tarball and ran configure. The permissions are exclusive to this user. Instead, they should belong to 'root' and have read and executable permissions for all users.
Henning, What is the umask in your environment (e.g. just running the `umask` command on the shell will print it). Cheers, - Ben

On Fri, 5 Aug 2022, Ben Gamari wrote:
What is the umask in your environment (e.g. just running the `umask` command on the shell will print it).
The now released GHC-9.4.1-deb11-amd64 bindist correctly generates files for user 'root' and with global read permissions. Except: $ ll /usr/local/ghc-9.4.1/lib/ghc-9.4.1/lib/package.conf.d drwxr-xr-x 1 root root 3356 8. Aug 11:15 . drwxr-xr-x 1 root root 240 8. Aug 11:15 .. -rw------- 1 root root 1666 8. Aug 11:15 array-0.5.4.0.conf -rw------- 1 root root 1666 8. Aug 11:15 array-0.5.4.0.conf.copy -rw------- 1 root root 6344 8. Aug 11:15 base-4.17.0.0.conf -rw------- 1 root root 6344 8. Aug 11:15 base-4.17.0.0.conf.copy -rw------- 1 root root 1897 8. Aug 11:15 binary-0.8.9.1.conf -rw------- 1 root root 1897 8. Aug 11:15 binary-0.8.9.1.conf.copy ... The global read permissions for the *.conf files are missing.

Henning Thielemann
On Fri, 5 Aug 2022, Ben Gamari wrote:
What is the umask in your environment (e.g. just running the `umask` command on the shell will print it).
The now released GHC-9.4.1-deb11-amd64 bindist correctly generates files for user 'root' and with global read permissions. Except:
$ ll /usr/local/ghc-9.4.1/lib/ghc-9.4.1/lib/package.conf.d drwxr-xr-x 1 root root 3356 8. Aug 11:15 . drwxr-xr-x 1 root root 240 8. Aug 11:15 .. -rw------- 1 root root 1666 8. Aug 11:15 array-0.5.4.0.conf -rw------- 1 root root 1666 8. Aug 11:15 array-0.5.4.0.conf.copy -rw------- 1 root root 6344 8. Aug 11:15 base-4.17.0.0.conf -rw------- 1 root root 6344 8. Aug 11:15 base-4.17.0.0.conf.copy -rw------- 1 root root 1897 8. Aug 11:15 binary-0.8.9.1.conf -rw------- 1 root root 1897 8. Aug 11:15 binary-0.8.9.1.conf.copy ...
The global read permissions for the *.conf files are missing.
Hmm, yes, this is a trickier case. The problem appears to be the fact that the Makefile's `patchpackageconf` helper `mv`'s over the .conf file installed via `install` with a file create by the shell. I'll reopen #21965 and post a fix shortly. Out of curiosity, have you set umask to 077 intentionally or is this somehow accidental? This does seem like a very strange configuration (although GHC should work nevertheless). Cheers, - Ben

On Mon, 8 Aug 2022, Ben Gamari wrote:
Out of curiosity, have you set umask to 077 intentionally or is this somehow accidental? This does seem like a very strange configuration (although GHC should work nevertheless).
It is set by intention. The configuring user is an unprivileged one. Is this uncommon?

I think umask addresses a different issue than "unprivileged user". In
any case, yes, 077 is fairly uncommon; if you have that much need for
privacy then perhaps you should not be using the system in the first
place.
On Mon, Aug 8, 2022 at 9:56 AM Henning Thielemann
On Mon, 8 Aug 2022, Ben Gamari wrote:
Out of curiosity, have you set umask to 077 intentionally or is this somehow accidental? This does seem like a very strange configuration (although GHC should work nevertheless).
It is set by intention. The configuring user is an unprivileged one. Is this uncommon? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

On Mon, 8 Aug 2022, Brandon Allbery wrote:
I think umask addresses a different issue than "unprivileged user". In any case, yes, 077 is fairly uncommon; if you have that much need for privacy then perhaps you should not be using the system in the first place.
Are you the only user on the machine?

On my current machine, yes. On various machines in the past, no; but
anything I wasn't comfortable with others seeing didn't touch those
machines, because if nothing else (other) sysadmins would see them. So
022 was an acceptable umask.
On Mon, Aug 8, 2022 at 10:02 AM Henning Thielemann
On Mon, 8 Aug 2022, Brandon Allbery wrote:
I think umask addresses a different issue than "unprivileged user". In any case, yes, 077 is fairly uncommon; if you have that much need for privacy then perhaps you should not be using the system in the first place.
Are you the only user on the machine?
-- brandon s allbery kf8nh allbery.b@gmail.com

On 08/08/2022 15.59, Brandon Allbery wrote:
I think umask addresses a different issue than "unprivileged user". In any case, yes, 077 is fairly uncommon; if you have that much need for privacy then perhaps you should not be using the system in the first place.
Yes and no. It prevents a program which drops privileges (e.g. sshd) at the start from reading arbitrary user files, so if there are post-startup remote vulnerabilities it's unable to exfiltrate all your user data. (Obviously one has to trust the program up to that point, but that's a much smaller attack surface.) I find it a good general practice in terms of Defense in Depth -- especially as it actually really shouldn't cause issues one a single-user system. (It *is* probably uncommon as you say, though. I believe most distros default to 022.) Regards,
participants (6)
-
Bardur Arantsson
-
Ben Gamari
-
Ben Gamari
-
Brandon Allbery
-
Henning Thielemann
-
Matthew Pickering