From the mpfr FAQ """ I get undefined reference to __gmp_get_memory_functions. If you get such an error, in particular when running make check, then this probably means that you are using the header file from GMP 4.2.x but the GMP 4.1.4 library. This can happen if several GMP versions are installed on your machine (e.g., one provided by the system in /usr/{include,lib} and a new one installed by the owner or administrator of the machine in /usr/local/{include,lib}) and your include and library search paths are inconsistent. On various GNU/Linux machines, this is unfortunately the case by default (/usr/local/include is in the default include search path, but /usr/local/lib is not in the default library search path). Typical errors are: undefined reference to `__gmp_get_memory_functions' in make check. The best solution is to add /usr/local/include to your C_INCLUDE_PATH environment variable and to add /usr/local/lib to your LIBRARY_PATH and LD_LIBRARY_PATH environment variables (and/or LD_RUN_PATH). Alternatively, you can use --with-gmp* configure options, e.g. --with-gmp=/usr/local, but this is not guaranteed to work (in particular with gcc and system directories such as /usr or /usr/local), and other software that uses GMP and/or MPFR will need correct paths too; environment variables allow you to set them in a global way. Other information can be given in the INSTALL file and ld manual. Please look at them for more details. See also the next question. """ this means to set export C_INCLUDE_PATH=/home/server/packages/gmp/include/:$C_INCLUDE_PATH export LIBRARY_PATH=/home/server/packages/gmp/lib:$LIBRARY_PATH export LD_LIBRARY_PATH=/home/server/packages/gmp/lib/:$LD_LIBRARY_PATH export LD_RUN_PATH=/home/server/packages/gmp/lib:$LD_RUN_PATH then run ./configure CFLAGS="-O3 -mtune=core2 -march=core2 -mfpmath=sse -msse2" --includedir=/home/server/packages/gmp/include/ --libdir=/home/server/packages/gmp/lib LIBS=/home/server/packages/gmp/lib/libmpfr.a just to be damn sure the right libraries are found for ssse3 (like on my laptop) use ./configure CFLAGS="-O2 -mtune=core2 -march=core2 -mfpmath=sse -mssse3"