Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 743
Gabriel Fernandez Avatar asked Jun 22 '18 09:06

Gabriel Fernandez


People also ask

How to install gcc in alpine?

The best way to install all necessary libraries to compile gcc is using ./contrib/download_prerequisites script in the gcc source directory. That will download the support libraries and create symlinks, causing them to be built automatically as part of the gcc build process.

Does Alpine Linux have GCC?

This image is based on Alpine Linux image, which is only a 5MB image, and contains C compiler (GCC package).

Does alpine run from RAM?

Data Disk Mode This mode also runs from system RAM, thus it enjoys the same accelerated operation speed as "diskless" mode.

Is Alpine Linux good for beginners?

The recommendation to develop packages for newbies, are using Alpine Linux in a chroot, later when users got more experience.. must move to others way to develop packages.. at the actual status of a newbie it's the most easy and faster way.


1 Answers

The quickest way to install GCC on Alpine Linux is by issuing the following command:

apk add build-base

source: https://wiki.alpinelinux.org/wiki/GCC

like image 160
Ro. Avatar answered Sep 24 '22 07:09

Ro.