Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on linux vm tutorial #99

Open
lalalaporo opened this issue Mar 20, 2023 · 2 comments
Open

Problem on linux vm tutorial #99

lalalaporo opened this issue Mar 20, 2023 · 2 comments
Labels

Comments

@lalalaporo
Copy link

I have been trying to make (ninja) the solution of camkes-linux-vm works for a week now and I can't seem to do so. I have limited experience on everything related with sel4 and compiler stuff.

Also, first of all I am aware of this: #80
and this: https://github.com/seL4/sel4-tutorials/pull/81/files/445c6319bab65c4d0b4e7c063ac065800322bfda

However, even with the changes, I see the following:

Performing configure step for 'poke-module'
FAILED: poke-module-stamp/poke-module-configure /home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module-stamp/poke-module-configure
cd /home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module && /usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/admin2/seL4_tutorial/tools/seL4/cmake-tool/polly_toolchains/linux-gcc-32bit-pic.cmake -DLINUX_KERNEL_DIR=/home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/out/linux-4.8.16 -DMODULE_HELPERS_FILE=/home/admin2/seL4_tutorial/projects/camkes-vm-linux/linux-module-helpers.cmake -GNinja /home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831/modules && /usr/bin/cmake -E touch /home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module-stamp/poke-module-configure
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- [polly] Used toolchain: Linux / gcc / PIC / c++11 support / 32 bit
-- The CXX compiler identification is GNU 11.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/usr/bin/g++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_a7cf9 && [1/2] Building CXX object CMakeFiles/cmTC_a7cf9.dir/testCXXCompiler.cxx.o
[2/2] Linking CXX executable cmTC_a7cf9
FAILED: cmTC_a7cf9
: && /usr/bin/g++ -m32 -fPIC -std=c++11 CMakeFiles/cmTC_a7cf9.dir/testCXXCompiler.cxx.o -o cmTC_a7cf9 && :
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module/CMakeFiles/CMakeOutput.log".
See also "/home/admin2/seL4_tutorial/camkes-vm-linuxvfpqy831_build/poke-module/CMakeFiles/CMakeError.log".
ninja: build stopped: subcommand failed.

It seem that I don't have libstdc++11, however I tried
apt-get build-essential and sudo apt-get install libstdc++-11-dev-i386-cross. The latter one is me trying to compile it to a 32-bit thing, which as you can tell I don't even know what I am talking about.

In summary am I missing something? If it helps the ninja is sucessful when I init the tutorial without the solution.
Any input is appreciated.

Just so when I am here, the tutorial "camkes-vm-crossvm" just simply does not init, saying
CMake Error at CMakeLists.txt:20 (message): This application is only supported on x86_64 Call Stack (most recent call first): /home/admin2/seL4_tutorial/projects/sel4-tutorials/Findsel4-tutorials.cmake:23 (include) CMakeLists.txt:3 (sel4_tutorials_regenerate_tutorial)
But I am on 64 bit?
Thanks!

@lalalaporo
Copy link
Author

Oh I am on ubuntu 22.04.2 LTS. I have also tried reinstall fresh ubuntu and the dependences as well.

@lsf37 lsf37 added the question label Mar 27, 2023
@j1mst1x
Copy link

j1mst1x commented Jun 11, 2024

I was able to get past this issue by installing lib32stdc++-10-dev in the docker container. So:

$ sudo apt install lib32stdc++-10-dev

Remember that the container is ephemeral so this change will go away on the next run unless you add this to extras.dockerfile.

I'll go submit a pull request on the docker container repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants