-1

Wander to make some modification on libgomp (gcc's OpenMP runtime library), I downloaded the source code of GCC8, and tried to configure/make the whole compiler.

The configuration phase terminated rapidly enough but I waited 1 hour for the make, still not finished, and I cancelled it.

So why the configure/make gcc takes that long time whilst when I installed the gcc compiler with app-get install, it takes no more than few minutes??

here an example of how long the make phase can last (depending on you PC performance, but shows an order of magnitude)

  • 2
    How are you planning to make changes to the OpenMP code in gcc if you do not know how make works? – ajeh May 23 '18 at 15:56
  • 1
    A new gcc compiles several times against itself to prevent objects from your gcc etc. being included in the new executable´s / libraries. Expect the compile time to be three to four hours. Example, gcc8 https://drive.google.com/file/d/1Nh26u6wFenJEkLJidbHVxNLu8GcSbIf9/view?usp=sharing – Knud Larsen May 23 '18 at 17:41
  • It’s kind of the same reason it takes longer to write a book than it does to photocopy a book. – G-Man Says 'Reinstate Monica' May 24 '18 at 06:19

1 Answers1

4

apt-get install fetches a precompiled package from the repositories, while the make process compiles the entire thing from source on the local machine.

This is one of the reasons why many distributions have repositories of precompiled packages. It makes it more convenient for the end user to set up a system (since it takes less time to set up) and also makes troubleshooting a distribution's system component easier, since it was compiled with the same options on all systems it is installed on.

Mio Rin
  • 3,040
  • 2
    ... and also makes possible evaluating dependencies and incompatibilities between packages. – dr_ May 23 '18 at 15:18