[darcs-devel] Upgrading build tools and darcs on darcs.net

Ben Franksen ben.franksen at online.de
Wed May 12 11:11:15 UTC 2021


Am 11.05.21 um 19:52 schrieb Ganesh Sittampalam:
> On 11/05/2021 10:13, Ben Franksen wrote:
> 
>> We should also repair our own repos on darcs.net. But we can't build a
>> current darcs on that machine. I can build darcs-2.16.3 on Debian 7, but
>> will such a binary work on Debian 6 (which is what darcs.net runs)?
> 
> We could just repair them elsewhere and copy the result back up.

Yes, if all else fails this would be our last straw.

However, in the meantime I managed to upgrade the build tools. I found
that somebody already had a ghc-7.10.3 installed locally for the
darcs-unstable user. So I could directly build ghc-8.2.2 from source and
install it locally into ~darcs-unstable/ghc-8.2.2. I used this compiler
version to install cabal-install-3.0.0.0 and could then build and
install the latest darcs version (2.16.3).

The main initial problem with this was that there wasn't enough space
left on the disk (20GB is a bit tight nowadays). I solved this with
judiciously removing obsolete directories that took a lot of disk space
e.g. ~darcs-unstable/build, the package cache (/var/cache/apt/packages)
and a few more. Since that wasn't enough I also went through the home
directories and compressed a number of directories to tar.xz files (e.g.
droundy's old email directories). After installing everything I could
remove the build directory for ghc-8.2.2 so there is now a bit more than
2GB space left. (TODO: ask David if we can permanently remove his
account on darcs.net, including all of /home/droundy. There is a lot of
private stuff in there that he almost certainly completely forgot about.
This would free up another 800MB.)

The next hurdle was that some libraries failed to build because of
missing system headers or hardware capabilities. This could be solved by
adding suitable flags. I have also changed a few defaults for cabal, the
config file now has:

install-method: copy
installdir: /home/darcs-unstable/bin
extra-prog-path: /home/darcs-unstable/bin
constraint: cryptonite -support_aesni -support_rdrand
constraint: lukko -ofd-locking

This means that a plain `cabal install darcs` will install the latest
version of darcs into ~/bin. Before doing that, one should rename the
existing one to darcs-<version>.

I deleted ~/.cabal/bin with its ancient versions of some haskell build
tools and removed ~/.cabal/bin from the PATH (~/.bash_profile).

(I also tried to upgrade cabal-install to 3.2.0.0, but unfortunately
this failed because the machine doesn't have enough memory to compile
later versions of the Cabal library. This is not a problem, version
3.0.0.0 seems to work fine.)

Cheers
Ben
-- 
I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman




More information about the darcs-devel mailing list