jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
5.04k stars 1.81k forks source link

Cannot build with ninja #675

Open przecze opened 5 years ago

przecze commented 5 years ago

Steps to reproduce:

mkdir build
cd build
cmake -GNinja ../
ninja

outputs:

ninja: error: 'test/prefix/lib/libgmock.a', needed by 'test/run-tests', missing and no known rule to make it

Related #210 #539 but nothing gives a solution. Adding -DYAML_CPP_BUILD_TOOLS=OFF doesn't change anything.

Environment:

$ cmake --version
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ ninja --version
1.8.2
$ lsb_release -d
Description:    Ubuntu 18.04.1 LTS

Using make works fine in the same environment

Zingam commented 5 years ago

I made it build with Ninja here: https://github.com/jbeder/yaml-cpp/pull/674/commits/5eefba2b116910641b3131312790f477487d09a0

Unfortunately I couldn't get to build and pass the tests on Travis. I guess a serious change to the build environment is necessary.

nigels-com commented 11 months ago

Seeing the same error message for ~yaml-cpp-0.6.3 cmake version 3.26.3 on Ubuntu 20.04.6 LTS

cmake --build build/yaml-cpp --config Release --parallel
ninja: error: 'test/prefix/lib/libgmock.a', needed by 'test/run-tests', missing and no known rule to make it
make: *** [manifest/module/Makefile.yaml-cpp:24: build-yaml-cpp] Error 1
nigels-com commented 11 months ago

Does seem to work for current master branch. Great!

robtaylor commented 1 month ago

Currently getting:

[0/2] Re-checking globbed directories...
ninja: error: 'lib/libyaml-cppd.a', needed by 'lib/libdump.a', missing and no known rule to make it

With yaml-cpp fetched with:

[0/2] Re-checking globbed directories...
ninja: error: 'lib/libyaml-cppd.a', needed by 'lib/libdump.a', missing and no known rule to make it

with Cmake 3.30.0 on macOS 14.6 aarch64 . Any clues warmly received!