snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

Incomplete extensions of files encountered during build #508

Closed chitrak7 closed 6 years ago

chitrak7 commented 6 years ago

On running build on windows 10, Errors were produced as these files were not found: hadrian/cfg/system.config settings mk/config.h

There are files named the following in the directory. *settings.in

I believe the extensions of the files are not properly written in the build system @snowleopard

snowleopard commented 6 years ago

@chitrak7 Can you copy the error that was reported, including the exact command line you run?

chitrak7 commented 6 years ago

E:\ghc\hadrian>stack exec hadrian -- --directory ".." -j --flavour=quickest shakeArgsWith 0.001s 0% Function shake 0.278s 61% ========================= Database read 0.001s 0% With database 0.000s 0% Running rules 0.169s 37% =============== Total 0.449s 100% Error when running Shake build system:

alpmestan commented 6 years ago

You need to pass the -c or --configure option the first time you run hadrian, if I remember correctly.

snowleopard commented 6 years ago

@chitrak7 Aha, I see. If you read the error message carefully, it tells you exactly what to do:

Configuration file hadrian/cfg/system.config is missing.
Run the configure script manually or let Hadrian run it automatically by passing the flag --configure.

The hadrian/cfg/system.config file is generated by running the boot and configure scripts, as explained in the preparation guide.

As @alpmestan points out, Hadrian can run these scripts for you if you pass the --configure flag to it.

snowleopard commented 6 years ago

@chitrak7 I closed this issue, but if you think the README can be improved to help beginners, please feel free to send a pull request.

ndmitchell commented 6 years ago

I think the user experience could be improved by automatically doing the right thing rather than spitting out an error message saying what to do...

snowleopard commented 6 years ago

@ndmitchell I agree and the automated configure used to be the default, but @bgamari, @angerman and @hvr rebelled against it. With no one backing me up I had to concede in #457 :(

ndmitchell commented 6 years ago

😞

chitrak7 commented 6 years ago

@snowleopard I think this should be mentioned in the file doc\windows.md . This could help a lot of beginners as me.

snowleopard commented 6 years ago

@chitrak7 Good point!

I've added --configure to the Windows build script and a note that it's only needed during the first build.