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

[Help needed] cabal: update to 3.14.1.1, fix livecheck #27341

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

i0ntempest
Copy link
Member

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y / Command Line Tools x.y.z

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@essandess for port cabal.

@macportsbot macportsbot added type: update maintainer: open Affects an openmaintainer port by: member Created by a member with commit rights labels Jan 8, 2025
@i0ntempest i0ntempest marked this pull request as draft January 8, 2025 18:38
@i0ntempest
Copy link
Member Author

Need some help figuring out what causes these errors, this appears for every single package in the build process:

  Failed to build base16-bytestring-1.0.2.0. The failure occurred during the
  configure step.
  Build log (
  /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_lang_cabal/cabal/work/.home/.cabal/logs/ghc-9.6.6/bs16-bytstrng-1.0.2.0-7247b4c4.log
  ):
  Configuring library for base16-bytestring-1.0.2.0...
  Error: [Cabal-6000]
  Installation directories are not prefix_relative:
  internal error InstallDirs.libsubdir
  CallStack (from HasCallStack):
    error, called at src/Distribution/Simple/InstallDirs.hs:146:19 in Cabal-3.14.1.1-inplace:Distribution.Simple.InstallDirs

@i0ntempest
Copy link
Member Author

i0ntempest commented Jan 10, 2025

Could be related to haskell/cabal@7b90583#diff-75fd17261492224c3fc06b8100ea6177b5ac7e3bd98a75c699dd2524d42f1da2.
Build fine if I use cabal-prebuilt 3.10.3, but the resulting binary would fail to build any port with the same error.

@i0ntempest i0ntempest changed the title cabal: update to 3.14.1.1, fix livecheck [Help needed] cabal: update to 3.14.1.1, fix livecheck Jan 10, 2025
@essandess
Copy link
Contributor

I see the same thing. Recent cabal versions change the way they bootstrap and the build approach in the current Portfile no longer works. I’ve tried a few obvious things and posted this issue, but I don’t know how to bootstrap cabal anymore and I’m not aware of upstream instructions that say how to build it.

We can either wait until one of us gets the cycles to figure it out and update the Portfile, or simply fallback to the prebuilt versions, which I expect would cause a lot of breakage for older systems.

haskell/cabal#10155

@esafak
Copy link
Contributor

esafak commented Jan 15, 2025

I can't even install downstream packages like 'eza' because the current version of cabal is incompatible with the recently upgraded version of ghc.

@essandess
Copy link
Contributor

I have a basic cabal install cabal-install working with the latest versions of cabal and ghc, and have traced this issue to some flag setting incompatibility in either PG haskell_cabal or the Portfile or both. I’m working to come up with a MacPorts-specific build formula.

@essandess
Copy link
Contributor

I have a basic cabal install cabal-install working with the latest versions of cabal and ghc, and have traced this issue to some flag setting incompatibility in either PG haskell_cabal or the Portfile or both. I’m working to come up with a MacPorts-specific build formula.

I believe that this issue is caused by a cabal install --enable-relocatable bug that started in version 3.12.1.0. I’m working to update MacPorts to build the latest cabal version by sidestepping this bug.

I have some concern that the issue could extend to all ports that use PG haskell_cabal because obviously we want relocatable binaries. I think the only path forward is to get cabal updated and building again, then hope this is a cabal-specific issue, and figure out the fix if it’s a global issue.

See: haskell/cabal#10755

@essandess
Copy link
Contributor

This issue is now fixed and working in #27414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights maintainer: open Affects an openmaintainer port type: update
Development

Successfully merging this pull request may close these issues.

4 participants