Skip to content

Haskell Platform generic linux installer creates incorrect symlinks for /usr/local/man/man1 (and probably /usr/local/share/doc) when directory does not already exist

Following instructions here https://www.haskell.org/platform/linux.html for 'generic linux binaries'. After running activate-hs my /usr/local/man/man1 was a symlink to ghc.1 when it should be a directory *containing* ghc.1. This happens when the directory /usr/local/man/man1 does not already exist.

Running activate-hs with --verbose --dryrun shows why:

ln -sf usr/local/haskell/ghc-7.8.3-x86_64/bin/HsColour usr/local/haskell/ghc-7.8.3-x86_64/bin/activate-hs usr/local/haskell/ghc-7.8.3-x86_64/bin/alex usr/local/haskell/ghc-7.8.3-x86_64/bin/cabal usr/local/hask

ell/ghc-7.8.3-x86_64/bin/ghc usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/ bin/ghci usr/local/haskell/ghc-7.8.3-x86_64/bin/ghci-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/haddock usr/local/haskell/ghc-7.8.3-x86_64/bin/haddock-ghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/happy usr/l ocal/haskell/ghc-7.8.3-x86_64/bin/hp2ps usr/local/haskell/ghc-7.8.3-x86_64/bin/hpc usr/local/haskell/ghc-7.8.3-x86_64/bin/hsc2hs usr/local/haskell/ghc-7.8.3-x86_64/bin/runghc usr/local/haskell/ghc-7.8.3-x86_64/bin /runghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/runhaskell /usr/local/bin

ln -sf usr/local/haskell/ghc-7.8.3-x86_64/share/man/man1/ghc.1 /usr/local/share/man/man1

ln -sf usr/local/haskell/ghc-7.8.3-x86_64/share/doc/ghc /usr/local/share/doc

usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg register --verbose=0 --force usr/local/haskell/ghc-7.8.3-x86_64/etc/registrations/GLURaw-1.4.0.1

usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg register --verbose=0 --force usr/local/haskell/ghc-7.8.3-x86_64/etc/registrations/GLUT-2.5.1.1

The second and third ln commands are incorrect. When there are multiple sources it treats the dest as a directory, but in these two instances there are only a single source so ln just creates man1 as a symlink.

FWIW when this happens a subsequent install of Rust fails: https://github.com/rust-lang/rust-installer/issues/36. Rust v. Haskell: fight!


<details><summary>Trac metadata</summary>

| Trac field             | Value        |
| ---------------------- | ------------ |
| Version                | 7.10.1       |
| Type                   | Bug          |
| TypeOfFailure          | OtherFailure |
| Priority               | normal       |
| Resolution             | Unresolved   |
| Component              | Compiler     |
| Test case              |              |
| Differential revisions |              |
| BlockedBy              |              |
| Related                |              |
| Blocking               |              |
| CC                     |              |
| Operating system       |              |
| Architecture           |              |

</details>


<!-- {"blocked_by":[],"summary":"Haskell Platform generic linux installer creates incorrect symlinks for /usr/local/man/man1 (and probably /usr/local/share/doc) when directory does not already exist","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Following instructions here https://www.haskell.org/platform/linux.html for 'generic linux binaries'. After running activate-hs my /usr/local/man/man1 was a symlink to ghc.1 when it should be a directory *containing* ghc.1. This happens when the directory /usr/local/man/man1 does not already exist.\r\n\r\nRunning activate-hs with --verbose --dryrun shows why:\r\n\r\n    ln -sf usr/local/haskell/ghc-7.8.3-x86_64/bin/HsColour usr/local/haskell/ghc-7.8.3-x86_64/bin/activate-hs usr/local/haskell/ghc-7.8.3-x86_64/bin/alex usr/local/haskell/ghc-7.8.3-x86_64/bin/cabal usr/local/hask\r\nell/ghc-7.8.3-x86_64/bin/ghc usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/\r\nbin/ghci usr/local/haskell/ghc-7.8.3-x86_64/bin/ghci-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/haddock usr/local/haskell/ghc-7.8.3-x86_64/bin/haddock-ghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/happy usr/l\r\nocal/haskell/ghc-7.8.3-x86_64/bin/hp2ps usr/local/haskell/ghc-7.8.3-x86_64/bin/hpc usr/local/haskell/ghc-7.8.3-x86_64/bin/hsc2hs usr/local/haskell/ghc-7.8.3-x86_64/bin/runghc usr/local/haskell/ghc-7.8.3-x86_64/bin\r\n/runghc-7.8.3 usr/local/haskell/ghc-7.8.3-x86_64/bin/runhaskell /usr/local/bin\r\n    ln -sf usr/local/haskell/ghc-7.8.3-x86_64/share/man/man1/ghc.1 /usr/local/share/man/man1\r\n    ln -sf usr/local/haskell/ghc-7.8.3-x86_64/share/doc/ghc /usr/local/share/doc\r\n    usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg register --verbose=0 --force usr/local/haskell/ghc-7.8.3-x86_64/etc/registrations/GLURaw-1.4.0.1\r\n    usr/local/haskell/ghc-7.8.3-x86_64/bin/ghc-pkg register --verbose=0 --force usr/local/haskell/ghc-7.8.3-x86_64/etc/registrations/GLUT-2.5.1.1\r\n\r\nThe second and third ln commands are incorrect. When there are multiple sources it treats the dest as a directory, but in these two instances there are only a single source so ln just creates man1 as a symlink.\r\n\r\nFWIW when this happens a subsequent install of Rust fails: https://github.com/rust-lang/rust-installer/issues/36. Rust v. Haskell: fight!\r\n\r\n```","type_of_failure":"OtherFailure","blocking":[]} -->
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information