The Configure script runs get_include_path, get_lib_path, and then get_gmp, which runs
locate to search along a list of directories for gmp.h.  Here is the list:

    /usr/local/include
    /usr/include
    /opt/include
    /opt/local/include
    /opt/gnu/include

The compiler in /mingw64/bin looks in none of those places.

On Mon, Jun 15, 2015 at 11:24 AM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
On Mon, Jun 15, 2015 at 11:06:48AM -0700, Daniel R. Grayson wrote:
> On Mon, Jun 15, 2015 at 10:27 AM Bill Allombert <
> Bill.Allombert@math.u-bordeaux.fr> wrote:

>> <http://pari.math.u-bordeaux.fr/archives/pari-dev-1506/msg00000.html>
>>
>
>Thanks, I'll try out the pre-release of 2.7.4!

Yes, please. The release date is on Friday...

> > > (3) Pari insists the user tell it where gmp.h is, even though the
> > > compiler knows where to
> > >      find it (it's not in /usr/include).  Why not just ask the
> > > compiler if it can be found by compiling
> > >      a one-line program?
> >
> > If you specify where libgmp is, then you have to specify where gmp.h is,
> > otherwise, PARI might end up using the wrong gmp.h file.
> >
>
> But I don't want to specify the location of libgmp either -- the package
> manager for
> MSYS2 does a good job installing both the library and the include files
> where
> the compiler can find them (in /mingw64/lib and /mingw64/include).  Neither
> the user
> nor pari need to know where they are.

Well, then it is a different issue. It is supposed to work.
Check the file O*/config.log for why it failed.

Cheers,
Bill.