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
1
vote
1 answer

How can I use meson in a Pitchfork Layout project with merged test placement?

I have a bit of a challenge for the meson experts out there. My newest C++ project (a library) is structured according to The Pitchfork Layout. As is allowed by that convention, I have decided to use merged header and merged test placement. This…
Maarten Bamelis
  • 2,243
  • 19
  • 32
1
vote
0 answers

How to exclude test directories from coverage with meson?

I would like to know if there is a way to specify that we want to exclude all the directories */tests/* from the paths explored for coverage in meson.build ? Performing coverage analysis over the test files themselves is quite confusing because they…
perror
  • 7,071
  • 16
  • 58
  • 85
1
vote
1 answer

What compiler will be chosen by meson.get_compiler('c') on a system with multiple C compilers?

Given a meson-based project where meson.build contains the following line: cc = meson.get_compiler('c') How does meson.get_compiler('c') pick a compiler on a system with multiple C compilers? At the time of writing this question, the reference…
duggulous
  • 2,427
  • 3
  • 23
  • 40
1
vote
2 answers

Got an error while building Wayland: ERROR: Program 'dot' not found

I am following instructions in wayland's gitlab website to build it on Ubuntu 20.04. But I got an error at the "meson build" step: Program dot found: NO doc/meson.build:1:0: ERROR: Program 'dot' not found I have tried installing graphviz using…
zzzhhh
  • 291
  • 3
  • 10
1
vote
1 answer

dependency and option in meson project

I have a project with a similar folder trees: ├── meson.build (1) ├── meson_options.txt ├── README.md └── src └── mysub ├── meson.build (2) └── mesonTest.c the meson.options.txt contains option('avx_opt', type : 'combo', choices…
Mariano
  • 240
  • 3
  • 15
1
vote
1 answer

C language coverage report in meson

I am trying to get a coverage report in meson. According to the documentation, it should be this simple: First, initialize the build directory with this command. $ meson -Db_coverage=true Then issue the following commands. $ meson…
1
vote
1 answer

What should I do when I encounter unkown compiler error using "meson setup builddir"?

I am trying to install gst-rtsp-server library by running meson.build. To do so, I installed meson from pip3, and tried to build the library using meson setup builddir But then the error message that I received is, **meson.build:1:0: ERROR: Unknown…
Pietros
  • 13
  • 1
  • 4
1
vote
0 answers

missing crate error even though present in Cargo.toml

I have a basic gtk-rs project with which I use meson. I have included gtk4 crate in the Cargo.toml file. When I run with cargo, it compiles but outputs "segmentation fault" error (I have searched and I still don't know what that is). However, when I…
1
vote
1 answer

Why is meson interpreting my ccflags with the single quotes?

I'm editing a meson build file. a line that currently exists the the file is working perfectly. if cc.has_argument('-Wno-format-truncation') …
Brydon Gibson
  • 1,179
  • 3
  • 11
  • 22
1
vote
2 answers

How can i setup meson and ninja on Ubuntu-Linux to produce the expected .a file by use of MakeFile?

Some years ago on Ubuntu 16.0.4 I've used this library: git clone https://github.com/Beckhoff/ADS and using only the make command I got build, compile and finally on the main directory I found a file called AdsLib-Linux.a and maybe nothing more than…
1
vote
1 answer

meson finds python3 binary, fails to find python3 dependency

I'm trying to build a certain repository using meson on Cygwin. This is what happens: $ meson build_dir The Meson build system Version: 0.58.2 Source dir: /home/joeuser/src/meld-3.21.0 Build dir: /home/joeuser/src/meld-3.21.0/build_dir Build type:…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

Best practice of using pkg-config in meson build system

In Makefile, I can write something like below to get the dependencies libs. LIBS:= $(shell pkg-config --libs $(PKGS)) But in meson.build, I don't know how to write simply like this. I can use run_command to get libs like below, r =…
alen
  • 111
  • 1
  • 3
  • 14
1
vote
1 answer

"ERROR: UNKNOWN VARIABLE INT64_T_TYPEDEF" MESON BUILD:GTK+3, GTK+4.4.0, GOOBJECT INTROSPECTION BUILD FAILURE

I am trying to build GTK 4.4 and GOObject Introspection with the meson build system. Every single attempt at a meson build produces the same error...ERROR: Unknown variable "int64_t_typedef". The programs I have tried are GTK 4.4, GOObject…
SPLINTER1369
  • 11
  • 1
  • 5
1
vote
2 answers

Meson: print buildtarget filename from executable()

I'd like to print filename from buildtarget created by executable(). Looking into class Executable I tried ping.name: ping = executable('ping', [ 'ping.c', 'ping_common.c', 'ping6_common.c', 'node_info.c', …
pevik
  • 4,523
  • 3
  • 33
  • 44
1
vote
0 answers

how build and install "mlibc" with and for a gcc cross-compiler?

I wanna create a gcc cross-compiler. I work on a WSL2 ubuntu 20.04 distrib and the target will be x86_64-elf ( for a bare metal project ). For this learning project, I need to build a C libray with headers and startup files and I don't want use…
ExecAssa
  • 177
  • 11