varlink / libvarlink

C implementation of the Varlink protocol and command line tool
Apache License 2.0
87 stars 15 forks source link

Build failure: Multiple producers for Ninja target "ctags" #22

Closed thomasjfox closed 4 years ago

thomasjfox commented 4 years ago

Hi Harald,

while starting the review of #20, I did a fresh clone of the libvarlink repo on Fedora 31. I just tried running "make" in the top source and the build failed with this:

$ make
meson build
The Meson build system
Version: 0.53.1
Source dir: /tmp/libvarlink
Build dir: /tmp/libvarlink/build
Build type: native build
Project name: libvarlink
Project version: 18
C compiler for the host machine: ccache cc (gcc 9.2.1 "cc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)")
C linker for the host machine: cc GNU ld.bfd 2.32-31
Host machine cpu family: x86_64
Host machine cpu: x86_64
Library m found: YES
Configuring config.h using configuration
Program ./varlink-wrapper.py found: YES (/tmp/libvarlink/./varlink-wrapper.py)
Configuring libvarlink.pc using configuration
Program test-symbols.sh found: YES (/tmp/libvarlink/lib/test-symbols.sh)
Program git found: YES (/usr/bin/git)
Build targets in project: 13

Found ninja-1.9.0 at /usr/bin/ninja

ERROR: Multiple producers for Ninja target "ctags". Please rename your targets.

A full log can be found at /tmp/libvarlink/build/meson-logs/meson-log.txt

When I remove the "tags" / "ctags" custom target from meson.build, libvarlink builds just fine.

Any idea?

Cheers, Thomas

thomasjfox commented 4 years ago

The generated build/build.ninja seems to contain an auto-generated "ctags" target:

build meson-ctags: CUSTOM_COMMAND PHONY
 COMMAND = /usr/bin/meson --internal tags ctags /tmp/libvarlink
 pool = console

build ctags: phony meson-ctags

When I rename the custom "ctags" target to "ctags2" in meson.build, libvarlink also builds. The same error message is also visible in #17

haraldh commented 4 years ago

@keszybz ?

keszybz commented 4 years ago

I think meson could do a better job of keeping compat, but let's just drop the internal one → #23.