build system question build-prog and bindisttest

Hi All, In my ghc.mk I have declared: $(eval $(call build-prog,driver/ghc-split,dist,0)) $(eval $(call bindist,driver/ghc-split,ghc.mk)) compilation is fine but during testing I get this error: ===--- building final phase Bad GHC version '7.8.3' for 'bindisttest/a/b/c/ghc-7.11.20150719/bin/ghc-split.exe' bindisttest/ghc.mk:21: recipe for target 'test_bindist' failed I assume this is because I tell it to build ghc-split at stage 0, so it's using the bootstrapping compiler which in my case is 7.8.3. Now it's perfectly fine to build this at stage 1 or 2, but when I change it to either of those building fails telling me that ghc-stage1 or ghc-stage2 cannot be found... Could the dependency check me wrong? How do I go about fixing this? Regards, Tamar

In my ghc.mk I have declared:
$(eval $(call build-prog,driver/ghc-split,dist,0)) $(eval $(call bindist,driver/ghc-split,ghc.mk))
That second line isn't needed. I think you are trying to follow https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying#Addingaprogram, but that information is outdated. Take a look at some ghc.mk files in the utils directory, for example `utils/hpc/ghc.mk`. Now it's perfectly fine to build this at stage 1 or 2
Use stage1 to build it, or stage2 if you need access to the ghc api. , but when I change it to either of those building fails telling me that
ghc-stage1 or ghc-stage2 cannot be found...
You are probably missing an entry like the following in the toplevel ghc.mk: utils/hpc/dist-install/package-data.mk: compiler/stage2/package-data.mk

Hi Thomas, Thanks for the help! I have removed the call to bindist and I was indeed missing a similar line in the main GHC.mk Unfortunately I still get the same error: HC [stage 2] driver/ghc-split/dist/build/tmp/ghc-split.exe /bin/sh: inplace/bin/ghc-stage2.exe: No such file or directory driver/ghc-split/ghc.mk:21: recipe for target 'driver/ghc-split/dist/build/tmp/ghc-split.exe' failed make[1]: *** [driver/ghc-split/dist/build/tmp/ghc-split.exe] Error 127 Though not quite sure why it’s looking in inplace/bin.. I was indeed following that page, but haven't been able to consult the wiki today as Trac has been throwing an error all day. The line I added was: driver/ghc-split/dist/package-data.mk: compiler/stage2/package-data.mk Any ideas? Regards, Tamar From: Thomas Miedema Sent: Sunday, July 19, 2015 17:52 To: Tamar Christina Cc: GHC In my ghc.mk I have declared: $(eval $(call build-prog,driver/ghc-split,dist,0)) $(eval $(call bindist,driver/ghc-split,ghc.mk)) That second line isn't needed. I think you are trying to follow https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying#Addingaprogram, but that information is outdated. Take a look at some ghc.mk files in the utils directory, for example `utils/hpc/ghc.mk`. Now it's perfectly fine to build this at stage 1 or 2 Use stage1 to build it, or stage2 if you need access to the ghc api. , but when I change it to either of those building fails telling me that ghc-stage1 or ghc-stage2 cannot be found... You are probably missing an entry like the following in the toplevel ghc.mk: utils/hpc/dist-install/package-data.mk: compiler/stage2/package-data.mk

I’ve pushed the code to https://github.com/Mistuke/ghc/tree/trac-9832-replace-split-perl-script-with... From: Thomas Miedema Sent: Sunday, July 19, 2015 21:30 To: Tamar Christina Cc: GHC Please upload your code somewhere, and I can take a look.
participants (2)
-
Tamar Christina
-
Thomas Miedema