Open carlosb1 opened 6 years ago
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.
I work with Ubuntu Mint (it is a Ubuntu 16.04)... The flag CMAKE_CXX_COMPILER_WORKS
was 1...
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?
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!
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
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.
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.
I tried to compile with the -lstdc++ flag a hello world example and it works well... I will continue searching
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?
... 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"
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:Error: