The x86 test files might not work on x86_64 Linux in certain cases,
for example if the kernel is configured without support for x86
executables (which also gets rid of the old system call interface).
Bug: https://bugs.gentoo.org/936911
It is genuinely horribly buggy so we don't want the testsuite to
succeed. We make a special exception for the CI runner since it is a
known breakage but people packaging meson should see the issue.
If a user imports a module and invokes a method on it,
a raw Python exception is raised to the user. This commit
adds a check to ensure that in this case an appropriate
exception is raised instead.
A test has been added to ensure that this exception is
in fact raised on offending code.
Fixes: #11393, #5134
This commit harmonizes the handling of `d_import_dirs` and
`include_directories`. The treatment of `d_import_dirs` was also
different depending on the context: in `declare_dependency` it was
treated like the `include_directories`, but in `build_target` et al,
it had special treatment. With this commit, they are all treated
by the same function. The documentation has been updated to
reflect this.
Fixes#12742
The zlib symbols may not be of type 'T' but rather e.g. 'D' -- instead,
tell nm to emit the POSIX format and also to only emit defined symbols,
not undefined ones. Then we just check if the symbol is listed at all,
regardless of type.
We already depend on -U elsewhere (e.g symbolextractor). There's no real
replacement for it, sadly. It's also buggy in some versions of nm, so we
check both its long and short options.
Bug: https://bugs.gentoo.org/938259
If kwargs_force_multiline is enabled, an ArgumentNode in a kwarg value can
already be marked multiline by the time we notice that the line needs to
be broken for length. Ensure we still break the line in this case.
Fixes: #13512
Although it's not especially common, there are certainly cases where it's
useful to pass the path to an external program to a test program.
Fixes: https://github.com/mesonbuild/meson/issues/3552
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
The following is valid meson:
```meson
a = '''This string can't be simplified'''
```
which cannot be simplified because of the `'` in it, as
```meson
a = 'This string can't be simplified'
```
Is invalid.
Potentially we could convert that with escapes, but it seems reasonable
to me to leave this, since it may be desirable to not have lots of
escapes in a string. `'''I can't believe it's her's!'''` is much more
readable than `'I can\'t believe it\'s her\'s!'`, for example.
Closes: #13564
Fixes#13508
- Fix indentation of comments in arrays
- Fix indentation of comments in dicts
- Fix indentation of comments in if clauses
- Fix indentation of comments in foreach clauses
Which happens when a .editorconfig is in a subdirectory, not the root.
In this case we need Set the fallback value to `False`, which is what
editorconfig expects.
Closes: #13568
The pkgconfig file in Debian and Ubuntu is definitely broken and we've
reported it upstream, but we don't really want to keep our image building
failing while we wait for that to be fixed.
Skip the auto/pkgconfig test if both: a) we're on Ubuntu, and b) the .pc
checksum matches a known-bad copy. I'm also CC'd to the bug to catch if it
gets fixed.
Bug: https://bugs.debian.org/1078026
Test '230 external project' uses make, but is too dumb to use the
platform conventions for shared library names in installed files
expected by shared_lib, so special case that.
By default, we build with debug info which can be useful for
investigating why a test segfaults instead of either passing or failing.
The nasm language hooks this up, but using nasm as a generator program
does not.
Bug: https://bugs.gentoo.org/936911
For other reasons, Meson transforms "-Wno-x" into "-Wx -Wno-x" for GCC,
but this breaks with "-Wno-attributes=x" with:
```
cc1plus: error: arguments ignored for '-Wattributes='; use '-Wno-attributes=' instead
```
Suppress that workaround for -Wno-attributes=.
Closes: https://github.com/mesonbuild/meson/issues/13022
aee941559 ("rust: recursively pull proc-macro dependencies as well")
had to be reverted (in a66cb97e8) because it broke Mesa cross
compilation. This happened because a C shared library was linked with
a Rust C-ABI static library, which caused it to inherit the proc macro
dependency the Rust static library was linked with.
The right way to handle this is for only Rust targets to inherit proc
macro dependencies from static libraries they link with. A Rust
executable, library, or whatever will need the proc macros its Rust
dependencies use, as illustrated in the test case that I've
reintroduced here.
I've verified that Mesa still cross compiles correctly with this
change. The same failure was also identified by the "rust/21
transitive dependencies" test case, but only when cross compiling, so
it wasn't caught by CI.
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
We have two ways of marking a test as skipped:
- raise MESON_SKIP_TEST
- declare that the tools it needs in test.json are unavailable
Doing the former requires performing the configure stage including e.g.
language setup.
In several cases we weren't even getting this far anyway since we used
both mechanisms (the cmake category has a category-wide skip for this,
in fact). In some case, we were missing test.json declaring it skippable;
add this.
This tests that CMake link flags marked as PRIVATE are not propagated
through the generated Meson dependency. -Wl,--version-script is used as
the "poison" here, the build ultimately fails if it appears in the
shared_library() link command.
Fedora, at the very least, now packages zlib-ng as zlib. This means the
version reported for the dependency is now X.Y.Z.zlib-ng by pkgconfig
whereas the test expected X.Y.Z. Make the version check work for both
regular zlib and zlib-ng.
Revert "interpreter: when overriding a dependency make its name match"
This reverts commit b1340e9bb1.
Revert "dependency: define equality and hash operators for Dependency"
This reverts commit 6d713e40f8.
This caused some projects to fail to build, such as libplacebo and
libepoxy. Taking libplacebo as the example, the produced build.ninja
does not include libvulkan.so as a linker input for
src/libplacebo.so.338.
We are probably getting dependency hashing wrong somewhere. Unsure where
exactly and unsure how to create a test case. We are also deep into rc2.
Revert it for now and try to re-land these changes for 1.6.
Bug: https://bugs.gentoo.org/935443Fixes: #13352
This reverts commit 9f02d0a3e5.
It turns out that this does introduce a behavioral change in existing
users of ConfigurationData, which it wasn't supposed to (it was supposed
to preserve behavior there, and add a new *warning* for
EnvironmentVariables).
This breaks projects such as pulseaudio, libvirt, and probably more.
Roll back the change and try again after 1.5.0 is released.
Fixes: #13372
Fixes regression from commit 78e9009ff9.
The above commit relied on rpath_dirs_to_remove being present and
correctly filled, which was never the case for the AppleDynamicLinker.
The result was that all the build-dir-only RPATHs were being carried
over to the installed files.
This commit implements returning the list of RPATHs to remove in
AppleDynamicLinker, doing pretty much the same thing as what's in the
GnuLikeDynamicLinkerMixin. Thanks to that, depfixer now correctly
removes build-time Meson-created RPATHs, as it used to before 1.4.1.
* Ensure private directory exists for custom targets
Some custom target commands will expect the `@PRIVATE_DIR@` to already exist, such as with `make -C @PRIVATE_DIR@ ...`
* Prefer `exist_ok` over catching exception
* Explicitly look for 'OpenAL' with method: 'cmake'
This test was added for testing cmake depenencies,
so no other method must be accepted here, and
the spelling must match FindOpenAL.cmake.
* Resolve frameworks in IMPORTED_LOCATION
The IMPORTED_LOCATION property of CMake targets may contain macOS
framework paths. These must be processed into flags. By putting the
values in the list of targets, they will be processed as if they
appeared in INTERFACE_LINK_LIBRARIES.