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

cabal install --enable-relocatable error "Installation directories are not prefix_relative", v3.12+ #10755

Open
essandess opened this issue Jan 17, 2025 · 1 comment

Comments

@essandess
Copy link

Describe the bug
cabal fails to install itself if the flag --enable-relocatable is used, with error Installation directories are not prefix_relative: InstallDirs.libsubdir.

To Reproduce
Steps to reproduce the behavior:

$ cabal --version
cabal-install version 3.14.1.1
compiled using version 3.14.1.1 of the Cabal library

$ cabal install cabal-install -j24 --install-method=copy --enable-relocatable
Resolving dependencies...
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
 - base16-bytestring-1.0.2.0 (lib) (requires build)
 - base64-bytestring-1.2.1.0 (lib) (requires build)
 - cryptohash-sha256-0.11.102.1 (lib) (requires build)
 - ed25519-0.0.5.0 (lib) (requires build)
…
 - cabal-install-solver-3.14.1.0 (lib) (requires build)
 - cabal-install-3.14.1.1 (lib) (requires build)
 - cabal-install-3.14.1.1 (exe:cabal) (requires build)
Starting     base16-bytestring-1.0.2.0 (lib)
Starting     regex-base-0.94.0.2 (lib)
…
Installing   cabal-install-solver-3.14.1.0 (lib)
Completed    cabal-install-solver-3.14.1.0 (lib)
Starting     cabal-install-3.14.1.1 (lib)

Failed to build cabal-install-3.14.1.1. The failure occurred during the
configure step.
Build log (
/Users/st15573/.cache/cabal/logs/ghc-9.6.6/cbl-nstll-3.14.1.1-5bb6e341.log ):
Configuring library for cabal-install-3.14.1.1...
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
Error: [Cabal-7125]
Failed to build cabal-install-3.14.1.1 (which is required by exe:cabal from cabal-install-3.14.1.1). See the build log above for details.

Expected behavior
This install works if the flag --enable-relocatable is omitted. This works:

$ cabal install cabal-install -j24 --install-method=copy

System information

  • macOS Sequoia
  • cabal 3.14.1.1, ghc 9.6.6

The issue is observed to have started in cabal 3.12.1.0.

Additional context
Related: #10155

@essandess
Copy link
Author

Note: this issue affects all cabal projects I've tested, not just cabal-install.

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

No branches or pull requests

1 participant