Questions tagged [meson-build]

Meson is a build configuration system used to build C/C++, Java, Rust, Objective-C/C++, and Fortran projects. It uses a DSL to describe project targets. This tag is for questions about the meson build system and DSL syntax or usage.

Meson is a build configuration system used to build C/C++, Java, Rust, Objective-C/C++, and Fortran.

It is conceptually similar to MPC or CMake, and draws strengths from them as well as SCons, Autoconf.

Project targets are described using a non-Turing complete DSL. Despite being implemented in Python, no direct calls into Python are permitted, nor is any Python syntax directly supported. Strictly speaking, the Meson processor could be reimplemented in any language and would be able to handle the DSL without assistance from an embedded Python interpreter.

For more information about Meson, see their home page. To contribute, see their source code repository on github.com.

469 questions
3
votes
0 answers

Can you execute unit tests as a post build event in meson?

It appears to be trivial to define unit test executables in meson and to execute them with ninja test. Is it possible to execute unit tests as a post build event in solutions generated with meson build?
oz10
  • 153,307
  • 27
  • 93
  • 128
2
votes
2 answers

How to correctly write meson syntax?

I'm trying to compile cairo libraries from sources partially using meson The part of the script that is crashing in the meson.build script look like that: cairo_feature_sources = { 'cairo-png': [ 'cairo-png.c', ], ... ... ... …
IceMarek
  • 21
  • 2
2
votes
1 answer

"Relocation cannot be used against local symbol" only for one platform (x86)

Problem I am cross-compiling gstreamer using Meson, and it works for 3 different platforms (android-arm, android-arm64, android-x86_64) but fails for android-x86 with errors like: ld: error: relocation R_386_32 cannot be used against local symbol;…
JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
2
votes
0 answers

Error in building libcamera library on Raspberry Pi Bullseye

Very new to Raspberry Pi & Linux programming, have only been tinkering with it for the past month, so assume I know nothing. Context: I am using a custom 'lite' image from the Cluster Hat website on a pizero intended to be slotted into the HAT. The…
2
votes
1 answer

Compile a subset of files with debug flags in meson

The setup I am running is for a microcontroller with particular memory constraints, which means that I cannot compile an entire image with no/low optimization - it will simply be too large. But performing on-target single-step debugging is a vital…
2
votes
1 answer

How Change GJS App output filename with meson

i have made a graphic software with JavaScript and GJS with GNOME builder. The problem is that whenever I want to run the software, I have to enter the application ID in the terminal (e.g. org.example.app), which is inconvenient. I changed the…
Behzad
  • 23
  • 3
2
votes
0 answers

How to use wrap of DearImGui with Meson

I'm trying to build a c++ project with Imgui with the SDL2 backend, and maybe Vulkan. But it errors when trying to build: 'PFN_D3D12_SERIALIZE_ROOT_SIGNATURE' was not declared in this scope Setup MyProject |-- bin |-- subprojects |-- meson.build #…
Erithax
  • 21
  • 3
2
votes
1 answer

How to set Fortran compiler path in Meson?

I know we can use the FC flag to set the preferred Fortran Compiler's name. But is there any way I can specify the path to a compiler and Meson will use that particular compiler?
2
votes
1 answer

How to debug a meson.build file?

I am learning to code build "scripts" of Meson. I have been wrote a lot of mistakes in my meson.build file, and the only method to check/debug my file is launch $ meson compile -C build and get the errors. It is something like as debug (not debug my…
tres.14159
  • 850
  • 1
  • 16
  • 26
2
votes
1 answer

DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section

Here is cross-file example I use for cross compiling with meson build system. It is passed to meson with --cross-file option. [host_machine] system = 'linux' cpu_family = 'arm' cpu = '' endian = 'little' [binaries] c =…
anton_rh
  • 8,226
  • 7
  • 45
  • 73
2
votes
0 answers

meson and -include file search path invocation

Hi I need do pass to gcc an header file with the following path invocation -I -include
e.g. -I/usr/include/dpdk -include rte_config.h in meson build i decide to pass it as c_args but than in the ninja build I…
Mariano
  • 240
  • 3
  • 15
2
votes
1 answer

How do I build sdl2 with meson?

Using this meson file, project('mytest', 'c') cc = meson.get_compiler('c') deps = [] deps += dependency('sdl2', required: true, static: true, method: 'pkg-config') executable('demo', 'src/main.c', dependencies :…
gberth
  • 467
  • 5
  • 13
2
votes
1 answer

Cannot create an array of SinkInputInfo

I cannot make an array of SinkInputInfo objects. I've posted this to the appropriate repo but got no response. Minimal reproduction: using PulseAudio; public void main () { SinkInputInfo[] sink_inputs; } Outputs /tmp/test.vala.PFQW80.c: In…
ChildishGiant
  • 320
  • 1
  • 12
2
votes
0 answers

build meson project using cmake

Is there any way to have a meson project as a dependency of a CMake project? I'm specifically interested in CLion's autocomplete, definition jumping etc. working properly.
Edward
  • 468
  • 4
  • 18
2
votes
1 answer

Meson: connect two strings without '/'

I want to concatenate two strings without a separator between them (so no new destination). theme_dir_dark = join_paths(get_option('datadir'), 'themes', meson.project_name(), '-dark') meson.project_name() is Pop and I want theme_dir_dark to end…
Mickey
  • 57
  • 3