ghc 9.4.3 missing profiling libraries / macos / arm64
See below for my system info and the commands to reproduce the issue (short version: cabal init -n --exe
a new project, then try to cabal run --enable-profiling
-- GHC complains it cannot find profiling libraries for base-4.17.0.0
).
Transcript from my terminal:
% uname -a
Darwin hawthorne.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.4.3
% cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library
% cabal init --exe -n ./hello-world
[Log] Guessing dependencies...
[Log] Using cabal specification: 3.8
[Warning] unknown license type, you must put a copy in LICENSE yourself.
[Log] Creating fresh file CHANGELOG.md...
[Log] Creating fresh directory ./app...
[Log] Creating fresh file app/Main.hs...
[Log] Creating fresh file hello-world.cabal...
[Warning] No synopsis given. You should edit the .cabal file and add one.
[Info] You may want to edit the .cabal file and add a Description field.
% cd hello-world
% cabal run
Resolving dependencies...
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
- hello-world-0.1.0.0 (exe:hello-world) (first run)
Configuring executable 'hello-world' for hello-world-0.1.0.0..
Preprocessing executable 'hello-world' for hello-world-0.1.0.0..
Building executable 'hello-world' for hello-world-0.1.0.0..
[1 of 1] Compiling Main ( app/Main.hs, /Users/dalev/coding/hello-world/dist-newstyle/build/aarch64-osx/ghc-9.4.3/hello-world-0.1.0.0/x/hello-world/build/hello-world/hello-world-tmp/Main.o )
[2 of 2] Linking /Users/dalev/coding/hello-world/dist-newstyle/build/aarch64-osx/ghc-9.4.3/hello-world-0.1.0.0/x/hello-world/build/hello-world/hello-world
Hello, Haskell!
% cabal run --enable-profiling
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
- hello-world-0.1.0.0 (exe:hello-world) --enable-profiling (configuration changed)
Configuring executable 'hello-world' for hello-world-0.1.0.0..
Preprocessing executable 'hello-world' for hello-world-0.1.0.0..
Building executable 'hello-world' for hello-world-0.1.0.0..
[1 of 1] Compiling Main ( app/Main.hs, /Users/dalev/coding/hello-world/dist-newstyle/build/aarch64-osx/ghc-9.4.3/hello-world-0.1.0.0/x/hello-world/build/hello-world/hello-world-tmp/Main.p_o )
app/Main.hs:1:8: error:
Could not find module ‘Prelude’
Perhaps you haven't installed the profiling libraries for package ‘base-4.17.0.0’?
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
1 | module Main where
| ^^^^