mesonbuild/meson

Unhandled exception / bad error message "is not a target" for subproject as link dependency

已關閉

#3,787 建立於 2018年6月24日

 (8 則留言) (1 個反應) (0 位負責人)Python (1,465 個分叉)batch import
bugexceptiongood first issueparser/interpreter

倉庫指標

星標
 (4,978 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

foo = subproject('foo')
bar = library('bar', ['bar.cpp'],
    link_with: [foo])

meson build afterwards returns the following error:

mqudsi@ZBook /m/c/U/M/g/blocklevel> ninja -v -C build
ninja: Entering directory `build'
[1/1] /usr/bin/python3.6 /usr/local/bin/meson --internal regenerate /mnt/c/Users/Mahmoud/git/blocklevel /mnt/c/Users/Mahmoud/git/blocklevel/build --backend ninja
The Meson build system
Version: 0.46.0
Source dir: /mnt/c/Users/Mahmoud/git/blocklevel
Build dir: /mnt/c/Users/Mahmoud/git/blocklevel/build
Build type: native build
Project name: Blocklevel
Native C++ compiler: sc++ (clang 7.0.0 "clang version 7.0.0- (trunk)")
Appending CXXFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
Appending CPPFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
Build machine cpu family: x86_64
Build machine cpu: x86_64

|
|Executing subproject nst-log.
|
|Project name: nst-log
|Native C++ compiler: sc++ (clang 7.0.0 "clang version 7.0.0- (trunk)")
|Appending CXXFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Appending CPPFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Build targets in project: 1
|
|Subproject nst-log finished.

|
|Executing subproject rwlock.
|
|Project name: rwlock
|Native C++ compiler: sc++ (clang 7.0.0 "clang version 7.0.0- (trunk)")
|Appending CXXFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Appending CPPFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Build targets in project: 2
|
|Subproject rwlock finished.

|
|Executing subproject pevents.
|
|Project name: pevents
|Native C++ compiler: sc++ (clang 7.0.0 "clang version 7.0.0- (trunk)")
|Appending CXXFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Appending CPPFLAGS from environment: '-march=native -msse4a -mfma -D_GLIBCXX_USE_CXX11_ABI'
|Dependency threads found: YES
|Build targets in project: 9
|
|Subproject pevents finished.

meson.build:10:0: ERROR:  <mesonbuild.interpreter.Interpreter object at 0x7f74eaabad68> is not a target.

EDIT

In case it needs to be said: I know what I did wrong, I'm not complaining that this code doesn't work, etc. etc. I'm reporting that this user error should be handled more gracefully and with an appropriate error message such as Subproject 'foo' cannot be directly used as a link dependency. or whatever.

貢獻者指南