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

failed to init with cmake 3.16.0 #40

Closed
cvluca opened this issue Dec 6, 2019 · 5 comments · Fixed by #43
Closed

failed to init with cmake 3.16.0 #40

cvluca opened this issue Dec 6, 2019 · 5 comments · Fixed by #43

Comments

@cvluca
Copy link

cvluca commented Dec 6, 2019

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.

@kent-mcleod
Copy link
Member

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

@cvluca
Copy link
Author

cvluca commented Dec 6, 2019

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:

@kent-mcleod
Copy link
Member

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.

@debankanroy
Copy link

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

@kent-mcleod
Copy link
Member

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

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

Successfully merging a pull request may close this issue.

3 participants