haskell / ghcup-hs

https://www.haskell.org/ghcup/
GNU Lesser General Public License v3.0
275 stars 83 forks source link

Errors attempting to compile HLS that I don't understand #1067

Closed mouse07410 closed 4 months ago

mouse07410 commented 4 months ago

macOS Sonoma 14.5. Attempting to build HLS master for GHC-9.10.1 (MR was recently merged).

$ ghcup compile hls -g main --ghc 9.10.1
[ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml as file /Users/ur20980/.ghcup/cache/ghcup-0.0.8.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref main (this may take a while)
[ git ] error: pathspec 'main' did not match any file(s) known to git

[ Error ] [GHCup-05841] Download failed: Process "git" with arguments ["--no-pager",
[ ...   ]                                                "checkout", "main"] failed with exit code 1.
$ ghcup compile hls -g master --ghc 9.10.1
[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref master (this may take a while)
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.idx'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.rev'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.pack'
[ Warn  ] [GHCup-00841] Process "/usr/bin/xattr" with arguments ["-r", "-d",
[ ...   ]                                          "com.apple.quarantine",
[ ...   ]                                          "/Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a"] failed with exit code 1.
[ Info  ] Examining git ref master
[ ...   ]   HLS version (from cabal file): 2.8.0.0
[ ...   ]   branch: master
[ ...   ]   commit hash: 0651c5c904396ac105acc8db8bd1a6415552fb2c
[ Info  ] Building HLS 2.8.0.0 for GHC version 9.10.1
[ cabal ] goals I've had most trouble fulfilling: profunctors, comonad, base,
[ cabal ] bifunctors, primitive-extras, transformers, template-haskell,
[ cabal ] indexed-traversable, comonad:indexed-traversable, stm-hamt, stm-containers,
[ cabal ] primitive, vector, ghcide
[ cabal ] Try running with --minimize-conflict-set to improve the error message.
[ cabal ] 
[ Error ] [GHCup-08841] BuildFailed failed in dir /Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a: Process "cabal" with arguments ["v2-install",
[ ...   ]                                                                                                             "-w",
[ ...   ]                                                                                                             "ghc-9.10.1",
[ ...   ]                                                                                                             "--install-method=copy",
[ ...   ]                                                                                                             "--overwrite-policy=always",
[ ...   ]                                                                                                             "--disable-profiling",
[ ...   ]                                                                                                             "--disable-tests",
[ ...   ]                                                                                                             "--installdir=/Users/ur20980/.ghcup/tmp/ghcup-d7f6c43f660b0b1a/out/9.10.1",
[ ...   ]                                                                                                             "--project-file=cabal.project",
[ ...   ]                                                                                                             "exe:haskell-language-server",
[ ...   ]                                                                                                             "exe:haskell-language-server-wrapper"] failed with exit code 1.
$ 
$ ghcup debug-info
[ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml as file /Users/ur20980/.ghcup/cache/ghcup-0.0.8.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Debug Info
==========
GHCup base dir: /Users/ur20980/.ghcup
GHCup bin dir: /Users/ur20980/.ghcup/bin
GHCup GHC directory: /Users/ur20980/.ghcup/ghc
GHCup cache directory: /Users/ur20980/.ghcup/cache
Architecture: x86_64
Platform: Darwin
Version: 0.1.22.0
$ 

I successfully built a package with GHC-9.10.1 with both Stack-2.15.7 and Cabal-3.10.3.0, which probably proves that my installation (GHC, Cabal, Stack) works.

Help is appreciated!

hasufell commented 4 months ago

The branch is called master, not main. Thanks to political correctness BS breaking user experience.

mouse07410 commented 4 months ago

Please re-open - you did not look below "main" where I tried with "-g master". Repeating:

$ ghcup compile hls -g master --ghc 9.10.1
[ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml as file /Users/ur20980/.ghcup/cache/ghcup-0.0.8.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref master (this may take a while)
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.idx'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.rev'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.pack'
[ Warn  ] [GHCup-00841] Process "/usr/bin/xattr" with arguments ["-r", "-d",
[ ...   ]                                          "com.apple.quarantine",
[ ...   ]                                          "/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099"] failed with exit code 1.
[ Info  ] Examining git ref master
[ ...   ]   HLS version (from cabal file): 2.8.0.0
[ ...   ]   branch: master
[ ...   ]   commit hash: 0651c5c904396ac105acc8db8bd1a6415552fb2c
[ Info  ] Building HLS 2.8.0.0 for GHC version 9.10.1
[ cabal ] goals I've had most trouble fulfilling: profunctors, comonad, base,
[ cabal ] bifunctors, primitive-extras, transformers, template-haskell,
[ cabal ] indexed-traversable, comonad:indexed-traversable, stm-hamt, stm-containers,
[ cabal ] primitive, vector, ghcide
[ cabal ] Try running with --minimize-conflict-set to improve the error message.
[ cabal ] 
[ Error ] [GHCup-08841] BuildFailed failed in dir /Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099: Process "cabal" with arguments ["v2-install",
[ ...   ]                                                                                                             "-w",
[ ...   ]                                                                                                             "ghc-9.10.1",
[ ...   ]                                                                                                             "--install-method=copy",
[ ...   ]                                                                                                             "--overwrite-policy=always",
[ ...   ]                                                                                                             "--disable-profiling",
[ ...   ]                                                                                                             "--disable-tests",
[ ...   ]                                                                                                             "--installdir=/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/out/9.10.1",
[ ...   ]                                                                                                             "--project-file=cabal.project",
[ ...   ]                                                                                                             "exe:haskell-language-server",
[ ...   ]                                                                                                             "exe:haskell-language-server-wrapper"] failed with exit code 1.
$ 
hasufell commented 4 months ago

HLS is not accomodated to compile.with GHC 9.10.1 yet: https://github.com/haskell/haskell-language-server/issues/4226