<div dir="ltr"><div>Hello,</div><div><br></div><div>I'd like to create a source distribution (source-dist) from GHC git master branch.</div><div>I tried hadrian (hadrian/build.sh source-dist) and make (make sdist-ghc) but both failed in different ways. Should this work (at all) for any git snapshot?</div><div><br></div><div>Hadrian successfully built a source dist (ghc-8.11.0.20200215-src.tar.xz) but it did not compile.<br></div><div><br></div><div>Regards,</div><div>Csaba<br></div><div><br></div><div>The error output (make sdist-ghc):<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace">make sdist-ghc</span><br><span style="font-family:monospace">make --no-print-directory -f <a href="http://ghc.mk" target="_blank">ghc.mk</a> sdist-ghc NO_INCLUDE_DEPS=YES NO_INCLUDE_PKGDATA=YES</span><br><span style="font-family:monospace"><a href="http://ghc.mk:1221" target="_blank">ghc.mk:1221</a>: warning: overriding recipe for target 'sdist_compiler_stage2_Cmm'</span><br><span style="font-family:monospace"><a href="http://ghc.mk:1220" target="_blank">ghc.mk:1220</a>: warning: ignoring old recipe for target 'sdist_compiler_stage2_Cmm'</span><br><span style="font-family:monospace">make[1]: *** No rule to make target 'compiler/stage2/build/Cmm.hs', needed by 'sdist_compiler_stage2_Cmm'. Stop.</span><br><span style="font-family:monospace">Makefile:162: recipe for target 'sdist-ghc' failed</span><br><span style="font-family:monospace">make: *** [sdist-ghc] Error 2</span><br><span style="font-family:monospace"></span><br><span style="font-family:monospace">csaba@x1:~/haskell/grin-compiler/ghc-playground/ghc$ make sdist-ghc</span><br><span style="font-family:monospace">make --no-print-directory -f <a href="http://ghc.mk" target="_blank">ghc.mk</a> sdist-ghc NO_INCLUDE_DEPS=YES NO_INCLUDE_PKGDATA=YES</span><br><span style="font-family:monospace"><a href="http://ghc.mk:1221" target="_blank">ghc.mk:1221</a>: warning: overriding recipe for target 'sdist_compiler_stage2_Cmm'</span><br><span style="font-family:monospace"><a href="http://ghc.mk:1220" target="_blank">ghc.mk:1220</a>: warning: ignoring old recipe for target 'sdist_compiler_stage2_Cmm'</span><br><span style="font-family:monospace">make[1]: *** No rule to make target 'compiler/stage2/build/Cmm.hs', needed by 'sdist_compiler_stage2_Cmm'. Stop.</span><br><span style="font-family:monospace">Makefile:162: recipe for target 'sdist-ghc' failed</span><br><span style="font-family:monospace">make: *** [sdist-ghc] Error 2</span></blockquote><div><br></div><div>Error output hadrian:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div> <span style="font-family:monospace">| Run GenPrimopCode: _build/stage0/compiler/build/primops.txt => _build/stage0/compiler/build/primop-vector-tys-exports.hs-incl<br>| Run Ghc FindHsDependencies Stage0: compiler/main/Annotations.hs (and 475 more) => _build/stage0/compiler/.<a href="http://dependencies.mk">dependencies.mk</a><br><br><no location info>: error:<br>    module ‘ghc-8.6.2:Lexer’ is defined in multiple files: compiler/GHC/Cmm/Lexer.hs<br>                                                           compiler/parser/Lexer.hs<br>Error when running Shake build system:<br>  at action, called at src/Rules.hs:71:19 in main:Rules<br>  at need, called at src/Rules.hs:93:5 in main:Rules<br>* Depends on: _build/stage0/lib/package.conf.d/ghc-8.11.0.20200215.conf<br>  at need, called at src/Rules/Register.hs:116:5 in main:Rules.Register<br>* Depends on: _build/stage0/compiler/build/libHSghc-8.11.0.20200215.a<br>  at need, called at src/Rules/Library.hs:146:5 in main:Rules.Library<br>* Depends on: _build/stage0/compiler/build/Cpr.o<br>  at &%>, called at src/Rules/Compile.hs:62:9 in main:Rules.Compile<br>* Depends on: _build/stage0/compiler/build/Cpr.o _build/stage0/compiler/build/Cpr.hi<br>  at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.18.3-a2e904f154f09728357733d7a3e8955a2a87773d2d7eb963a6f88d9d883fdde3:Development.Shake.Internal.Rules.Oracle<br>* Depends on: OracleQ (KeyValues ("_build/stage0/compiler/.dependencies","_build/stage0/compiler/build/Cpr.o"))<br>  at need, called at src/Hadrian/Oracles/TextFile.hs:96:9 in main:Hadrian.Oracles.TextFile<br>* Depends on: _build/stage0/compiler/.dependencies<br>  at readFile', called at src/Rules/Dependencies.hs:34:19 in main:Rules.Dependencies<br>  at need, called at src/Development/Shake/Internal/Derived.hs:118:15 in shake-0.18.3-a2e904f154f09728357733d7a3e8955a2a87773d2d7eb963a6f88d9d883fdde3:Development.Shake.Internal.Derived<br>* Depends on: _build/stage0/compiler/.<a href="http://dependencies.mk">dependencies.mk</a><br>* Raised the exception:<br>user error (Development.Shake.cmd, system command failed<br></span></div></blockquote></div><div><br></div></div>