User Tools

Site Tools


Action disabled: index
linux:compiling

Compiling programs

Compiling is the process of translating the source code into the native language of the computer's processor using a compiler.

Compiler

Depending on the language used to write the program, different compiler are necessary:

  • for C program use gcc;
  • for FORTRAN program use gfortran.

They have to be installed through Synaptic.

Source code

The source code is usually supplied in the form of a .tar file, also called tarball.

Building & Installing the program

Use the following commands in this order.

  1. Analyse the building environment:
    ./configure

    Important: if there are error messages, the configuration will fail and the program will not be built until the errors will be corrected.

    If everything is ok will be created the Makefile file.

  2. Build the program:
    make
  3. Install the program:
    sudo make install

    Since it will be installed in /usr/local/bin, which is not normally writeable, it's necessary to become the superuser.

The above procedure doesn't give the possibility to uninstall the software.

In this case, to create a .deb file that can be handled through Synaptic, install the checkinstall package, then run the command within the source folder:

sudo checkinstall
linux/compiling.txt · Last modified: 2023/05/28 16:07 by 127.0.0.1