title: PHP 7.4.10 on CentOS error: unable to locate gmp.h
body: <p>I'm using CentOS 7 and building a PHP 7.4.10 rpm from source. We've previously been using PHP 7.2 with gmp located at <code>/usr/lib64/</code>, so ./configure in the spec file takes <code>--with-gmp=/usr/lib64</code>. This works with no problem, and I've also tested that it still works with PHP 7.3.22. Building PHP 7.4.10 however hits this error: <code>configure: error: Unable to locate gmp.h</code>.</p>
  <pre><code>$ locate gmp.h
  /usr/include/gmp.h
  </code></pre>
  <pre><code>$ locate gmp.so
  /usr/lib64/libgmp.so
  /usr/lib64/libgmp.so.10
  /usr/lib64/libgmp.so.10.2.0
  </code></pre>
  <pre><code>%build
  cd %{_builddir}/php-%{version}
  export CC=/usr/local/gcc/bin/gcc
  export CXX=/usr/local/gcc/bin/g++
  export CFLAGS=&quot;-O3 -m64 -isystem/usr/local/gcc/include -L/usr/local/gcc/lib64 -Wl,--rpath=/usr/local/gcc/lib64 &quot;
  export CXXFLAGS=$CFLAGS
  ./configure --with-gmp=/usr/lib64 --enable-bcmath --enable-ftp --with-curl --with-openssl --enable-mbstring
  make -j8
  </code></pre>
  <pre><code>$ rpm -qa | grep -i gmp
  gmp-devel-6.0.0-15.el7.x86_64
  gmp-6.0.0-15.el7.x86_64
  </code></pre>
  <p>I've tried putting a symlink between <code>/usr/include/gmp.h</code> and <code>/usr/lib64/gmp.h</code>, which didn't work.
  I've also tried adding <code>-isystem/usr/include</code> and <code>-isystem/usr/include/gmp.h</code>to CFLAGS, CPFLAGS, and CXXFLAGS.</p>
  <p>I'm especially baffled since something seems to have changed for PHP 7.4, but I can't find any upgrade notes for it.</p>