使用Ninja构建eos项目时遇make无目标无Makefile报错求助
Hey there, let's break down what's causing your issue and how to fix it quickly:
The Root Cause
You used cmake -G "Ninja" to generate build files, which creates Ninja build scripts instead of traditional Makefiles. When you ran make, it couldn't find a Makefile to execute—hence the error. Also, this project uses CMake for configuration, so there's no ./configure script (that's why you got the "No such file or directory" message).
Solution 1: Use Ninja (since you already generated Ninja build files)
In your build directory, replace the make && make install command with:
ninja && ninja install
This will use the Ninja build system you configured earlier to compile and install the project.
Solution 2: Switch back to Makefiles
If you prefer using make instead, clean your current build directory first, then re-run CMake without the Ninja generator:
cd ../build rm -rf * cmake ../eos -DCMAKE_INSTALL_PREFIX=../install/ make && make install
This will generate standard Makefiles that the make command can recognize.
Quick Note
You don't need to run ./configure for this project—CMake handles all the configuration steps when you run the cmake command.
内容的提问来源于stack exchange,提问作者Francesco

