Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Fixes: #12025
|
|
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
|
|
|
|
This does nothing, so just delete it.
|
|
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.
|
|
Reproduces: https://github.com/mesonbuild/meson/issues/12017
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
|
|
mesonbuild.dependencies.* is now lazy-imported and not automatically
detected. Add them as hidden imports.
Fixes #12036
|
|
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
|
|
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)
|
|
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)
|
|
(cherry picked from commit 1d84989078026acbfd256f294f5359361d2f1b0d)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
It has been rebuilt to no longer provide the deprecated gpgme-config
tool.
(cherry picked from commit 0a40e591d3b9665a63ef243f78450a6e97304669)
|
|
It fails with glib >= 2.76 and gobject-introspection <= 1.76.1.
Fixes: #11754
(cherry picked from commit 9d88d0d5cc92de04cb33cac4ddaedff622b65c40)
|
|
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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>
|
|
|
|
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.
|
|
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>
|
|
|
|
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.
|
|
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>
|
|
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.
|
|
|
|
Since people may parse the output of `--list` as a list of tests,
putting logging info in stderr is nicer.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
When a link() is promoted to link_whole() we still have to handle the
rest of the list.
Fixes: #11956
|
|
|
|
we parse project from source meson.build with IntrospectionInterpreter
|
|
source_dir seems to be the most common name across the code base with 400+ hits
|
|
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.
|
|
This fixes cases where override_options is not being used.
Fixes: #11923
|
|
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
|