conan: Using conan with ninja results in strange link errors

Hi,

Thanks very much for all your work with conan. I am using it on Linux (debian testing x64). I’ve successfully updated my project to use conan[1] but for some reason I’m unable to build using ninja[2]. I’m wondering if I’ve done something wrong.

The steps to reproduce using my project are as follows (assuming you have libxml dev headers):

$ git clone https://github.com/DomainDrivenConsulting/dogen.git
$ cd dogen/build
$ mkdir output
$ cd output
$ conan install ../..
$ cmake ../.. -G Ninja
$ ninja -j5
<snip>
$ ninja: error: '~/.conan/data/Boost/1.60.0/lasote/stable/package/ebdc9c0c0164b54c29125127c75297f6607946c5/lib/libboost_system.so', needed by 'stage/bin/dogen_utility_spec', missing and no known rule to make it

This error is rather puzzling because I can see boost system in the filesystem and it looks perfectly fine. I can use ninja without conan, but unfortunately I have boost 1.59 on my system, so it’s not a perfect comparison. Also, when using GNU make with exactly the same conan settings, the project compiles and runs fine.

The error appears to be some kind of weird interaction between conan, cmake and ninja, but not quite sure who to blame. It could be something as simple as the library path not being passed in all the way to ninja, I guess. When I get more time I will try to create a small program that triggers this behaviour.

In the meantime, any ideas on how to debug this problem are welcome.

Cheers

Marco

[1] http://mcraveiro.blogspot.co.uk/2015/12/nerd-food-dogen-package-management-saga.html [2] https://ninja-build.org/manual.html

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Thanks again! I appreciate your help.