diff options
author | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-14 04:50:52 +0300 |
---|---|---|
committer | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-14 05:18:46 +0300 |
commit | 5205a4cf05fecb863e257a1529b7ee2cdc3ab013 (patch) | |
tree | dc2c4aaaaac2815ba923c7213eb7df578b6823f2 | |
parent | d84c33c860ec0b12a0d944d686de2dd66d8af6a3 (diff) | |
download | meson-5205a4cf05fecb863e257a1529b7ee2cdc3ab013.zip meson-5205a4cf05fecb863e257a1529b7ee2cdc3ab013.tar.gz meson-5205a4cf05fecb863e257a1529b7ee2cdc3ab013.tar.bz2 |
dub: Detect if the missing package was built for wrong architecture
-rw-r--r-- | mesonbuild/dependencies/base.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index abdc39d..3f17830 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -905,7 +905,18 @@ class DubDependency(ExternalDependency): self.module_path = self._find_right_lib_path(package['path'], comp, description, True, package['targetFileName']) if not os.path.exists(self.module_path): - mlog.error(mlog.bold(name), 'found but it wasn\'t compiled with', mlog.bold(comp)) + # check if the dependency was built for other archs + archs = [['x86_64'], ['x86'], ['x86', 'x86_mscoff']] + for a in archs: + description_a = copy.deepcopy(description) + description_a['architecture'] = a + arch_module_path = self._find_right_lib_path(package['path'], comp, description_a, True, package['targetFileName']) + if arch_module_path: + mlog.error(mlog.bold(name), "found but it wasn't compiled for", mlog.bold(arch)) + self.is_found = False + return + + mlog.error(mlog.bold(name), "found but it wasn't compiled with", mlog.bold(comp)) self.is_found = False return |