aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-08-08Bump versions to 1.2.1 for release1.2.11.2Nirbheek Chauhan2-2/+2
2023-08-08machine file: Fix crash on empty valueXavier Claessens1-2/+4
Fixes: #12025
2023-08-07Error when an installed static library links to internal custom targetXavier Claessens4-29/+86
When an installed static library A links to an internal static library B built using a custom_target(), raise an error instead of a warning. This is because to be usable, A needs to contain B which would require to extract the archive to get its objects files. This used to work, but was printing a warning and was installing a broken static library, because we used to overlink in many cases, and that got fixed in Meson 1.2.0. It now fails at link time with symbols from the custom target not being defined. It's better to turn the warning into a hard error at configure time. While at it, noticed this situation can happen for any internal custom or rust target we link to, recursively. get_internal_static_libraries_recurse() could be called on CustomTarget objects which do not implement it, and even if we did not call that method, it would still fail when trying to call extract_all_objects() on it. Fixes: #12006
2023-08-07interpreter: stop setting member out of initializer that isn't even usedDylan Baker1-1/+0
2023-08-07build: remove useless method callDylan Baker1-1/+0
This does nothing, so just delete it.
2023-08-07build: remove BuildTarget.need_installDylan Baker1-8/+6
This would be either the value `kwargs['install']`, or `False`. There isn't any case that `BuildTarget.need_install` handles that `BuildTarget.install` doesn't handle, if we just initialized it correctly. So, just set Target.install correctly in the super initializer, and do away with need_install.
2023-08-07tests: Assert that mips64 kernel is detected as mips64 with no compilersSimon McVittie1-0/+19
Reproduces: https://github.com/mesonbuild/meson/issues/12017 Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-07environment: Don't override mips64 to mips if no compilers are availableSimon McVittie1-2/+2
If we have a build- or host-architecture compiler, we can detect mips64 vs. mips by the fact that mips64 compilers define __mips64. However, machine_info_can_run() doesn't provide any compilers, because it is interested in the architecture of the underlying kernel. If we don't return mips64 when running on a mips64 kernel, machine_info_can_run() will wrongly say that we can't run mips64 binaries. If we're running a complete 32-bit mips user-space on a mips64 kernel, it's OK to return mips64 in the absence of any compilers, as a result of the previous commit "environment: Assume that mips64 can run 32-bit mips binaries". Resolves: https://github.com/mesonbuild/meson/issues/12017 Bug-Debian: https://bugs.debian.org/1041499 Fixes: 6def03c7 "detect_cpu: Fix mips32 detection on mips64" Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-07environment: Assume that mips64 can run 32-bit mips binariesSimon McVittie1-0/+1
The relationship between mips64 and mips is similar to the relationship between x86_64 and x86. Representing it here is necessary so that we will not require an exe_wrapper when cross-compiling for 32-bit mips on mips64, or when a complete 32-bit mips user-space runs on a 64-bit kernel without using linux32 to alter uname(2) to pretend to be 32-bit. Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-07tests: Pass a mock C compiler to detect_cpu(), detect_cpu_family()Simon McVittie1-4/+8
In some cases the desired result can be different if there are no compilers at all. The expectations here are based on there being at least one compiler, so reflect that by providing one; a later test enhancement can cover the case where there are no compilers provided. As a result of the mock any_compiler_has_define(), all that matters will be the distinction between an empty or non-empty dict: the compiler object itself is unused. Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-07treewide: internally avoid deprecated machine file uses of "pkgconfig"Eli Schwartz11-14/+14
We support this in a machine file: ``` [binaries] pkgconfig = 'pkg-config' pkg-config = 'pkg-config' ``` and you can use either one, because internally we look up both. If you only set *one* of them, this plays awkwardly with setting $PKG_CONFIG, since we don't know which one you set in the machine file and the *other* one will be initialized from the environment instead. In commit 22df45a31981874310a78dde0df59a6a7c5ebb29 we changed program lookup of config-tool style dependencies to use the regular tool names and only fall back on the strange internal names. This affected the pkg-config class too. The result is that instead of preferring `pkgconfig =` followed by $PKG_CONFIG followed by `pkg-config =`, we inverted the lookup order. This is a good idea anyway, because now it behaves consistently with `find_program('pkg-config')`. Unfortunately, we documented the wrong name in a bunch of places, and also used the wrong name in various testsuite bits, which meant that if you set $PKG_CONFIG and then ran the testsuite, it would fail. Correct these references, because they are buggy. One test case expected to find_program() a native copy for convenience of testing against natively installed glib. Force it to resolve a native copy.
2023-08-07Upgrade MSI builder from WiX3 to WiX 4.Jussi Pakkanen1-45/+53
2023-08-07packaging: fix regression that prevented pyinstaller from getting custom depsEli Schwartz1-0/+4
mesonbuild.dependencies.* is now lazy-imported and not automatically detected. Add them as hidden imports. Fixes #12036
2023-08-07modules/pkgconfig: Don't insert None into devenv listDylan Baker2-1/+5
When the pkgconfig module is imported, but not used, it will insert None on the end of the devenv list. This list is not expected to contain None, and causes Meson to crash. This can happen in complex build setups (reported from mesa), where pkgconfig is only used in some configurations Fixes: #12032
2023-08-06Revert "CI: add potential workaround for python crashes in MSYS2"Christoph Reiter1-3/+0
This reverts commit e945f35cd72402d0d204ff10870e2a95c59b6192. With MSYS2 udpating to Python 3.11, this should no longer be needed. See https://github.com/msys2/MINGW-packages/issues/17415#issuecomment-1606085553 (cherry picked from commit 3752041c8d56c7667bc0fe644fda6c2834d6aaf8)
2023-08-06tests: skip a test that fails with new Python 3.11 from MSYS2Christoph Reiter1-0/+3
For some (atm unknown) reason mingw Python fails to load some modules when MSYS2 is removed from PATH, like in this test. Skip for now to make the test suite pass again. Once https://github.com/msys2-contrib/cpython-mingw/issues/141 is fixed this can be reverted. (cherry picked from commit 68dce66bf9a2bcb3d23c291beb2354225a74b954)
2023-08-06CI image builder: log commands a bitEli Schwartz1-1/+1
(cherry picked from commit 1d84989078026acbfd256f294f5359361d2f1b0d)
2023-08-06fix lint errors revealed by pycodestyle 2.11Eli Schwartz2-5/+5
When performing isinstance checks, an identity comparison is automatically done, but we don't use isinstance here because we need strict identity equality *without allowing subtypes*. Comparing type() == type() is a value comparison, but could produce effectively the same results as an identity comparison, usually, despite being semantically off. pycodestyle learned to detect this and warn you to do strict identity comparison. (cherry picked from commit d4615369ffbfc0f9a769ca1fd3566056cfa5ef81)
2023-08-06do better sanity check for vs_module_defs inputEli Schwartz1-1/+1
We allow custom_target() but check for it based on hasattr, ever since the initial implementation way back in the day, in commit 66a6ea984bc43d9ac144e22cf411c16e9f911bb3. This is a bit broken because various objects might support that but still aren't supposed to work. We can actually just use isintance checks like we do immediately above, which are more accurate and avoid crashes on things that aren't even targets at all, like run_target(). Although custom_target indexes are actually targets those didn't work either. Fixes #9648 (cherry picked from commit 404312c6ddc44b1e8f09a95a5c889184a25a384b)
2023-08-06CI: change ubuntu cross exe_wrapper to un-suffixed wineEli Schwartz1-1/+1
wine64 used to be the way to run a 64-bit wineserver. It was removed due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029536 despite that bug report being about a bug in an unrelated symlink -- apparently there's no recommended solution to starting a specific bitness of wine on demand. The automagic `wine` I believe creates a wineprefix with both, which is... probably not exactly efficient here? But whatever, not worth fighting it. Just get this more or less working again. (cherry picked from commit d048bbfbe7c3d287e9b1e61c39313862caf9fd52)
2023-08-06mtest: avoid meddling with stdout by defaultEli Schwartz1-1/+1
The original point of specifying Optional was to default to None... oops. The practical effect of this change is that the testsuite no longer repeatedly logs "No tests defined." in between more meaningful output. (cherry picked from commit 6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d)
2023-08-06tests: bump the C++ std for protobuf testsEli Schwartz1-1/+1
Based on https://opensource.google/documentation/policies/cplusplus-support Google no longer supports C++11, and protobuf spawns an `#error` if you don't have at least 14. So, perform our currently scheduled automatic bump. (cherry picked from commit a8b9bd2b74030863d61761483dbc3f6db8803c68)
2023-08-06tests: mark gpgme test skippable on Ubuntu rollingEli Schwartz1-1/+1
It has been rebuilt to no longer provide the deprecated gpgme-config tool. (cherry picked from commit 0a40e591d3b9665a63ef243f78450a6e97304669)
2023-08-06ci: Skip test_generate_gir_with_address_sanitizerXavier Claessens1-0/+9
It fails with glib >= 2.76 and gobject-introspection <= 1.76.1. Fixes: #11754 (cherry picked from commit 9d88d0d5cc92de04cb33cac4ddaedff622b65c40)
2023-07-17Bump version number for release.1.2.0Jussi Pakkanen1-1/+1
2023-07-16Fix build using GDC 13Jussi Pakkanen2-32/+47
Do not run tests that use integers in versions with compiler that do not support them. Old versions of GDC supported plain integers in version and debug strings but they are deprecated and GDC 13 hard errors on them.
2023-07-15rust: disable overflow-checks by defaultDylan Baker5-7/+43
These result in very large binaries when linked, and are not generally useful. A user can turn them back on by passing `-C overflow-checks=yes` manually via `-Drust_args` or the `RUSTFLAGS` environment variable fixes: #11785
2023-07-14compiler.compiles/links: fix failure when compiling a built File objectEli Schwartz2-7/+20
In order to pass a File object down into the compiler impl and compile it, we cannot pass a string with the filename, and we cannot either pass the File object as-is, since it relies on being given Environment attributes to calculate the relative location. So we build a fresh File object as an absolute path. But the code to do this was totally broken. Instead of using the File method to get an absolute path, we used one that expected to create builddir-relative paths... and then gave it the absolute source dir as the "relative path portion" prefix. This worked by accident as long as it wasn't a built File, but if it was a built file then we intentionally didn't include that prefix -- which was wrong anyway, since we need the build directory! Use the correct method to get an absolute path in all cases, and emit a warning if it was a built file. This never worked. Sometimes it crashed, sometimes it silently returned false. Fixes #11983
2023-07-13cmake: fix directory separators in generated packageConfig.cmake filesMatthieu Rogez4-1/+27
On windows, meson would mix posix and windows dir separators in the computed PACKAGE_RELATIVE_PATH. Here we force posix directory separator even on Windows. This matches the CMake behavior and fixes interpretation of the resulting path. Fixes #6955 Fixes #9702
2023-07-13macos: map arm64e to aarch64, map "whole" architecture stringsAndres Freund2-6/+19
Some macos libraries use arm64e instead of arm64 as architecture. Due to the string replace approach taken so far, we'd end up with aarch64e as architecture, which the rest of meson doesn't know. Move architecture mapping to map whole architecture names and add arm64e -> aarch64 mapping. This change doesn't touch the case for armv7[s], where we add arm, rather than replace armv7[s], but it's certainly not in line with the other mappings. Fixes: #9493 Co-authored-by: Tristan Partin <tristan@partin.io>
2023-07-13Fix display of generatorCharles Brunet2-2/+8
2023-07-13Silence some encoding warningsTristan Partin7-20/+20
By specifiying explicit encodings, we can silence warnings like: /__w/meson/meson/test cases/common/100 postconf with args/postconf.py:15: EncodingWarning: 'encoding' argument not specified with open(input_file) as f: in CI.
2023-07-13mtest: fix unencodable XML charsNazir Bilal Yavuz4-2/+121
Replace unencodable XML chars with their printable representation, so that, xmllint can parse test outputs without error. Closes #9894 Co-authored-by: Tristan Partin <tristan@partin.io>
2023-07-13Add import instructions for filesystem moduleMiroPalmu1-0/+8
2023-07-12compilers: detect cython version on stdout for newer cython versionsEli Schwartz1-3/+9
Cython historically, when asked to print the version and exit successfully, would do so on stderr, which is weird and inconsistent. Recently, it fixed this UX bug by printing on stdout instead: https://github.com/cython/cython/issues/5504 This then broke meson detection because we assumed it was on stderr due to historically being there: https://github.com/scipy/scipy/issues/18865 Cython is right, and shouldn't have to revert this reasonable change for backwards compatibility. Instead, check both.
2023-07-12string: Add missing FeatureNew tags to methodsMarco Trevisan (TreviƱo)1-0/+4
There are some new(er) methods that have not version reference, so add the missing ones in order to be properly notified when targetting older meson versions. Co-authored-by: Tristan Partin <tristan@partin.io>
2023-07-11compilers/cpp: check libc++ vs libstdc++ harderDylan Baker1-14/+11
Instead of hardcoding any values, hardcode what we think the most likely implementation is, and check that first. It was pointed out that while for example, Apple only provides libc++ and supports that for xcode, a user could install a custom environment (such as homebrew) which uses it's own copy of libstdc++, and we need to account for that. This means that a library search will be done, but only once and the result will be cached, on all systems.
2023-07-11Bump version number for rc3.1.2.0rc3Jussi Pakkanen1-1/+1
2023-07-10mtest: avoid stdout when printing warnings about the lack of things to printEli Schwartz1-4/+4
Since people may parse the output of `--list` as a list of tests, putting logging info in stderr is nicer.
2023-07-10mtest: redirect automatic reconfiguring to stderr when listing testsEli Schwartz1-1/+2
It is not the primary purpose of mtest, and it ends up mingled with a list of actual tests, which isn't nice if you're trying to capture and parse this.
2023-07-10mtest: try a bit harder to avoid weird non-parseable output at startupEli Schwartz1-3/+5
In commit 628effb3698e85e403351d2705d576cf4ee8c50c we started verifying the build.ninja file was up to date before even `--list`ing tests, because we could end up with incorrect information. This meant that ninja always runs at startup, and typically returns "no work to do", which ended up listed as "one of" the tests. Instead of unconditionally running ninja attached to the console, first check it in dry-run mode with stdout intercepted, to see if ninja considers itself up to date. If it is, continue. Only if an actual refresh is needed, do we run it while attached to the console. In the garden path, this avoids useless information. In cases where we'd already print a full meson reconfigure log, we continue to do so.
2023-07-10windows: Fix detection of the llvm-rc resource compilerMartin Storsjƶ1-0/+1
By default, clang-cl based environments use rc.exe as resource compiler. However, when cross compiling with clang-cl, one might want to use llvm-rc instead. Try to detect llvm-rc based on the output from "$CMD /?". This requires a very recent llvm-rc; previosly, the output of "/?" with llvm-rc was very generic and didn't explicitly indicate that it actually was llvm-rc. This was changed in https://github.com/llvm/llvm-project/commit/bab6902eba55026a829d232629f99ac276936ef0 which will be included in the upcoming LLVM 17.0.0 release. Contrary to the other regexes, don't include the preceding parts of the line in the log printout, as it includes an unhelpful "OVERVIEW:" prefix.
2023-07-10build: dependencies should come after link_with on link commandXavier Claessens3-4/+27
This fixes regression caused by https://github.com/mesonbuild/meson/commit/3162b901cab46d66a30c66a4406195523714ecdc that changes the order in which libraries are put on the link command. In addition, that commit was wrong because libraries from dependencies were processed before process_compiler() is called, which that commit wanted to avoid.
2023-07-10build: Fix linking multiple libraries and some are promotedXavier Claessens3-1/+12
When a link() is promoted to link_whole() we still have to handle the rest of the list. Fixes: #11956
2023-07-10Fix Xcode 15 beta linker detection. Closes #11958.Jussi Pakkanen1-1/+1
2023-07-10parse meson.build for subproject_dir in msubprojectsRafael Silva1-3/+10
we parse project from source meson.build with IntrospectionInterpreter
2023-07-10rename msubprojects src_dir to source_dirRafael Silva1-7/+6
source_dir seems to be the most common name across the code base with 400+ hits
2023-07-10wrap: detect network timeouts 20x fasterEli Schwartz1-1/+1
When downloading wrap content, we need to know at some point if the server is going to respond with "hello, yes, I'm here and I have data for you". The alternative is to sometimes infinitely hang. In commit 8f7781f1d6bf36c064b39e7d0794c686f1b78665 we added such a timeout, but using an extremely generously high number -- ten minutes. We don't need to wait this long just to find out if the other end exists, so decrease that time to 30 seconds, whch is still ludicrously generous but not quite as much so.
2023-07-10backends: Always take options from targetXavier Claessens4-30/+32
This fixes cases where override_options is not being used. Fixes: #11923
2023-07-10Revert "backends: Cache creation of install data"Eli Schwartz3-1/+2
This reverts commit 904b47085fdd985175b4b2c3224f65b9d33f04d7. This is not a real bottleneck, and we want to create it thrice -- once before the backend is generated. The final install data needs to be created fresh. Update unittest to demonstrate the issue. Fixes https://bugs.gentoo.org/910050