xmonad / X11

A Haskell binding to the X11 graphics library.

Home Page:http://hackage.haskell.org/package/X11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build from git fails with cabal new-build

geekosaur opened this issue · 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.

This used to work apparently, per xmonad/xmonad#199 (comment); I don't know when it broke, and whether it was an xmonad/X11 change or a cabal (or Cabal) change.

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?

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.