IncludeOS icon indicating copy to clipboard operation
IncludeOS copied to clipboard

g++ 7.0 / clang 5.0 required for building dev

Open alfreb opened this issue 7 years ago • 3 comments

We've bumped C++ version to C++17 on the dev branch, which places new constraints on clang and gcc version. Building IncludeOS will now require clang++-5.0, and building the unit tests with gcc will require g++-7.0. The unit tests will also build fine with clang++-5.0, but as the unit tests are a normal host binary it will need access to a recent c++ standard library on the host. Installing g++-7.0 will provide this.

Clang 5.0 is available in universe on ubuntu 16.04 LTS, but g++-7.0 is not. We'll need to either update our install script to provide these dependencies or ditch the install script and update documentation.

alfreb avatar Jan 30 '18 12:01 alfreb

@alfred-bratterud I have tried to install IncludeOS on Ubuntu 14.04 and I have faced an error which was posted #1654 .

Then, I tried with Ubuntu 16.04 and this is the problem I am facing. Both the Ubuntu installations are on Virtualbox and gcc/g++ version is 7.2.0

`>>> Dependencies required: Status Package Version


INSTALLED       curl                 7.47.0-1ubuntu2.5
INSTALLED       make                 4.1-6
INSTALLED       cmake                3.5.1-1ubuntu3
INSTALLED       nasm                 2.11.08-1
INSTALLED       bridge-utils         1.5-9ubuntu1
INSTALLED       qemu                 1:2.5+dfsg-5ubuntu10.16
INSTALLED       jq                   1.5+dfsg-1
INSTALLED       python-pip           8.1.1-2ubuntu0.4
INSTALLED       g++-multilib         4:5.3.1-1ubuntu1
INSTALLED       gcc                  4:5.3.1-1ubuntu1

clang-5.0 -> INSTALLED

python pip -> INSTALLED INSTALLED jsonschema (2.5.1) INSTALLED psutil (3.4.2) INSTALLED junit-xml (1.6) INSTALLED filemagic (1.6) INSTALLED pystache (0.5.4) INSTALLED antlr4-python2-runtime (4.7.1)

IncludeOS will be installed with the following options:

Env variable              Description               Value
------------              -----------               -----
INCLUDEOS_SRC             Source dir of IncludeOS   /home/karra/IncludeOS
INCLUDEOS_PREFIX          Install location          /usr/local/includeos
ARCH                      CPU Architecture          x86_64
INCLUDEOS_ENABLE_TEST     Enable test compilation   OFF

Is this correct [Y/n]?

Running install_from_bundle.sh (expect up to 3 minutes)

Best guess for compatible compilers: clang++ / clang

Building IncludeOS ~/IncludeOS/build_x86_64 ~/IncludeOS -- Target CPU x86_64 -- Target triple x86_64-pc-linux-elf CMake Error at /usr/local/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:48 (message): Could not find compiler set in environment variable CC:

clang. Call Stack (most recent call first): CMakeLists.txt:24 (project)

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "/home/karra/IncludeOS/build_x86_64/CMakeFiles/CMakeOutput.log".

Sorry <<< Could not install from bundle.`

When I tried to set the environment variable (as export CC=/usr/bin/gcc and export CXX=/usr/bin/g++ in .bashrc), the clang-5.0 -> INSTALLED is changing to clang-gcc -> MISSING and some other errors are showing up.

Please help with the installation.

karra88 avatar Jan 30 '18 17:01 karra88

@karra88 try this:

export CC=clang-5.0
export CXX=clang++-5.0
./install.sh

fwsGonzo avatar Jan 30 '18 21:01 fwsGonzo

@fwsGonzo Thanks. It worked

karra88 avatar Jan 31 '18 03:01 karra88