X11 icon indicating copy to clipboard operation
X11 copied to clipboard

Build from git fails with cabal new-build

Open geekosaur opened this issue 4 years ago • 3 comments

New-build is the default as of cabal 3.x and the v1-commands will be going away, so we should fix this. The build itself succeeds, but the subsequent install fails with

cabal: Failed to build X11-1.9.2 (which is required by exe:xmonad from
xmonad-bsa-0.3). The failure occurred during the final install step. The
exception was:
dieVerbatim: user error (cabal: '/home/allbery/.ghcup/bin/ghc-pkg' exited with
an error:
X11-1.9.2: Warning: haddock-interfaces:
/home/allbery/.xmonad/cabal/dist-newstyle/build/x86_64-linux/ghc-8.10.4/X11-1.9.2/doc/html/X11/X11.haddock
doesn't exist or isn't a file
X11-1.9.2: Warning: haddock-html:
/home/allbery/.xmonad/cabal/dist-newstyle/build/x86_64-linux/ghc-8.10.4/X11-1.9.2/doc/html/X11
doesn't exist or isn't a directory
X11-1.9.2: library-dirs: @X_LIBRARIES@ is a relative path which makes no sense
(as there is nothing for it to be relative to). You can make paths relative to
the package database itself by using ${pkgroot}. (use --force to override)
X11-1.9.2: dynamic-library-dirs: @X_LIBRARIES@ is a relative path which makes
no sense (as there is nothing for it to be relative to). You can make paths
relative to the package database itself by using ${pkgroot}. (use --force to
override)
)

I have not found a combination of aclocal/autoreconf/etc. commands which help with this, and the error doesn't appear to be raised by anything that is actually part of the install, so it is likely some interaction with newer Cabal that causes it.

geekosaur avatar Feb 07 '21 19:02 geekosaur

This used to work apparently, per https://github.com/xmonad/xmonad/issues/199#issuecomment-609433196; I don't know when it broke, and whether it was an xmonad/X11 change or a cabal (or Cabal) change.

geekosaur avatar Feb 07 '21 21:02 geekosaur

And it turns out that the released version still builds fine. Are the instructions perhaps out of date and it takes more than just autoreconf to prepare the git version for building?

geekosaur avatar Feb 08 '21 14:02 geekosaur

In fact this appears to work again with cabal-install 3.4. We may have to exclude cabal-install 3.2 from use for building, if possible.

geekosaur avatar Mar 21 '21 15:03 geekosaur