I never determined how to fix this. Here's the notes I developed:

tl;dr For some reason, it seems gmp.h is not recognized as a dependency of mkGmpDerivedConstants.o

HTH

-----

If I run

$ perl boot; ./configure; make -j4

I tend to see a build failure. Immediately running make -j4 again succeeds.

In the following snippet from the log, FILE=libraries/integer-gmp/mkGmpDerivedConstants/mkGmpDerivedConstants.c

{{{
"/usr/bin/gcc"  -m64 -fno-stack-protector
  -Ilibraries/integer-gmp/gmp -Ilibraries/integer-gmp/mkGmpDerivedConstants/dist
  -c FILE -o libraries/integer-gmp/mkGmpDerivedConstants/dist/build/mkGmpDerivedConstants.o

FILE:15:17: error: gmp.h: No such file or directory
FILE: In function ‘main’:
FILE:68: error: ‘MP_INT’ undeclared (first use in this function)
FILE:68: error: (Each undeclared identifier is reported only once
FILE:68: error: for each function it appears in.)
FILE:69: error: expected expression before ‘)’ token
FILE:69: error: expected expression before ‘)’ token
FILE:70: error: expected expression before ‘)’ token
FILE:70: error: expected expression before ‘)’ token
FILE:71: error: expected expression before ‘)’ token
FILE:71: error: expected expression before ‘)’ token
make[1]: *** [libraries/integer-gmp/mkGmpDerivedConstants/dist/build/mkGmpDerivedConstants.o] Error 1
make[1]: *** Waiting for unfinished jobs....
}}}

Some 1677 lines later, I see the line

> cp libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/

Which is I suppose why make -j4 succeeds the second time around.

I also see

> libraries/integer-gmp/mkGmpDerivedConstants/ghc.mk:20: libraries/integer-gmp/mkGmpDerivedConstants/dist/build/.depend.c_asm: No such file or directory

many lines above.

On Mon, Aug 5, 2013 at 9:26 PM, Kazu Yamamoto <kazu@iij.ad.jp> wrote:
Hi,

I'm using GHC head (32bit) on Mac. Recently, building GHC head
stops:

----
% make maintainer-clean; perl boot; ./configure --prefix=/ghc-head; make -j3
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
libtool: link: rm -fr .libs/libgmp.lax
libtool: link: ( cd ".libs" && rm -f "libgmp.la" && cp -p "../libgmp.la" "libgmp.la" )
cp libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/
cp libraries/integer-gmp/gmp/gmpbuild/.libs/libgmp.a libraries/integer-gmp/gmp/
inplace/bin/mkdirhier libraries/integer-gmp/gmp/objs
cd libraries/integer-gmp/gmp/objs && /usr/bin/ar x ../libgmp.a
ranlib libraries/integer-gmp/gmp/libgmp.a
ranlib: file: libraries/integer-gmp/gmp/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprintf.o) has no symbols
ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obvprintf.o) has no symbols
ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: libraries/integer-gmp/gmp/libgmp.a(repl-vsnprintf.o) has no symbols
make: *** [all] Error 2
%
----

One more "make -j3" finishes the building. I'm sure that this does not
happen before.

Are there any guys who get this problem?

--Kazu

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs