Skip to content

GCC Installation

jvsguerra edited this page Nov 14, 2019 · 18 revisions

GCC Installation Guide

The installation procedures for GCC (GNU Compiler Collection) are different for Linux and macOS.

First check the GCC version on your operating system.

$ gcc --version

parKVFinder supports GCC versions later than 6. Otherwise, you must install a newer GCC version.

Linux

To install the standard available version of GCC on your operating system, type:

$ sudo apt install gcc

Note: check the GCC version again to make sure you have installed a version later than 6.

If the default version GCC is not later than 6, you can install directly any later version by typing:

# GCC version 6
$ sudo apt install gcc-6
# GCC version 7
$ sudo apt install gcc-7
# GCC version 8
$ sudo apt install gcc-8
# GCC version 9
$ sudo apt install gcc-9

Then, there are two possible paths to prepare GCC to compile the parKVFinder source code.

  • Create a symbolic link to your custom GCC
$ sudo ln -s /usr/bin/gcc-X /usr/local/bin/gcc

Note: X is the version of GCC you have installed.

  • Replace gcc to gcc-X in Makefile within the parKVFinder directory

macOS

The macOS native C compiler is Clang LLVM compiler, which is not supported by parKVFinder.

First, you need to install:

  • Homebrew package manager;
  • Command Line Tools (CLT) for Xcode (xcode-select --install) or Xcode.

To install the standard available version of GCC on your Homebrew package manager, type:

$ brew install gcc

Note: check the GCC version to make sure you have installed a version later than 6.

If the default version GCC is not later than 6, you can install directly any later version by typing:

# GCC version 6
$ brew install gcc@6
# GCC version 7
$ brew install gcc@7
# GCC version 8
$ brew install gcc@8
# GCC version 9
$ brew install gcc@9

Then, there are two possible paths to prepare GCC to compile the parKVFinder source code.

  • Create a symbolic link to your custom GCC
$ sudo ln -s /usr/local/bin/gcc-X /usr/local/bin/gcc

Note: X is the version of GCC you have installed.

  • Replace gcc to gcc-X in Makefile within the parKVFinder directory