
Hi,
I did just that recently, see https://github.com/nomeata/veggies for how I did it, in particular boot.sh.
Thank you for your work! I looked at boot.sh, and tried the "ghc Setup.hs && ./Cabal" approach. It works for ghc-prim & integer-simple, but not base. Since porting gmp to my target platform is hard, I chose integer-simple, and "./Cabal build" produces the following error message for base: Preprocessing library for base-4.10.0.0.. Building library for base-4.10.0.0.. [ 1 of 238] Compiling GHC.IO[boot] ( GHC/IO.hs-boot, dist/build/GHC/IO.o-boot ) [ 2 of 238] Compiling GHC.Stack.Types ( GHC/Stack/Types.hs, dist/build/GHC/Stack/Types.o ) GHC/Stack/Types.hs:57:1: error: Bad interface file: /home/shaocheng/hana/lib/x86_64-linux-ghc-8.3.20170423/integer-simple-0.1.1.1-FieYyHVQ4yaKr3TU2vSN3a/GHC/Integer.hi Something is amiss; requested module integer-simple-0.1.1.1:GHC.Integer differs from name found in the interface file integer-simple:GHC.Integer (if these names look the same, try again with -dppr-debug) | 57 | import GHC.Integer () | ^^^^^^^^^^^^^^^^^^^^^ The compilation for integer-simple didn't produce error, and it is properly registered by ghc-pkg, so I've no idea why there's a bad interface file. Do you have any ideas on possible causes? Thanks a lot. Greetings, Shao Cheng

Hi, Am Dienstag, den 25.04.2017, 19:30 +0800 schrieb Shao Cheng:
I did just that recently, see https://github.com/nomeata/veggies for how I did it, in particular boot.sh.
Thank you for your work! I looked at boot.sh, and tried the "ghc Setup.hs && ./Cabal" approach. It works for ghc-prim & integer- simple, but not base. Since porting gmp to my target platform is hard, I chose integer-simple, and "./Cabal build" produces the following error message for base:
Preprocessing library for base-4.10.0.0.. Building library for base-4.10.0.0.. [ 1 of 238] Compiling GHC.IO[boot] ( GHC/IO.hs-boot, dist/build/GHC/IO.o-boot ) [ 2 of 238] Compiling GHC.Stack.Types ( GHC/Stack/Types.hs, dist/build/GHC/Stack/Types.o )
GHC/Stack/Types.hs:57:1: error: Bad interface file: /home/shaocheng/hana/lib/x86_64-linux-ghc- 8.3.20170423/integer-simple-0.1.1.1- FieYyHVQ4yaKr3TU2vSN3a/GHC/Integer.hi Something is amiss; requested module integer-simple- 0.1.1.1:GHC.Integer differs from name found in the interface file integer-simple:GHC.Integer (if these names look the same, try again with -dppr-debug) | 57 | import GHC.Integer () | ^^^^^^^^^^^^^^^^^^^^^
The compilation for integer-simple didn't produce error, and it is properly registered by ghc-pkg, so I've no idea why there's a bad interface file. Do you have any ideas on possible causes? Thanks a lot.
In short: ghc (the library) will insist on using integer-gmp resp. integer-simple as configured at _build time_ of GHC. So if you want to use integer-simple, you need to build your own GHC with INTEGER_LIBRARY=integer-simple set in mk/build.mk Also see https://ghc.haskell.org/trac/ghc/ticket/13477 Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • https://www.joachim-breitner.de/ XMPP: nomeata@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org
participants (2)
-
Joachim Breitner
-
Shao Cheng