mesonbuild/meson

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

Closed

#3787 aperta il 24 giu 2018

Vedi su GitHub
 (8 commenti) (1 reazione) (0 assegnatari)Python (1465 fork)batch import
bugexceptiongood first issueparser/interpreter

Metriche repository

Star
 (4978 star)
Metriche merge PR
 (Merge medio 139g 13h) (51 PR mergiate in 30 g)

Descrizione

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.

Guida contributor