IncludeOS icon indicating copy to clipboard operation
IncludeOS copied to clipboard

Error in the installation

Open carlosb1 opened this issue 6 years ago • 10 comments

Hello, I tried to install the framework, but it throws an error executing ./install.sh. In fact, I have all the requirements for the installation. I don't know what It can be:

➜  IncludeOS git:(master) sudo ./install.sh
>>> Dependencies required:
Status          Package              Version 
------          -------              ------- 
INSTALLED       curl                 7.47.0-1ubuntu2.8 
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.29 
INSTALLED       jq                   1.5+dfsg-1 
INSTALLED       python-pip           8.1.1-2ubuntu0.4 
INSTALLED       gcc                  4:5.3.1-1ubuntu1 
INSTALLED       g++-multilib          

clang-5.0 -> INSTALLED

python pip -> INSTALLED
Status          Package              Version 
------          -------              ------- 
INSTALLED       jsonschema           2.6.0 
INSTALLED       psutil               5.4.6 
INSTALLED       junit-xml            1.8 
INSTALLED       filemagic            1.6 
INSTALLED       pystache             0.5.4 
INSTALLED       antlr4-python2-runtime 4.7.1 

Error:

CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/clang-5.0" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /home/carlosb/c-workspace/IncludeOS/build_i686/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/make" "cmTC_6bf52/fast"

  /usr/bin/make -f CMakeFiles/cmTC_6bf52.dir/build.make
  CMakeFiles/cmTC_6bf52.dir/build

  make[1]: Entering directory
  '/home/carlosb/c-workspace/IncludeOS/build_i686/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_6bf52.dir/testCCompiler.c.o

  /usr/bin/clang-5.0 --target=i686-pc-linux-elf -o
  CMakeFiles/cmTC_6bf52.dir/testCCompiler.c.o -c
  /home/carlosb/c-workspace/IncludeOS/build_i686/CMakeFiles/CMakeTmp/testCCompiler.c


  Linking C executable cmTC_6bf52

  /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6bf52.dir/link.txt
  --verbose=1

  /usr/bin/clang-5.0 --target=i686-pc-linux-elf
  CMakeFiles/cmTC_6bf52.dir/testCCompiler.c.o -o cmTC_6bf52 -rdynamic

  /usr/bin/ld: cannot find crtbegin.o: No such file or directory

  /usr/bin/ld: cannot find -lgcc

  /usr/bin/ld: cannot find -lgcc_s

  clang: error: linker command failed with exit code 1 (use -v to see
  invocation)

  CMakeFiles/cmTC_6bf52.dir/build.make:97: recipe for target 'cmTC_6bf52'
  failed

  make[1]: *** [cmTC_6bf52] Error 1

  make[1]: Leaving directory
  '/home/carlosb/c-workspace/IncludeOS/build_i686/CMakeFiles/CMakeTmp'

  Makefile:126: recipe for target 'cmTC_6bf52/fast' failed

  make: *** [cmTC_6bf52/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:24 (project)

carlosb1 avatar Jun 10 '18 20:06 carlosb1

What platform are you on? When porting from make to CMake I experienced kinda the same thing on Mac. This was solved in a pretty simple way... But I never seen this when installing.

AndreasAakesson avatar Jun 10 '18 20:06 AndreasAakesson

I work with Ubuntu Mint (it is a Ubuntu 16.04)... The flag CMAKE_CXX_COMPILER_WORKS was 1...

carlosb1 avatar Jun 10 '18 21:06 carlosb1

Mac user here. Maybe the install script isn't enough to install the correct compiler. Maybe you can try update/install clang yourself somehow and see if the problem goes away?

AndreasAakesson avatar Jun 13 '18 08:06 AndreasAakesson

This is most likely because of a missing package, try installing g++-multilib? Manually check if clang-5.0 is installed.

EDIT: this has been corrected, as we dont want gcc-multilib but g++-multilib!

fwsGonzo avatar Jun 13 '18 08:06 fwsGonzo

I have built and installed IncludeOS on Linux Mint now, without really doing much other than running install.sh, it failing for me on everything python. python is mostly used for tests and so I installed a few python3 packages since python2 doesnt work...

Before doing anything, open .bashrc and append:

export INCLUDEOS_SRC= path to repo
export INCLUDEOS_PREFIX=/home/your_username/includeos
export CC=clang-6.0
export CXX=clang++-6.0
export PATH=$PATH:/home/your_username/includeos/bin

How to install manually:

$ git submodule update --init --recursive
$ export PLATFORM=x86_pc
$ export ARCH=x86_64
$ mkdir build_x86_64
$ cd build_x86_64/
$ cmake .. -DCMAKE_INSTALL_PREFIX=/home/your_username/includeos

Result:

-- Target CPU x86_64
-- Target triple x86_64-pc-linux-elf
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/clang-6.0
-- Check for working C compiler: /usr/bin/clang-6.0 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-6.0
-- Check for working CXX compiler: /usr/bin/clang++-6.0 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using vanilla CPU features: SSE3. CAPABS = -msse3 -mfpmath=sse
-- Init git submodule: mod/GSL
-- Init git submodule: mod/http-parser
-- Init git submodule: mod/uzlib
-- Init git submodule: mod/rapidjson
-- Init git submodule: NaCl
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Init git submodule: lib/protobuf
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gonzo/git/IncludeOS/build_x86_64

EDIT: just realized most of the /home/user can be replaced with $HOME

fwsGonzo avatar Jun 13 '18 09:06 fwsGonzo

There is a manual_build.sh script on dev branch now that will build the whole thing without trying to install dependencies and such. It could help you install the OS provided you setup all the env variables properly and install dependencies yourself. Considering that Mint is essentially Ubuntu, I would still try to use install.sh.

fwsGonzo avatar Jun 14 '18 19:06 fwsGonzo

I did all the steps that you commented and finally I received this error

CMake Error at /home/carlosb/Desktop/tools/cmake-3.11.3-Linux-x86_64/share/cmake-3.11/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/bin/clang++-6.0"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/carlosb/Desktop/tools/IncludeOS/build_i686/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_c5ac1/fast"
    /usr/bin/make -f CMakeFiles/cmTC_c5ac1.dir/build.make CMakeFiles/cmTC_c5ac1.dir/build
    make[1]: Entering directory '/home/carlosb/Desktop/tools/IncludeOS/build_i686/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_c5ac1.dir/testCXXCompiler.cxx.o
    /usr/bin/clang++-6.0 --target=i686-pc-linux-elf     -o CMakeFiles/cmTC_c5ac1.dir/testCXXCompiler.cxx.o -c /home/carlosb/Desktop/tools/IncludeOS/build_i686/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_c5ac1
    /home/carlosb/Desktop/tools/cmake-3.11.3-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c5ac1.dir/link.txt --verbose=1
    /usr/bin/clang++-6.0 --target=i686-pc-linux-elf       -rdynamic CMakeFiles/cmTC_c5ac1.dir/testCXXCompiler.cxx.o  -o cmTC_c5ac1 
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: cannot find -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    CMakeFiles/cmTC_c5ac1.dir/build.make:86: recipe for target 'cmTC_c5ac1' failed
    make[1]: *** [cmTC_c5ac1] Error 1
    make[1]: Leaving directory '/home/carlosb/Desktop/tools/IncludeOS/build_i686/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_c5ac1/fast' failed
    make: *** [cmTC_c5ac1/fast] Error 2

It seems a problem with my clang installation.. but I don't know why, I will try to fix it before to continue the installation process.

carlosb1 avatar Jun 17 '18 16:06 carlosb1

I tried to compile with the -lstdc++ flag a hello world example and it works well... I will continue searching

carlosb1 avatar Jun 17 '18 16:06 carlosb1

You may be missing the g++-multilib package?

There is a manual_build.sh script on dev now which builds and installs 64-bit. Maybe its all you need?

fwsGonzo avatar Jun 17 '18 16:06 fwsGonzo

... Done, it works!, I think I had some problem with clang version, but the last problem was the g++ multilib package; It was not installed. the first time you commented I would install the gcc-multilib and I forgot the g++ multilib .

EDIT: -> It could be compiled with root in master... But I am investigating why I can not do it with the script "./manual_build.sh"

carlosb1 avatar Jun 17 '18 17:06 carlosb1