535 questions
1
vote
0
answers
24
views
How can I introspect generated sources in meson?
I'm attempting to use meson introspect --targets inside of a large Python project which is built using Meson.
Here is the command I am using.
meson introspect --targets -i build/ > targets.json
...
3
votes
1
answer
144
views
Build numpy 2.3+ without accelerated libraries
Related post: Compile numpy WITHOUT Intel MKL/BLAS/ATLAS/LAPACK
Recent versions of numpy use meson for build configuration, I can build numpy from source but failed to exclude BLAS/LAPACK/... deps.
...
0
votes
0
answers
25
views
Force static linking for nested subproject
Consider this project setup
project
└──subproject foo1
└──subproject foo2
└──subproject bar
All the subprojects are 3rd-party (managed through wrap) and all ...
1
vote
1
answer
106
views
"ERROR: No statements in code." except there are statements in meson.build
My project structure is a directory called sdltest, with a src directory inside of it, and inside of that test.c and meson.build. No I haven't done anything related to sdl yet, I am just testing meson,...
1
vote
0
answers
81
views
PKG_CONFIG_PATH being cleared halfway through "meson setup"
I'm attempting to build gstreamer from source. I've built all the dependencies from source, and exported the PKG_CONFIG_PATH so the pkg-config can find all of these dependencies.
I can echo my ...
1
vote
0
answers
175
views
cannot update glib2.0 with either apt or source code
I have seen this question, but the problem is a little bit different. I was compiling GTK4 app with the following cmake and got the error
cmake_minimum_required(VERSION 3.0)
project(TestGTK LANGUAGES ...
1
vote
1
answer
129
views
Pip exits when installing build dependencies for pygame-ce
I had pygame (not ce) on my Debian system and then updated it to pygame-ce using pip install —-upgrade pygame-ce and it worked fine, installing pygame-ce==2.5.2 . There were some more recent updates ...
4
votes
2
answers
280
views
compiling fortran file in python
The module f2py no longer has the compile command, and I can't get mesonbuild to import this fortran code as a module. I rarely use python and have already spent a few hours searching and ...
1
vote
1
answer
166
views
Compile Postgres 17 with Meson on Windows with own OpenSSL, how to set OpenSSL path?
I am trying to compile libpq 17.5 on Windows 11 linking against my own build openssl 3.5.0.
When running the meson setup command it only finds openssl 3.3.0 from Strawberry perl. I tried to put my own ...
0
votes
0
answers
87
views
What is the recommended way to use f90wrap with meson?
I am working on porting the build system of a Fortran library to Meson. We use f90wrap to provide Python interfaces to some of the functionalities of the library. I am currently looking into calling ...
0
votes
1
answer
63
views
How to find dependency with config-tool method in meson-build?
I need to configure geos dependency in a meson project. geos provide a geos-config program, but doesn't provide pkg-config file in rocky linux.
According to the documentation, meson dependency ...
1
vote
1
answer
190
views
error when trying to install gensim via pip on windows
I am trying to install the python package gensim. I installed scipy, smart_open and numpy, and ran pip install gensim.
the installation failed in the preparing metadata stage and a behemoth 954 lines ...
0
votes
0
answers
135
views
How to cross-compile glib 2.54.3 for aarch64 on Ubuntu 18.04?
I'm encountering issues trying to cross-compile glib 2.54.3 for the aarch64 architecture on Ubuntu 18.04.6. My development environment is as follows:
Operating System: Ubuntu 18.04.6 LTS
GCC Version: ...
0
votes
1
answer
108
views
Meson FileNotFoundError: [Errno 2] No such file or directory: 'mono'
I'm using meson build on Ubuntu to compile a small project. I have the following setup:
project('cuda_project', 'cuda',
default_options: [
'cpp_std=c++17',
'cuda_ccbindir=/usr/bin/g++-11',
...
0
votes
1
answer
86
views
Prevent ninja coverage-html from Excluding some files
I am relying on meson and ninja to analyze a fairly large FORTRAN codebase. I am stuck at the step where I use ninja coverage-html to get a line coverage analysis. I am using these commands:
meson ...
1
vote
1
answer
520
views
Meson ERROR: Compiler cc cannot compile programs
I'm trying to build a fortran project, that depends on other C/C++ and Fortran subprojects using meson and ninja. After installing everything necessary, gfortran, build-essential, meson and ninja, and ...
0
votes
1
answer
68
views
Can I make meson just run the tests that were updated
As the title says. Meson seem to be very good at only recompiling those files that has been changed and so on, but when it comes to running the tests it seem that it always run all the tests despite ...
1
vote
0
answers
327
views
Suppress subproject compile warnings
I am using meson build system in my C++ project where I have several dependencies like DPDK, flatbuffers and so on as subprojects.
While compiling my project, I get spammed with tons of warnings from ...
0
votes
1
answer
1k
views
Unable to install CrewAI - Get a VSwhere error
While installing CrewAI using Pip install CrewAI , I was asked to install Vswhere.exe, which I did by installing MSBuild Tools with C++ however I still get this error while installing numpy. Wonder ...
1
vote
2
answers
190
views
msys2 windows open in the background not at HWND_TOP
I'm happily using msys2 in combination with the pacman package manager to create a library. The library has a concept of windows, that is wrapped around HWND's and winuser.h's functions to create the ...
0
votes
0
answers
1k
views
Struggling with "pkg-config not found" errors using Meson when trying to use the SFML library (Windows)
I'm trying to run Meson with SFML as a dependency and I keep getting the message "Did not find pkg-config by name 'pkg-config'" and the error "Dependency lookup for openal with method '...
1
vote
1
answer
205
views
meson ignore PKG_CONFIG_PATH in parent shell and meson.build?
(meson 1.5.1)
I want meson to use pkgconfig file from a custom location.
Of course, set PKG_CONFIG_PATH and runn pkg-config in shell is fine.
meson-log.txt
Determining dependency 'xxx' with pkg-config ...
1
vote
0
answers
390
views
Meson can't find libm while cross-compiling
I've written a Meson build script to cross-compile a project.
Right now I have the full thing running but am having trouble finding libm "the proper way".
My toolchain is arm-none-eabi and ...
1
vote
0
answers
127
views
Meson build overriding linker option
I am using meson to build a C++ project. It is supposed to be cross-compiled to x86 since it is using x86 libraries internally.
I have provided the argument /MACHINE:x86 to the linker, but I can see ...
1
vote
1
answer
142
views
Why am I getting undefined reference errors when using GLib's G_DEFINE_INTERFACE in C?
I'm trying to follow the "How to define and implement interfaces" guide with a minimal codebase just for the purpose of learning GObject inheritance. So far, I've written a header and an ...
0
votes
1
answer
601
views
How to 'link-whole' external static library in meson?
I'm using GCC/Ubuntu.
I need to link my app against external (pre-installed) static library.
It needs to be wrapped with '-Wl,--whole-archive' ... '-Wl,--no-whole-archive'
My naive approach is:
lib = ...
2
votes
1
answer
526
views
Meson doesn't link “redundant” shared library
I wrote a library to override functions from libc in my binary, and I want to link it to the binary.
Both the library and the binary are defined in the same meson.build.
The library should appear ...
2
votes
1
answer
2k
views
How do I define a C/C++ preprocessor variable in Meson?
I want to conditionally define a variable that I then can use within C/C++ sources to conditionally compile some code, like this:
#ifdef MY_MESON_VARIABLE
// some code
#endif
How do I go about ...
2
votes
4
answers
1k
views
How to upgrade NumPy in Ubuntu?
My OS is Ubuntu 22.04.4 LTS. The "pip list" command tells that I have the NumPy 1.21.5. But I need a newer version of the NumPy.
I am trying to install the NumPy package whith next command:
...
0
votes
1
answer
2k
views
Python: Package installed with meson cannot be found by pip
I have been trying to solve an issue compiling a Python package for Windows, and part of that involves building contourpy in the UCRT64 environment on MSYS2. I have been able to successfully build the ...
1
vote
1
answer
47
views
How do I make my dynamic library available to my other projects?
I'm writing a TLS library in Rust, but I'm making it a C dynamic library. To test it out, I'm working on a simple HTTPS client in C. I have to dynamically link turtls (my TLS library) to my HTTPS ...
1
vote
2
answers
97
views
File not found when using g_resource_lookup_data()
I am attempting to access a file that has been compiled into a GResouce using gnome.compile_resources() in meson. I successfully get the generated source files and #include "shader-resources.h&...
0
votes
0
answers
126
views
Meson project stays dirty
I've got a meson.build project. The project works like a charm on linux and I'm generally very happy using it.
Unfortunately, I'm loosing this fortunate feeling once I start to try it on windows, ...
4
votes
1
answer
2k
views
Unable to install PyGObject in Pycharm "meson.build:51:15: ERROR: Python dependency not found"
I'm attempting to install the PyGObject library in pycharm following this guide
https://pygobject.gnome.org/getting_started.html attempting to do step 3 on the Ubuntu / Debian section:
pip3 install ...
0
votes
1
answer
112
views
How to specify meson dependency for library and header files on Windows
I am using MSYS2 UCRT environment to compile a test a C/C++ program and need to link with a third-party library installed on Windows.
installpath = '/c/Program\ Files\ \(x86\)/Foo/Tester'
libpath = ...
1
vote
1
answer
45
views
Is there a way to get the header files out of include_directories() function in meson?
Currently all my header files are included via the include_directories() method that which returns an inc type.
Is there a way in meson to extract the headers files from it?
Preferably into the file ...
1
vote
1
answer
1k
views
C++ Meson build: How to select another compiler
I am using Meson for building C++ project and need to set compiler priority to clang instead of default gcc when it avaible. How to do that in meson.build file? Is it possible without additional meson ...
0
votes
1
answer
146
views
if exists, run a custom target from another target in meson
I have two custom targets and a parent one:
child1_tgt = custom_target('child1-target', ...)
Sometimes child2_tgt won't be created:
# pseudo code:
if windows
child2_tgt = custom_target('child2-target'...
0
votes
1
answer
128
views
Read a variable from commandline in meson
In my meson.build:
project('coolproject', 'c', version : '1.0.0.0', default_options : ['warning_level=3'])
message('USE_CAIRO=' + get_option('USE_CAIRO'))
I'm trying to read USE_CAIRO like this:
...
0
votes
1
answer
472
views
How to silence warnings from 3rd party includefiles with Meson and GCC
It looks like meson is picking compiler flags from pkg-config and consequently setting include paths to dependencies using the -I flag. This leads to annoying warnings if you start turning on enough ...
1
vote
0
answers
129
views
undefined references using BoringSSL as subproject in a meson build with cmake
I'm encountering issues while trying to use BoringSSL as a dependency in my C++ project. I’m using Meson for my build system and Meson CMake Module to handle the BoringSSL dependency. Despite ...
0
votes
0
answers
444
views
meson windows dll setup
i have a meson project with a an engine [compiled as a shared_library] and a game [compiled as an executable]. the setup i want is the following:
the engine gets compiled into a .dll file which is ...
1
vote
1
answer
153
views
How to make meson find my windres binary?
I'm building freetype 2.13.2 (along other dependencies) using the conan package manager, in cross-compiling setting (using mingw32 on a linux host).
I get the following error message
../src/meson....
0
votes
1
answer
381
views
How to use meson as a cuda build system
Suppose I have a hello.cu source file:
#include <iostream>
int
main(int, char**) {
std::cout << "hello world" << std::endl;
return 0;
}
With the following meson....
0
votes
1
answer
1k
views
How to get build for wlroots to find runtime dependency wayland
I'm trying to build wlroots from source, and I get the following error when running meson:
meson setup build/
...
Run-time dependency wayland-server found: NO (tried pkgconfig and cmake)
Looking for a ...
1
vote
1
answer
705
views
Python 3.12 f2py linking against libraries not working properly
With Python 3.11 and the distutils backend I was able to easily compile one interface file and link to an archive with various other precompiled f90 files. Now with meson it seems like this is not ...
0
votes
0
answers
110
views
REAL80 size and checking its availability in Meson build system
Meson is venerable build system, but its Fortran support is limited when compared to C.
For example, in C, Meson has compiler.has_type(...), compiler.has_function(...),
compiler.has_library(...), ...
0
votes
1
answer
436
views
How can I get all options from meson_options.txt
Is there any facility (cli, online, etc) where from one meson_options.txt file I can get all the options filled in with the defaults?
e.g.
$ meson_get_all_options
CMD -Doption=true -Doption2=42
0
votes
1
answer
478
views
Example of meson-python Cython package with src layout
I am having trouble finding a minimal example of a Cython project that uses meson-python for packaging and is set up using the "src layout" (as described here).
I have seen examples of meson-...
5
votes
0
answers
268
views
Wrap fortran with python using ctypes (just ctypes, no cython or f2py or similar) and turn it into a python package (for python>=3.12)
I have looked at (and used as inspiration) the following SO threads and GitHub repositories:
Using python-ctypes to interface fortran with python
call functions from a shared fortran library in ...