Issue haskell/cabal#9784
Found & minimized on Linux. In CI, reproduces on Windows too, see issue.
- Download or git-clone this gist
- Set
executable-dynamic: Truein~/.cabal/config⚠️ important: don't pass as a flag--enable-executable-dynamic, set in the config.
The flag has different effect (specifically: no effect) from the config option. That's the bug.
cabal v2-install
Installs, successfully running the executable from postCopy Setup hook, that prints Module Main speaking.
dist/build/cabal9784-repro/cabal9784-repro: error while loading shared libraries: libHScabal9784-repro-0.1-273208628f9b290e48d0007c2a55aff138469cc5ac0dd78b416c2ef6e98387a2-ghc9.6.4.so: cannot open shared object file: No such file or directory