https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84554
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to matthew.hambley from comment #1) > What seems to be happening is that it's correctly picking up gmp.h from the > in-source version but and old version of the library from > /usr/lib64/libgmp.so. That shouldn't be possible, because by using contrib/download_prerequisites GCC will link to a static in-tree libgmp.a and so doesn't need any libgmp.so at all. Do you have any odd environment variables that would be forcing it to link to the shared library?