Search code examples
linuxgccalpine-linuxgmp

Installing GCC from source on Alpine


While trying to install GCC 6.4.0 on Alpine, I run into:

checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no

But in /usr/lib, which seems to be the standard lookup directory, I have:

libgmp.a
libgmp.so
libgmp.so.10
libgmp.so.10.3.2
libmpc.so.3
libmpc.so.3.0.0
libmpfr.so.4
libmpfr.so.4.1.5

What could be wrong?


Solution

  • It turns out that in this particular case one needs to install mpc1-dev, gmp-dev or mpfr-dev. I was missing out on mpc1-dev.

    sudo apk add mpc1-dev