camkes-vm-linux tutorial issue
When I try to build the tutorial and run ninja I got the following error. [1/31] Performing build step for 'hello-app' ninja: no work to do. [3/31] Performing configure step for 'poke-module' FAILED: poke-module-stamp/poke-module-configure cd /home/weiqi/test/camkes-vm-linux_build/poke-module && /usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/w eiqi/test/tools/seL4/cmake-tool/polly_toolchains/linux-gcc-32bit-pic.cmake -DLINUX_KERNEL_DIR=/home/weiqi/test/camkes-vm-linux_build/out/linux-4.8.16 -DMODULE_HELPERS_FILE=/home/weiqi/test/projects/camkes-vm-linux/linux-module-helpers.cmake -GNinja /home/weiqi/test/camkes-vm-linux/modules && /usr/local/bin/cmake -E touch /home/weiqi/test/camkes-vm-linux_build/poke-module-stamp/pok e-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 CMake Error at CMakeLists.txt:11 (DefineLinuxModule): DefineLinuxModule Function invoked with incorrect arguments for function named: DefineLinuxModule -- Configuring incomplete, errors occurred! See also "/home/weiqi/test/camkes-vm-linux_build/poke-module/CMakeFil es/CMakeOutput.log". See also "/home/weiqi/test/camkes-vm-linux_build/poke-module/CMakeFil es/CMakeError.log". [4/31] Completed 'hello-app' ninja: build stopped: subcommand failed.
Hi Nanfang,
When I try to build the tutorial and run ninja I got the following error.
[1/31] Performing build step for 'hello-app' ninja: no work to do. [3/31] Performing configure step for 'poke-module' ... 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.
It could be that the 'DeclareLinuxModule' directive is missing in the CMakeLists.txt file under the 'modules' folder. Or perhaps, the 'ExternalProject_add' directive is missing for the 'poke' kernel module. Additionally, there's a bug with the 'DeclareLinuxModule' directive for the poke module in the tutorial content. The 'DeclareLinuxModule(poke)' line should be this instead: DefineLinuxModule(${CMAKE_CURRENT_LIST_DIR}/poke poke-module poke-target KERNEL_DIR ${LINUX_KERNEL_DIR}) There should be a fix out for this pretty soon. Regards, Damon
Damon Thanks for suggestions. With the correct DefineLinuxModule directive for poke module, I am able to complete ninja command. Nanfang Sent from my iPhone
On Jun 9, 2020, at 7:54 PM, Lee, Damon (Data61, Kensington NSW)
wrote: ${CMAKE_CURRENT_LIST_DIR}/poke poke-module poke-target KERNEL_DIR
participants (2)
-
Lee, Damon (Data61, Kensington NSW)
-
Nanfang Hu