IMPORTANT: Vertica and Amazon Linux 2.0 gcc Compatibility Problems

This post was authored by Monica Cellio, with Serge Bonte.

The Vertica binaries are compiled using the default version of g++ installed on the supported Linux platforms. Vertica requires a minimum of gcc version 4.8.4.

The default version of g++ on Amazon Linux 2.0 is not compatible with gcc 4.8.4. To be able to compile UDxs on Amazon Linux 2.0, take the following steps to install packages needed for 4.8.4 compatibility.

Remove the existing gcc and gcc-c++ packages:

$ sudo yum remove gcc-c++
$ sudo yum remove gcc

Install the compatibility packages:

$ sudo yum install compat-gcc-48 
$ sudo yum install compat-gcc-48-c++

Create links for compilers and libraries:

$ cd /usr/bin 
$ sudo ln -s ./gcc48 gcc 
$ sudo ln -s ./g++48 g++

$ cd /usr/lib64 
$ sudo ln -s ./libstdc++.so.6.0.24 libstdc++.so 
$ sudo ln -s ./libgcc_s-7-20170915.so.1 libgcc_s.so 

The exact build versions for the libgcc and libstdc++ libraries might vary. Adjust these commands based on which build version was installed by yum.

Add the following to .bashrc:

$ export LD_LIBRARY_PATH=/usr/lib64

To build the Vertica SDK examples, install the dependent libraries (if you haven’t already) and run make:

$ sudo yum install bzip2-devel 
$ sudo yum install zlib-devel 
$ sudo yum install libcurl-devel 
$ sudo yum install boost_devel

$ cd /opt/vertica/sdk/examples 
$ make

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file