-
Notifications
You must be signed in to change notification settings - Fork 37
OSX: gmp.h file not found #493
Comments
If I pass |
Maybe the more likely reason is that in
the |
I have temporarily put in this hack, which allowed me to build diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs
index af78b74..deb3a7a 100644
--- a/hadrian/src/Settings/Builders/Ghc.hs
+++ b/hadrian/src/Settings/Builders/Ghc.hs
@@ -145,5 +145,6 @@ includeGhcArgs = do
, cIncludeArgs
, arg $ "-I" ++ root -/- generatedDir
, arg $ "-optc-I" ++ root -/- generatedDir
+ , arg $ "-I" ++ root -/- "stage1/gmp/include"
, (not $ nonCabalContext context) ?
pure [ "-optP-include", "-optP" ++ autogen -/- "cabal_macros.h" ] ] |
Apart from this issue, the experience building GHC on OSX was great with Hadrian by the way. I installed
then did a
and built GHC with
Very very nice. |
I think I have some libgmp patch on my reloc PR. Not absolutely sure that it fixes what you saw though. However if it did and you have the time to extract it into a separate PR against master please do so. |
@nh2 Thank you for the report!
Hmm, this looks suspicious. Perhaps, we need to collapse both We could temporarily merge your fix, but we should get rid of the hard-coded path -- I believe we should use https://github.com/snowleopard/hadrian/blob/master/src/Rules/Gmp.hs#L25-L31 Furthermore, I think this fix should go somewhere here instead, because it is @nh2 If you could rework your fix as suggested above, could you please send a PR?
Awesome, great to hear! |
@nh2 here's what I've been talking about (it's all in #445) commits: 7b37f15, d732756 |
On OSX, running
bash hadrian/build.stack.sh --configure -j --flavour=quickest inplace/bin/ghc-stage2
:There exists a
_build/stage1/gmp/include/gmp.h
.And it seems
--with-intree-gmp
gets passed tointeger-gmp
's./configure
:libraries/integer-gmp//config.status
hasCFLAGS=-I_build/stage1/gmp/include
and it has:But maybe it doesn't find the dir and it should do that with some
../
in front? Just guessing.The text was updated successfully, but these errors were encountered: