Skip to content

Conversation

@andreasabel
Copy link
Contributor

@andreasabel andreasabel commented Oct 12, 2023

Motivation: recently, I am getting many failures of CI due to failure of installing GHC from hvr-ppa.
E.g.: https://github.com/MarcWeber/hasktags/actions/runs/6487255991/job/17617157111#step:3:420

Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Created symlink /etc/systemd/user/sockets.target.wants/pk-debconf-helper.socket → /usr/lib/systemd/user/pk-debconf-helper.socket.
Setting up software-properties-common (0.99.9.12) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for dbus (1.12.16-2ubuntu2.3) ...
Cannot add PPA: 'ppa:~hvr/ubuntu/ghc'.
The user named '~hvr' has no PPA named 'ubuntu/ghc'

Also, the hvr-ppa is no longer maintained and it does not look like it will come back.

This PR changes the default installation method from hvr-ppa to ghcup for the versions supported by ghcup.

Commits:

  • Bump GHC building haskell-ci to latest recommended: 9.4.7
  • GitHub: change default from hvr-ppa to ghcup

@andreasabel andreasabel changed the title prefer ghcup GitHub: use ghcup as default (rather than hvr-ppa) Oct 12, 2023
@andreasabel andreasabel marked this pull request as draft October 12, 2023 09:02
@andreasabel
Copy link
Contributor Author

Hang on, 7.10.3 does not work reliably if installed by GHCup, it seems: https://github.com/MarcWeber/hasktags/actions/runs/6493491391/job/17634546377#step:17:175

Failed to build hashable-1.3.5.0.
Build log ( /github/home/.cabal/logs/ghc-7.10.3/hashable-1.3.5.0-806857794f0010de29b7131a08fa7941cd0191f376a591e97bbb391716ccaee6.log ):
Configuring library for hashable-1.3.5.0..
Preprocessing library for hashable-1.3.5.0..
Building library for hashable-1.3.5.0..
[1 of 7] Compiling Data.Hashable.Imports ( src/Data/Hashable/Imports.hs, dist/build/Data/Hashable/Imports.o )
Error: cabal-3.10.1.0: Failed to build hashable-1.3.5.0 (which is required by microlens-platform-0.4.3.4, optparse-applicative-0.18.1.0 and others). See the build log above for details.

[2 of 7] Compiling Data.Hashable.LowLevel ( src/Data/Hashable/LowLevel.hs, dist/build/Data/Hashable/LowLevel.o )
/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
Error: Process completed with exit code 1.

So, should prefer hvr-ppa for GHC 7.10.3 still.

This commit makes `haskell-ci github` prefer the `ghcup` installation
method over the `hvr-ppa` method for all GHC versions that are
properly supported by `ghcup`.
(Excludes GHC 7.10.3 which malfunctions if installed with ghcup.)

Previously, `hvr-ppa` was the default for all versions it supported.
@andreasabel
Copy link
Contributor Author

andreasabel commented Oct 12, 2023

Now only prefers ghcup for 8.0.2, 8.2.2 and >=8.4.1.

Sample run: https://github.com/MarcWeber/hasktags/actions/runs/6493772691/

@andreasabel andreasabel marked this pull request as ready for review October 12, 2023 09:28
byorgey added a commit to diagrams/monoid-extras that referenced this pull request Oct 16, 2023
@phadej
Copy link
Collaborator

phadej commented Oct 17, 2023

This seems to be caused by upstream https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2039411?

Until that bug is resolved (either fixed or closed with wontfix), I won't do anything. Especially if it's not fixed, I'd probably just drop pre bionic and GHC-8 support from haskell-ci completely, and remove hvr-ppa.

@phadej phadej added the blocked label Oct 17, 2023
@andreasabel
Copy link
Contributor Author

One gets the behavior of this PR by adding to each of one's cabal.haskell-ci the line:

ghcup-jobs: >=8.4 || ==8.2.2 || ==8.0.2

To spare me from this, I added the present PR to my fork: https://github.com/andreasabel/haskell-ci

In general, is there a drawback to preferring ghcup? Is it slower maybe?

@hasufell
Copy link
Contributor

hasufell commented Jan 2, 2024

In general, is there a drawback to preferring ghcup? Is it slower maybe?

Don't think so. Ubuntu is a first class citizen in ghcup. If there's an issue with bindists on ubuntu, it will be fixed.

The PPA gives some more flexibility about what files exactly to install (there's more than one package), but other than that, I don't think there's any CI advantage.

@BinderDavid
Copy link

This might also help fix #729

@andreasabel
Copy link
Contributor Author

FYI: My fork https://github.com/andreasabel/haskell-ci uses ghcup as default.

@andreasabel
Copy link
Contributor Author

Due to restructuring of HaskellCI.Config, this PR cannot be applied any more.

@andreasabel andreasabel closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants