on my mac 9.6.1 can't compile with ghc -prof -fprof-auto , gets error Could not find module ‘Prelude’

George Colpitts george.colpitts at gmail.com
Sun Apr 2 11:41:07 UTC 2023


Hello
On my mac, in ghc  9.6.1 can't compile with ghc -prof -fprof-auto  , I get
the error:

Could not find module ‘Prelude’    Perhaps you haven't installed the
"p_dyn" libraries for package ‘base-4.18.0.0’?    Use -v (or `:set -v`
in ghci) to see a list of the files searched for.

Is anybody else experiencing this?


In more detail:

> ghc -prof  -fprof-auto hello.hsLoaded package environment from /Users/gcolpitts/.ghc/x86_64-darwin-9.6.1/environments/default[1 of 2] Compiling Main             ( hello.hs, hello.o )hello.hs:1:1: error:    Could not find module ‘Prelude’    Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?    Use -v (or `:set -v` in ghci) to see a list of the files searched for.  |1 | main = print "hello"  | ^

hello.hs consists of

main = print "hello"

I reported this in 9.2.3 , in #21709
<https://gitlab.haskell.org/ghc/ghc/-/issues/21709>. At that time there was
a workaround of adding -static but that no longer works. It gives a
slightly different error message:

ghc -prof  -fprof-auto -static hello.hs
Loaded package environment from
/Users/gcolpitts/.ghc/x86_64-darwin-9.6.1/environments/default
[2 of 2] Linking hello
ld: warning: directory not found for option '-L/opt/local/lib/'
ld: library not found for -lHStyp-qlty-1-186ccc78_p
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
ghc-9.6.1: `gcc' failed in phase `Linker'. (Exit code: 1)

I have updated 21709 with the details of the problem on 9.6.1

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20230402/84b281e5/attachment.html>


More information about the Glasgow-haskell-users mailing list