Trouble installing GHCup on another filesystem on an external device

Hello, I’m trying to install GHCup on ~/T7data, which is the mount point for an ecryptfs filesystem which is itself stored on an external device. I ran the following:

curl --proto '=https' --tlsv1.2 -sSf | sh
[ Info  ] Installing GHC (this may take a while)
[ ghc-make ] chmod +x                                 "/home/alan/T7data/.ghcup/tmp/ghcup-cf9977c25132027b/home/alan/T7data/.ghcup/ghc/9.2.4/bin/ghci-9.2.4"
[ ghc-make ] "rm" -f "/home/alan/T7data/.ghcup/tmp/ghcup-cf9977c25132027b/home/alan/T7data/.ghcup/ghc/9.2.4/bin/ghci"  
[ ghc-make ] cp -pR ghci-9.2.4 "/home/alan/T7data/.ghcup/tmp/ghcup-cf9977c25132027b/home/alan/T7data/.ghcup/ghc/9.2.4/bin/ghci"
[ ghc-make ] cp: cannot stat 'ghci-9.2.4': No such file or directory
[ ghc-make ] gmake[1]: *** [driver/ghci/ install_driver_ghci] Error 1
[ ghc-make ] gmake: *** [Makefile:51: install] Error 2
[ Warn  ] Couldn't remove build dir /home/alan/T7data/.ghcup/tmp/ghcup-351e9da2edde3708, error was: /home/alan/T7data/.ghcup/tmp/ghcup-351e9da2edde3708/ghc-9.2.4/compiler/stage2/doc/html/ghc/src: removePathForcibly:removePathForcibly:removePathForcibly:removePathForcibly:removePathForcibly:removePathForcibly:removePathForcibly:removePathForcibly:removeDirectory: unsatisfied constraints (Directory not empty)
[ Error ] Process "gmake" with arguments ["DESTDIR=/home/alan/T7data/.ghcup/tmp/ghcup-cf9977c25132027b",
[ ...   ]                                 "install"] failed with exit code 2.
[ Error ] Also check the logs in /home/alan/T7data/.ghcup/logs
"_eghcup --cache install ghc recommended" failed!

Even though the directory appears empty (no hidden files either), I cannot delete them even with rm -rf. I get the error:

rm: cannot remove 'T7data/.ghcup/tmp/ghcup-351e9da2edde3708/ghc-9.2.4/compiler/stage2/doc/html/ghc/src': Directory not empty
rm: cannot remove 'T7data/.ghcup/tmp/ghcup-351e9da2edde3708/ghc-9.2.4/libraries/Cabal/Cabal/dist-install/doc/html/Cabal/src': Directory not empty
rm: cannot remove 'T7data/.ghcup/tmp/ghcup-351e9da2edde3708/ghc-9.2.4/libraries/bytestring/dist-install/doc/html/bytestring/src': Directory not empty
rm: cannot remove 'T7data/.ghcup/tmp/ghcup-351e9da2edde3708/ghc-9.2.4/libraries/xhtml/dist-install/doc/html/xhtml/src': Directory not empty

I am capable of creating directories in this filesystem, creating files, and then deleting the directory. The directories that GHCup made seem broken.

I am also suspicious of this path in the output: /home/alan/T7data/.ghcup/tmp/ghcup-cf9977c25132027b/home/alan/T7data/.ghcup/ghc/9.2.4/bin/ghci-9.2.4. It is possible that GHCup attempted to create some kind of infinite loop?

No, this path is correct.

Try running on your normal filesystem. My suspicion is that this is not a problem with external drive, but with your distro/the bindist.


I reformatted my external drive to use ext4 and the installation worked! Thank you!

1 Like