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

Error when building with ninja #3194

Closed
junaire opened this issue Oct 24, 2021 · 2 comments · Fixed by #3195
Closed

Error when building with ninja #3194

junaire opened this issue Oct 24, 2021 · 2 comments · Fixed by #3195
Labels
type/bug Type: something is unexpected

Comments

@junaire
Copy link
Contributor

junaire commented Oct 24, 2021

Describe the bug (must be provided)
Hello, This project is awesome and I'm really interested in it! But when I try to build it, I ran into trouble.

I found that I can't build it with ninja.(Maybe we have not support it now?)

Your Environments (must be provided)

  • OS: Linux 5.11.0-37-generic #41-Ubuntu x86_64 GNU/Linux
  • Compliler: g++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0
  • CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  • Commit id cd2ecb922b
  • cmake version 3.18.4
  • ninja version 1.10.1

How To Reproduce(must be provided)

  1. mkdir build && cd build
  2. cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ../

Expected behavior

build success

Additional context

CMake Error:
  Running

   '/usr/bin/ninja' '-C' '/home/jun/dev/cpp-projects/nebula/build' '-t' 'cleandead'

  failed with:

   ninja: error: build.ninja:207: bad $-escape (literal $ must be written as $$)
    COMMAND = cd /home/jun/dev/cpp-projects/nebula/build && $(MAKE) instal...
                                                            ^ near here



CMake Error:
  Running

   '/usr/bin/ninja' '-C' '/home/jun/dev/cpp-projects/nebula/build' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:207: bad $-escape (literal $ must be written as $$)
    COMMAND = cd /home/jun/dev/cpp-projects/nebula/build && $(MAKE) instal...
                                                            ^ near here



CMake Generate step failed.  Build files cannot be regenerated correctly.

Also, I have found robotology/robotology-superbuild/issues/83 with same issue, and they fix this in 68a218225804.

I guess it is a good way to start some contribution, and I'm willing to submit a patch for you(of course if it is a real bug...)

@junaire junaire added the type/bug Type: something is unexpected label Oct 24, 2021
@darionyaphet
Copy link
Contributor

CMake Error: CMake was unable to find a build program corresponding to "Ninja". 
CMAKE_MAKE_PROGRAM is not set.

it seems should set the CMAKE_MAKE_PROGRAM flag.

@junaire
Copy link
Contributor Author

junaire commented Oct 24, 2021

CMake Error: CMake was unable to find a build program corresponding to "Ninja". 
CMAKE_MAKE_PROGRAM is not set.

it seems should set the CMAKE_MAKE_PROGRAM flag.

Hello, I haven't run into this problem. Do you have ninja installed in your machine?

You can install ninja in ubuntu by running:

sudo apt install ninja-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants