seL4 / sel4-tutorials

Tutorials for working with seL4 and/or CAmkES.

Home Page:https://docs.sel4.systems/Tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to init with cmake 3.16.0

cvluca opened this issue · comments

I have no issue with cmake 3.15.5 on Ubuntu 18.04, but it failed to init when I update to the newest cmake version.

Hi @cvluca , are you able to provide a build log?

Hi @cvluca , are you able to provide a build log?

@kent-mcleod There is no cmake log being generated. This is what the error looks like.

$ ./init --tut hello-world
loading initial cache file ../projects/sel4-tutorials/settings.cmake
-- Found capdl: /home/luca/sel4/tutorial/projects/capdl
-- Found camkes-tool: /home/luca/sel4/tutorial/projects/sel4-tutorials
CMake Error: The source directory "/home/luca/sel4/tutorial/hello-world" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
  File "./init", line 96, in <module>
  File "./init", line 85, in main
  File "/home/luca/sel4/tutorial/projects/sel4-tutorials/common.py", line 106, in init_directories
    return _init_build_directory(config, initialised, build_directory, tute_directory, output, config_dict=config_dict)
  File "/home/luca/sel4/tutorial/projects/sel4-tutorials/common.py", line 74, in _init_build_directory
    return sh.cmake(args + [tute_directory], _cwd=directory, _out=output, _err=output)
  File "/home/luca/.local/lib/python3.6/site-packages/sh.py", line 1427, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/home/luca/.local/lib/python3.6/site-packages/sh.py", line 774, in __init__
    self.wait()
  File "/home/luca/.local/lib/python3.6/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/luca/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/local/bin/cmake -G Ninja -DTUT_BOARD=pc -DTUT_ARCH=x86_64 -DTUTORIAL_DIR=hello-world -C ../projects/sel4-tutorials/settings.cmake /home/luca/sel4/tutorial/hello-world

  STDOUT:


  STDERR:

Hmm, It seems the issue is because of this change:

The cmake(1) -C option now evaluates the initial cache script with CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR set to the top-level source and build trees.
https://cmake.org/cmake/help/v3.16/release/3.16.html#other-changes

Currently the setttings.cmakes script uses the old behavior to detect the stage of build configuration. Will likely need to update to a different mechanism.

Yes, same issue I am seeing as well. Is there any update on this till now? How should I proceed further?

@debankan777, @cvluca I think I have a fix for it now.