FS#65661 - [ghc-libs] could not find module 'Prelude'; missing files in the 'base-4.13.0.0' package

Attached to Project: Community Packages
Opened by Konstantin Terziev (bobchorba) - Saturday, 29 February 2020, 10:16 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 03 September 2023, 15:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Could not find module ‘Prelude’.
There are files missing in the ‘base-4.13.0.0’ package.


Additional info:
* package version(s) 8.8.3-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
When a*.hs file is opened in emacs this error pops-up in the minibuffer:
Could not find module ‘Prelude’
There are files missing in the ‘base-4.13.0.0’ package,
try running 'ghc-pkg check'.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 03 September 2023, 15:11 GMT
Reason for closing:  Deferred
Comment by Fnord Popos (noddy) - Wednesday, 04 March 2020, 19:27 GMT
Repro:

> $ echo 'main = putStrLn "ohai"' > ohai.hs
> $ ghc ohai.hs
> [1 of 1] Compiling Main ( ohai.hs, ohai.o )
>
> ohai.hs:1:1: error:
> Could not find module ‘Prelude’
> There are files missing in the ‘base-4.13.0.0’ package,
> try running 'ghc-pkg check'.
> Use -v (or `:set -v` in ghci) to see a list of the files searched for.
> |
> 1 | main = putStrLn "ohai"
> | ^

Works:

> $ ghc -dynamic ohai.hs

Ghc defaults to static linking, but ghc-libs ships only dynamic versions.

Making the default ghc installation essentially broken on Arch.
Comment by Konstantin Terziev (bobchorba) - Thursday, 05 March 2020, 12:01 GMT
It worked after installing 'ghc-static' too.
Comment by Francisco Lopes (pepper_chico) - Sunday, 28 June 2020, 22:31 GMT
This is one reason why haskell-ide-engine or haskell-language-server may not work out-of-the-box, see: https://github.com/haskell/haskell-ide-engine/issues/1647.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...