Is anybody on 9.6.1 having problems profiling on a Mac?
Is anybody on 9.6.1 having problems profiling on a Mac? As I reported in https://gitlab.haskell.org/ghc/ghc/-/issues/23211 ghc -prof -fprof-auto hello.hs where the file hello.hs consists of the line: main = print "hello" gets the error: Could not find module ‘Prelude’ Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’? It seems to me like a regression of the closed bug https://gitlab.haskell.org/ghc/ghc/-/issues/20707. Thanks George
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not installed ghc-dynamic. Is there a package missing on your Mac installation?
Thanks Henning. I just installed ghc 9.6.1. When I try ghc-dynamic I get $ cabal install --lib ghc-dynamic Error: cabal: Unknown package "ghc-dynamic". On Sun, May 14, 2023 at 4:47 PM Henning Thielemann < lemming@henning-thielemann.de> wrote:
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not installed ghc-dynamic. Is there a package missing on your Mac installation?
`ghc-dynamic` would be an OS package, not cabal. On Mon, May 15, 2023 at 7:36 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Henning. I just installed ghc 9.6.1.
When I try ghc-dynamic I get
$ cabal install --lib ghc-dynamic Error: cabal: Unknown package "ghc-dynamic".
On Sun, May 14, 2023 at 4:47 PM Henning Thielemann <lemming@henning-thielemann.de> wrote:
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not installed ghc-dynamic. Is there a package missing on your Mac installation?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com
Thanks Brandon, I'm on a Mac. Do you know how I should install it? On Mon, May 15, 2023 at 8:38 AM Brandon Allbery <allbery.b@gmail.com> wrote:
`ghc-dynamic` would be an OS package, not cabal.
On Mon, May 15, 2023 at 7:36 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Henning. I just installed ghc 9.6.1.
When I try ghc-dynamic I get
$ cabal install --lib ghc-dynamic Error: cabal: Unknown package "ghc-dynamic".
On Sun, May 14, 2023 at 4:47 PM Henning Thielemann <
lemming@henning-thielemann.de> wrote:
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for
package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not installed ghc-dynamic. Is there a package missing on your Mac installation?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com
If you installed ghc via ghcup, you shouldn't need it. If you installed via Homebrew, I don't know if they have a separate package for the dynamic libs or what it would be called; I use Linux and ghcup, and if I'd used the Ubuntu packages it would be "ghc-prof". On Mon, May 15, 2023 at 7:49 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Brandon, I'm on a Mac. Do you know how I should install it?
On Mon, May 15, 2023 at 8:38 AM Brandon Allbery <allbery.b@gmail.com> wrote:
`ghc-dynamic` would be an OS package, not cabal.
On Mon, May 15, 2023 at 7:36 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Henning. I just installed ghc 9.6.1.
When I try ghc-dynamic I get
$ cabal install --lib ghc-dynamic Error: cabal: Unknown package "ghc-dynamic".
On Sun, May 14, 2023 at 4:47 PM Henning Thielemann <lemming@henning-thielemann.de> wrote:
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not installed ghc-dynamic. Is there a package missing on your Mac installation?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com
-- brandon s allbery kf8nh allbery.b@gmail.com
9.6.1 isn't available on ghcup. Homebrew doesn't have any packages ghc-prof or ghc-dynamic. Thanks George On Mon, May 15, 2023 at 8:52 AM Brandon Allbery <allbery.b@gmail.com> wrote:
If you installed ghc via ghcup, you shouldn't need it. If you installed via Homebrew, I don't know if they have a separate package for the dynamic libs or what it would be called; I use Linux and ghcup, and if I'd used the Ubuntu packages it would be "ghc-prof".
On Mon, May 15, 2023 at 7:49 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Brandon, I'm on a Mac. Do you know how I should install it?
On Mon, May 15, 2023 at 8:38 AM Brandon Allbery <allbery.b@gmail.com>
wrote:
`ghc-dynamic` would be an OS package, not cabal.
On Mon, May 15, 2023 at 7:36 AM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks Henning. I just installed ghc 9.6.1.
When I try ghc-dynamic I get
$ cabal install --lib ghc-dynamic Error: cabal: Unknown package "ghc-dynamic".
On Sun, May 14, 2023 at 4:47 PM Henning Thielemann <
lemming@henning-thielemann.de> wrote:
On Sun, 14 May 2023, George Colpitts wrote:
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for
package ‘base-4.18.0.0’?
On Debian Linux the probable cause would be that you have not
installed
ghc-dynamic. Is there a package missing on your Mac installation?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com
-- brandon s allbery kf8nh allbery.b@gmail.com
On Mon, 15 May 2023, George Colpitts wrote:
9.6.1 isn't available on ghcup. Homebrew doesn't have any packages ghc-prof or ghc-dynamic.
I made a mistake. Brandon is right: The package is called ghc-prof on Debian/Ubuntu, whereas ghc-dynamic is for the dyn object files.
Forgot to add that my current workaround is to compile with "-static -package-env=-" i.e. ghc -static -package-env=- -prof -fprof-auto hello.hs Adding just -package-env=- i.e. gives me the same error as compiling without it. ghc -package-env=- -prof -fprof-auto hello.hs [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 | | ^ Adding just -static gives ghc -static -prof -fprof-auto hello.hs Loaded package environment from /Users/gcolpitts/.ghc/x86_64-darwin-9.6.1/environments/default [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object file] [2 of 2] Linking hello ld: warning: directory not found for option '-L/opt/local/lib/' ld: library not found for -lHStxmth-0.12.7.1-f954854b_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 can't find any doc saying that -static is required for profiling on the Mac but perhaps that is the case? On Sun, May 14, 2023 at 3:43 PM George Colpitts <george.colpitts@gmail.com> wrote:
Is anybody on 9.6.1 having problems profiling on a Mac? As I reported in https://gitlab.haskell.org/ghc/ghc/-/issues/23211
ghc -prof -fprof-auto hello.hs
where the file hello.hs consists of the line:
main = print "hello"
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
It seems to me like a regression of the closed bug https://gitlab.haskell.org/ghc/ghc/-/issues/20707.
Thanks George
Thanks for everybody's help, I have closed the issue <https://gitlab.haskell.org/ghc/ghc/-/issues/23211>. Sorry for bothering everyone. As I wrote in the bug: @adamse </adamse>, @mpickering </mpickering>. You are right, there is something wrong about my environment file default. When I remove it I can compile with ghc -static -prof -fprof-auto hello.hs The need for -static is not documented as far as I know so I will file a doc bug. My apologies for not debugging this earlier. I will keep an eye out to see when an environment file gets created. Thanks again ! On Mon, May 15, 2023 at 9:11 AM George Colpitts <george.colpitts@gmail.com> wrote:
Forgot to add that my current workaround is to compile with "-static -package-env=-" i.e.
ghc -static -package-env=- -prof -fprof-auto hello.hs
Adding just -package-env=- i.e. gives me the same error as compiling without it.
ghc -package-env=- -prof -fprof-auto hello.hs [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 | | ^
Adding just -static gives
ghc -static -prof -fprof-auto hello.hs Loaded package environment from /Users/gcolpitts/.ghc/x86_64-darwin-9.6.1/environments/default [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object file] [2 of 2] Linking hello ld: warning: directory not found for option '-L/opt/local/lib/' ld: library not found for -lHStxmth-0.12.7.1-f954854b_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 can't find any doc saying that -static is required for profiling on the Mac but perhaps that is the case?
On Sun, May 14, 2023 at 3:43 PM George Colpitts <george.colpitts@gmail.com> wrote:
Is anybody on 9.6.1 having problems profiling on a Mac? As I reported in https://gitlab.haskell.org/ghc/ghc/-/issues/23211
ghc -prof -fprof-auto hello.hs
where the file hello.hs consists of the line:
main = print "hello"
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
It seems to me like a regression of the closed bug https://gitlab.haskell.org/ghc/ghc/-/issues/20707.
Thanks George
FWIW the environments file causing my problem is created by "cabal install --lib ..." On Mon, May 15, 2023 at 12:15 PM George Colpitts <george.colpitts@gmail.com> wrote:
Thanks for everybody's help, I have closed the issue <https://gitlab.haskell.org/ghc/ghc/-/issues/23211>. Sorry for bothering everyone. As I wrote in the bug:
@adamse <http:///adamse>, @mpickering <http:///mpickering>. You are right, there is something wrong about my environment file default. When I remove it I can compile with
ghc -static -prof -fprof-auto hello.hs
The need for -static is not documented as far as I know so I will file a doc bug. My apologies for not debugging this earlier. I will keep an eye out to see when an environment file gets created. Thanks again !
On Mon, May 15, 2023 at 9:11 AM George Colpitts <george.colpitts@gmail.com> wrote:
Forgot to add that my current workaround is to compile with "-static -package-env=-" i.e.
ghc -static -package-env=- -prof -fprof-auto hello.hs
Adding just -package-env=- i.e. gives me the same error as compiling without it.
ghc -package-env=- -prof -fprof-auto hello.hs [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 | | ^
Adding just -static gives
ghc -static -prof -fprof-auto hello.hs Loaded package environment from /Users/gcolpitts/.ghc/x86_64-darwin-9.6.1/environments/default [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object file] [2 of 2] Linking hello ld: warning: directory not found for option '-L/opt/local/lib/' ld: library not found for -lHStxmth-0.12.7.1-f954854b_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 can't find any doc saying that -static is required for profiling on the Mac but perhaps that is the case?
On Sun, May 14, 2023 at 3:43 PM George Colpitts < george.colpitts@gmail.com> wrote:
Is anybody on 9.6.1 having problems profiling on a Mac? As I reported in https://gitlab.haskell.org/ghc/ghc/-/issues/23211
ghc -prof -fprof-auto hello.hs
where the file hello.hs consists of the line:
main = print "hello"
gets the error:
Could not find module ‘Prelude’
Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.18.0.0’?
It seems to me like a regression of the closed bug https://gitlab.haskell.org/ghc/ghc/-/issues/20707.
Thanks George
participants (3)
-
Brandon Allbery -
George Colpitts -
Henning Thielemann