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
2 answers

How to forward dependencies in Meson?

Say I have the following dependency chain, dependency A depends on B which depends on C. All 3 are specified as dep objects. The headers of B include headers in C. I am finding that when I compile A I must list C as an explicit dependency even if B…
Makogan
  • 8,208
  • 7
  • 44
  • 112
1
vote
1 answer

Get Msys2 package for meson project in Windows

Let me assume that I wanna use curl package in msys2 for my C++ project. So I add msys2 path to %Path% in system environment. and I write my meson.build file like below: project('tutorial', 'cpp') my_dependency =…
WOOSEOK CHOI
  • 165
  • 9
1
vote
1 answer

How to access the files in the res folder in the imgui conan package?

I am using conan to handle dependencies, for those of you familiar with imgui, it provides a series of backends you can include. When you look at the conan package these are found in the res folder. I need to tell meson to include files in that…
Makogan
  • 8,208
  • 7
  • 44
  • 112
1
vote
1 answer

TensorFlow static C API library - how to link with 10 sub-dependencies?

I am trying to link with static C API version of the TensorFlow library. I built the static library using the following commands: // get the sources git clone https://github.com/tensorflow/tensorflow.git tensorflow_src // create a build…
Danijel
  • 8,198
  • 18
  • 69
  • 133
1
vote
0 answers

Undefined symbols "_sws_getContext" for architecture aarm64

I'm playing around with scrcpy source code (https://github.com/Genymobile/scrcpy). I run my build of scrcpy with my Android phone and see that the AVFrame in this code (from /app/src/screen.c): static bool sc_screen_update_frame(struct sc_screen…
1
vote
2 answers

Cairo_quartz_font giving Undefined symbols for architecture x86_64 error

I am trying to make a mac build of this. It is using the meson build system for Cairo. Whenever I $ make -j3 I get Undefined symbols for architecture x86_64: followed by this repeated for functions in the file. "_CFDataGetBytes", referenced from: …
Cactus
  • 87
  • 10
1
vote
1 answer

Meson: Change the C compiler based on the target

I am building an operating system that supports both 32 and 64 bit, using the Meson build system. I have just started adding support for 64 bit, but I came accross a problem. When I use the 64 bit C compiler, both the kernel and stage2 gets compiled…
Wonixer A
  • 116
  • 12
1
vote
1 answer

How to specify a path to Meson custom_target() command?

I did a simple custom target in Meson: my_build = custom_target('my_build', command: ['../my_script.sh', '-arg1'], build_always_stale: true, output: 'fake') This works OK..., but when I try to use this as subproject from other Meson projects, I…
Danijel
  • 8,198
  • 18
  • 69
  • 133
1
vote
1 answer

Getting error while cross-compiling a wxWidgets app

I am getting an error while trying to cross-compile my application on ArchLinux for Windows using mingw. I am using meson for the build system and I wrote a .ini file according to the documentation here. Here is the .ini file, [constants] arch =…
apoorv569
  • 143
  • 1
  • 12
1
vote
0 answers

Meson Build : Unable to link shared_library with executable using meson build

I am finding it very difficult to link library to my code executable using meson build. I have explored through the internet and could not find solution to my problem. I have the following project structure $ find…
TheLazy
  • 253
  • 1
  • 15
1
vote
1 answer

How to update git subproject that is configured to head revision?

In Meson, subprojects can be defined using wrap-files. The manual shows an example of a wrap-git file: [wrap-git] url = https://github.com/libfoobar/libfoobar.git revision = head I've set-up a local test project that sets up a subproject like the…
Maarten Bamelis
  • 2,243
  • 19
  • 32
1
vote
1 answer

meson cannot find a conan package, despite setting pkg_config path?

I am trying to build on windows using meson and conan. I installed packages for VS 2017 using conan and generated the PC files in the build directory. Inside my conan.py I have the snippet: meson = Meson(self) …
Makogan
  • 8,208
  • 7
  • 44
  • 112
1
vote
1 answer

meson syntax parser problem with ASTERISK(*) in `command` of `custom_target` - Linux

I'm having a problem running ar command on Linux with ASTERISK *.o in command of custom_target. When running this command: target_build_cmd = [ 'ar', '-qcs', '/home/bassem/meson/lib.a', meson.project_build_root() + '/tmp/*.o', …
Bassem Ramzy
  • 326
  • 3
  • 10
1
vote
1 answer

problem running bash script in meson.build

I have an heder file vproj.h #ifndef verVERSION #define verVERSION "B.32.0" #endif and a bash script "getVer "to estract the version, so from cmd line /home/../getVer verVERSION vproj.h B.32.0 now I want to embed it in my meson.build with…
Mariano
  • 240
  • 3
  • 15
1
vote
0 answers

/usr/bin/ld: unrecognized option '-pthread' when compiling with meson

I am building a code with meson using GCC 7.5.0 and CUDA 11.4 and getting the error: /usr/bin/ld: unrecognized option '-pthread' in the building step. ld version is 2.34. Here is the output: [5/6] Linking target SU2_CFD/src/SU2_CFD FAILED:…
nahmad
  • 41
  • 2