
I just tried to grab the latest GHC code so that I can test a bug fix for IO manager on OS X, but I ran into build errors. The failing command was: gcc -E -m32 -m32 -fno-stack-protector -Ilibraries/integer-gmp/gmp -Ilibraries/integer-gmp/mkGmpDerivedConstants/dist -MM libraries/integer-gmp/mkGmpDerivedConstants/mkGmpDerivedConstants.c -MF libraries/integer-gmp/mkGmpDerivedConstants/dist/build/.depend.c_asm.bit libraries/integer-gmp/mkGmpDerivedConstants/mkGmpDerivedConstants.c:15:17: error: gmp.h: No such file or directory It looks like it couldn't find gmp.h Looking over the build reports, I see a recent build on FreeBSD failed for exactly the same reason: http://darcs.haskell.org/ghcBuilder/builders/pgj/1016.html I checked some older (with commits up to March 29, 2013) build trees and I see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree. Anyone know what's up here and how to fix this? -Andi

I checked some older (with commits up to March 29, 2013) build trees and I see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree. Strange. I'm looking at the commit history at github and I see no gmp.h in the repository in commits as old as 2009. Am I misunderstanding or not noticing something?
Janek

On a recent head build I had the same problem. I needed to install gmp and add -I/opt/local/include (where gmp.h is located) to the configure command line. This is on OS X 10.7.5 using MacPorts. On Apr 26, 2013, at 9:17 AM, Jan Stolarek wrote:
I checked some older (with commits up to March 29, 2013) build trees and I see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree. Strange. I'm looking at the commit history at github and I see no gmp.h in the repository in commits as old as 2009. Am I misunderstanding or not noticing something?
Janek
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I see gmp.h and libgmp.a in my build trees, but not in the source trees.
I.e. when I check out the source these aren't present, but after I build
they are (at least in the past they were).
-Andi
On Fri, Apr 26, 2013 at 10:17 AM, Jan Stolarek
I checked some older (with commits up to March 29, 2013) build trees and I see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree. Strange. I'm looking at the commit history at github and I see no gmp.h in the repository in commits as old as 2009. Am I misunderstanding or not noticing something?
Janek

I have libHSinteger-gmp-0.5.1.0.a and libHSinteger-gmp-0.5.1.0-ghc7.7.20130422.so in my build tree, but I don't see gmp.h. I'm not getting any build errors on Linux x86_64. Janek Dnia piątek, 26 kwietnia 2013, Andreas Voellmy napisał:
I see gmp.h and libgmp.a in my build trees, but not in the source trees. I.e. when I check out the source these aren't present, but after I build they are (at least in the past they were).
-Andi
On Fri, Apr 26, 2013 at 10:17 AM, Jan Stolarek
wrote: I checked some older (with commits up to March 29, 2013) build trees and
I
see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree.
Strange. I'm looking at the commit history at github and I see no gmp.h in the repository in commits as old as 2009. Am I misunderstanding or not noticing something?
Janek

There's one in ghc/libraries/integer-gmp/gmp/gmp.h On Apr 26, 2013, at 10:08 AM, Jan Stolarek wrote:
I have libHSinteger-gmp-0.5.1.0.a and libHSinteger-gmp-0.5.1.0-ghc7.7.20130422.so in my build tree, but I don't see gmp.h. I'm not getting any build errors on Linux x86_64.
Janek
Dnia piątek, 26 kwietnia 2013, Andreas Voellmy napisał:
I see gmp.h and libgmp.a in my build trees, but not in the source trees. I.e. when I check out the source these aren't present, but after I build they are (at least in the past they were).
-Andi
On Fri, Apr 26, 2013 at 10:17 AM, Jan Stolarek
wrote: I checked some older (with commits up to March 29, 2013) build trees and
I
see that in libraries/integer-gmp/gmp there are files like gmp.h and libgmp.a that are not present in my latest build tree.
Strange. I'm looking at the commit history at github and I see no gmp.h in the repository in commits as old as 2009. Am I misunderstanding or not noticing something?
Janek
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

On Fri, Apr 26, 2013 at 5:24 PM, Hollister Herhold
There's one in ghc/libraries/integer-gmp/gmp/gmp.h
As far I know, there is an "in-tree" GMP packaged as a tarball under the ghc/libraries/integer-gmp/tarball directory. GNU/Linux can pick up the gmp headers and libraries because they are some expected location (perhaps in /usr/include and /usr/lib), while FreeBSD cannot, because GMP is installed as a third-party software and resides under some prefix, which is usually /usr/local/{include,lib} so it would fall back to the in-tree version. The solution is use the --with-gmp-includes and --with-gmp-libraries flags for the "configure" script. The x86 FreeBSD builder fails because these flags are not specified and it cannot pick up the in-tree GMP any more (I have mentioned Ian this problem, but probably he did not have time to fix this up), while the x86_64 FreeBSD builder works because it picks up the system GMP due to these flags. Actually, the x86_64 FreeBSD builder were also able to pick up the in-tree GMP, but unfortunately it causes some linking error if I recall this correctly (c.f. #4022).

Thanks to everyone for the comments.
I didn't try to fix the build system. I took the easy approach and just
used macports to install gmp on my system and added macports' lib and
include paths to the C_INCLUDE_PATH and LIBRARY_PATH variables. The build
succeeded now.
Maybe I should add a note to the wiki page on build prerequisites for mac
os x regarding this issue? Or will the build be fixed to pick up gmp from
the in-tree GMP?
-Andi
On Fri, Apr 26, 2013 at 11:55 AM, Páli Gábor János
On Fri, Apr 26, 2013 at 5:24 PM, Hollister Herhold
wrote: There's one in ghc/libraries/integer-gmp/gmp/gmp.h
As far I know, there is an "in-tree" GMP packaged as a tarball under the ghc/libraries/integer-gmp/tarball directory. GNU/Linux can pick up the gmp headers and libraries because they are some expected location (perhaps in /usr/include and /usr/lib), while FreeBSD cannot, because GMP is installed as a third-party software and resides under some prefix, which is usually /usr/local/{include,lib} so it would fall back to the in-tree version.
The solution is use the --with-gmp-includes and --with-gmp-libraries flags for the "configure" script. The x86 FreeBSD builder fails because these flags are not specified and it cannot pick up the in-tree GMP any more (I have mentioned Ian this problem, but probably he did not have time to fix this up), while the x86_64 FreeBSD builder works because it picks up the system GMP due to these flags.
Actually, the x86_64 FreeBSD builder were also able to pick up the in-tree GMP, but unfortunately it causes some linking error if I recall this correctly (c.f. #4022).
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

On Thu, Apr 25, 2013 at 06:08:07PM -0400, Andreas Voellmy wrote:
I just tried to grab the latest GHC code so that I can test a bug fix for IO manager on OS X, but I ran into build errors. The failing command was:
gcc -E -m32 -m32 -fno-stack-protector -Ilibraries/integer-gmp/gmp -Ilibraries/integer-gmp/mkGmpDerivedConstants/dist -MM libraries/integer-gmp/mkGmpDerivedConstants/mkGmpDerivedConstants.c -MF libraries/integer-gmp/mkGmpDerivedConstants/dist/build/.depend.c_asm.bit libraries/integer-gmp/mkGmpDerivedConstants/mkGmpDerivedConstants.c:15:17: error: gmp.h: No such file or directory
I've just pushed a patch to fix this. I'd been caught out by validate not cleaning gmp, so my validate tree already had a built gmp in it. Thanks Ian
participants (5)
-
Andreas Voellmy
-
Hollister Herhold
-
Ian Lynagh
-
Jan Stolarek
-
Páli Gábor János