Cabal reports mismatched interface file ways dyn

Hi all, I'm trying to compile GHC 8.6.5 using the LLVM backend and dynamic linking. My build.mk file looks as follows: include mk/flavours/quick-llvm.mk DYNAMIC_BY_DEFAULT = YES I can build a stage3 compiler. However while executing `make install` the following error shows up: "inplace/bin/ghc-cabal" register libraries/ghc-prim dist-install "/devel/ghc86/lib/ghc-8.6.5/bin/ghc" "/devel/ghc86/lib/ghc-8.6.5/bin/ghc-pkg" "/devel/ghc86/lib/ghc-8.6.5" '' '/devel/ghc86' '/devel/ghc86/lib/ghc-8.6.5' '/devel/ghc86/share/doc/ghc-8.6.5/html/libraries' NO ghc-cabal: '/devel/ghc86/lib/ghc-8.6.5/bin/ghc' exited with an error: Bad interface file: dist-install/build/GHC/CString.hi mismatched interface file ways (wanted "dyn", got "") I found similar reports [1,2] from 2013 but no solution. Any ideas how to fix this? Cheers, Stefan [1] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003488.html [2] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003507.html

Does the quick flavour build the dynamic libraries?
On Thu, Jul 11, 2019 at 10:07 AM Stefan Schulze Frielinghaus
Hi all,
I'm trying to compile GHC 8.6.5 using the LLVM backend and dynamic linking. My build.mk file looks as follows:
include mk/flavours/quick-llvm.mk DYNAMIC_BY_DEFAULT = YES
I can build a stage3 compiler. However while executing `make install` the following error shows up:
"inplace/bin/ghc-cabal" register libraries/ghc-prim dist-install "/devel/ghc86/lib/ghc-8.6.5/bin/ghc" "/devel/ghc86/lib/ghc-8.6.5/bin/ghc-pkg" "/devel/ghc86/lib/ghc-8.6.5" '' '/devel/ghc86' '/devel/ghc86/lib/ghc-8.6.5' '/devel/ghc86/share/doc/ghc-8.6.5/html/libraries' NO ghc-cabal: '/devel/ghc86/lib/ghc-8.6.5/bin/ghc' exited with an error: Bad interface file: dist-install/build/GHC/CString.hi mismatched interface file ways (wanted "dyn", got "")
I found similar reports [1,2] from 2013 but no solution. Any ideas how to fix this?
Cheers, Stefan
[1] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003488.html [2] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003507.html _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Yes, it looks so: $ ls -1 libraries/ghc-prim/dist-install/build/GHC/CString.* libraries/ghc-prim/dist-install/build/GHC/CString.dyn_hi libraries/ghc-prim/dist-install/build/GHC/CString.dyn_o libraries/ghc-prim/dist-install/build/GHC/CString.hi libraries/ghc-prim/dist-install/build/GHC/CString.o $ inplace/bin/ghc-stage2 --show-iface libraries/ghc-prim/dist-install/build/GHC/CString.hi | grep --after-context=1 Way Way: Wanted [d, y, n], got [] On Thu, Jul 11, 2019 at 11:03:16AM +0100, Matthew Pickering wrote:
Does the quick flavour build the dynamic libraries?
On Thu, Jul 11, 2019 at 10:07 AM Stefan Schulze Frielinghaus
wrote: Hi all,
I'm trying to compile GHC 8.6.5 using the LLVM backend and dynamic linking. My build.mk file looks as follows:
include mk/flavours/quick-llvm.mk DYNAMIC_BY_DEFAULT = YES
I can build a stage3 compiler. However while executing `make install` the following error shows up:
"inplace/bin/ghc-cabal" register libraries/ghc-prim dist-install "/devel/ghc86/lib/ghc-8.6.5/bin/ghc" "/devel/ghc86/lib/ghc-8.6.5/bin/ghc-pkg" "/devel/ghc86/lib/ghc-8.6.5" '' '/devel/ghc86' '/devel/ghc86/lib/ghc-8.6.5' '/devel/ghc86/share/doc/ghc-8.6.5/html/libraries' NO ghc-cabal: '/devel/ghc86/lib/ghc-8.6.5/bin/ghc' exited with an error: Bad interface file: dist-install/build/GHC/CString.hi mismatched interface file ways (wanted "dyn", got "")
I found similar reports [1,2] from 2013 but no solution. Any ideas how to fix this?
Cheers, Stefan
[1] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003488.html [2] https://mail.haskell.org/pipermail/ghc-devs/2013-December/003507.html _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

I'm resurrecting an old thread because I thought that this might also be helpful for others. The problem I encountered was a result of old build artifacts which didn't get cleaned up. Assume you have build GHC before and now you changed something e.g. the LLVM compiler. Thus the build system won't detect automatically that you have to recompile and therefore you want to go for a full build by doing a clean in the first place. $ make maintainer-clean $ git status --ignored ... Ignored files: libraries/ghc-heap/dist-boot ... The maintainer-clean target does not remove all build artifacts. Thus it is more save to perform a `git clean -dfx`. In my case this solved the problem. Cheers, Stefan
participants (2)
-
Matthew Pickering
-
Stefan Schulze Frielinghaus