Meson 1.12.1 released
Meson 1.12.1
Why it matters: Meson is in Language & Toolchain (one of your focus areas).

Building code for Android with Meson has long been possible, but a bit hacky and not particularly well documented. Recently some new features have landed in Meson main, which make the experience quite a bit nicer. To demonstrate, I have updated the Platypus sample project to…
Meson 1.12.1
Why it matters: Meson is in Language & Toolchain (one of your focus areas).
Meson 1.12.0
Why it matters: Meson is in Language & Toolchain (one of your focus areas).
Meson 1.11.2
Why it matters: Meson is in Language & Toolchain (one of your focus areas).
No published opportunities
Some compiler checks can be parallelized, for example: get_supported_arguments() get_supported_link_arguments() cross_compute_int(): there are two branches at each guess, so we can run both at the same time, which will improve the worst-case time. We should also add map-like API for batch-processing several has_function() and has_header() checks at once and sets values in a configuration_data() object, usually of the form: meson cdata = configuration_data() if cc.has_function(func_name, prefix: includes) cdata.set(func_name.to_upper().underscorify()) endif Usually this requires lambda support…
Some compiler checks can be parallelized, for example: get_supported_arguments() get_supported_link_arguments() cross_compute_int(): there are two branches at each guess, so we can run both at the same time, which will improve the worst-case time. We should also add map-like…
Reproduce the benchmark or slow path, profile it (perf, VTune or Tracy), and share the numbers on the issue before proposing a change.
Describe the bug meson runs ifx -print-search-dirs, but that command doesn't exist. To Reproduce meson.build: project('ex', 'fortran') fc=meson.get_compiler('fortran') z = fc.find_library('thatlib') Expected behavior with gfortran it works ok. meson-log.txt shows: Command line: gfortran ... --print-search-dirs -> 0 stdout: install: /usr/lib/gcc/x86_64-redhat-linux/11/ ... ----------- meson.build:3:7: ERROR: Fortran shared or static library 'thatlib' not found system parameters with FC=ifx meson setup build: Command line: ifx ... --print-search-dirs -> 1 stderr: ifx: command line error:…
Describe the bug meson runs ifx -print-search-dirs, but that command doesn't exist. To Reproduce meson.build: project('ex', 'fortran') fc=meson.get_compiler('fortran') z = fc.find_library('thatlib') Expected behavior with gfortran it works ok. meson-log.txt shows: Command line…
I *think* that for LLVM based compilers like ifx that should be just -print-search-dirs (notice one - not two --).
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Meson doesn't seem to understand much about linkers; most of the projects porting to meson do something like this: mapfile = 'libgusb.ver' vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) gusb = shared_library( 'gusb', sources : [ 'gusb-context.c', ], soversion : lt_current, version : lt_version, dependencies : [ libusb, ], link_args : vflag, link_depends : mapfile, install : true ) Which is fine, unless you discover that OS-X doesn't support --version-script : Rather than have to do evil things to the meson.build file to support OS-X, I would much prefer fr…
Meson doesn't seem to understand much about linkers; most of the projects porting to meson do something like this: mapfile = 'libgusb.ver' vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) gusb = shared_library( 'gusb', sources : […
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
When a shared_library() target has only object files and that the 'nasm' language was added, meson picks the nasm_LINKER to link the target. But when calling meson install, meson tries to install a .dll.a file for that DLL which was not generated. Adding link_language: 'c' fixes the issue, but it would be nice it would be handled automatically. To Reproduce meson.build: meson project('VLC', ['c'], meson_version: '>=1.1.0') dll_srcs = files('source.c') obj_compiler = generator(find_program('x86_64-w64-mingw32-gcc'), output: ['@BASENAME@.obj'], arguments: ['@INPUT@', '-c', '-o', '@OUTPUT@'])…
When a shared_library() target has only object files and that the 'nasm' language was added, meson picks the nasm_LINKER to link the target. But when calling meson install, meson tries to install a .dll.a file for that DLL which was not generated. Adding link_language: 'c'…
Is there a /mst/s/Programs/meson/bugs/objs_dlla/build/libdll_win_obj.lib, by chance?
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
meson disables color output if stdout is not tty, as below: mesonbuild/mlog.py: colorize_console = platform.system().lower() != 'windows' and os.isatty(sys.stdout.fileno()) and \ os.environ.get('TERM') != 'dumb' This works good normally. But colored log files are needed for sharing log across html email / link ( to pin point the exact areas of concern ( red / yellow warnings etc ). Colored output is much faster to debug than plain text. Screenshot is a very limiting option. An option to meson ( similar to ls --color=always ) should help here. Example color log file: root@vbox:~# apt-get…
meson disables color output if stdout is not tty, as below: mesonbuild/mlog.py: colorize_console = platform.system().lower() != 'windows' and os.isatty(sys.stdout.fileno()) and \ os.environ.get('TERM') != 'dumb' This works good normally. But colored log files are needed for…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
Describe the bug I'm trying to compile Vulkan-Loader with the cmake module, however I believe the following is tripping up the cmake->meson conversion: # Enable control flow guard if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf") else() set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf") endif() I'm ending up with the following in the generated meson.build: vulkan = shared_library( 'vulkan', vulkan_src, loader_asm_gen_files,…
Describe the bug I'm trying to compile Vulkan-Loader with the cmake module, however I believe the following is tripping up the cmake->meson conversion: # Enable control flow guard if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") target_link_options(loader_common_options…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
When running meson build on a a system without the libgirepository1.0-dev package installed, I got this very cryptic error: Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner) Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler) Meson encountered an error in file subprojects/gstreamer/gst/meson.build, line 270, column 4: gobject-introspection dependency was not found, gir cannot be generated. I'd expect to have the error I found in the meson logs show up in the main config: Determining dependency 'gobject-introspection-1.0' with pkg-config executable '/usr/bin/pkg-config'
When running meson build on a a system without the libgirepository1.0-dev package installed, I got this very cryptic error: Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner) Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler) Meson encountered an error in file…
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Describe the bug Meson doesn't have a way to override which compiler is used when meson setup is invoked. Unlike $CFLAGS, which has the c_args option, there is no option for $CC. Although meson looks at $CC, that isn't given the highest priority. It breaks in a cross compile where another compiler is specified in the machine configuration. What's missing is something equivalent to specifying CC=foo as an argument in Autotools. We need this to override the compiler in automation scripts with a wrapper. Creating temporary configuration files for Meson is just messy there, so we need something…
Describe the bug Meson doesn't have a way to override which compiler is used when meson setup is invoked. Unlike $CFLAGS, which has the c_args option, there is no option for $CC. Although meson looks at $CC, that isn't given the highest priority. It breaks in a cross compile…
Specifically, it sounds to me like the issue you have is that you have a machine file (either a cross file or a native file), it defines a compiler, you want to use a different compiler than that one, and, Meson's priority for for configuration is: cli, machine file, env. I…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Describe the bug Boost dependencies without an explicit static argument will still link dynamically when -Dprefer_static=true is passed. To Reproduce meson project('repro', 'cpp') executable('repro', 'repro.cpp', dependencies: dependency('boost', modules: ['thread'])) (the content of repro.cpp does not matter here) Running meson setup build -Dprefer_static=true on a system where static boost libraries are installed and then inspecting the build.ninja will show that boost is linked dynamically. Additionally passing static: true to the dependency() call will link boost statically, which shows…
Describe the bug Boost dependencies without an explicit static argument will still link dynamically when -Dprefer_static=true is passed. To Reproduce meson project('repro', 'cpp') executable('repro', 'repro.cpp', dependencies: dependency('boost', modules: ['thread'])) (the…
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
The current project option setup is simple. All options must be specified at the top level meson_options.txt file. We should instead be able to provide roughly similar level of options as kconfig. These include: some options that are not shown, for example if you have win, linux and osx subdirectories, each with options, only options from one of them should be added to the set of all options and shown to the user arranging options in a tree something like make allmodconfig seems useful but hard to do reliably with all of the above KConfig is nice but has severe drawbacks such as being able to…
The current project option setup is simple. All options must be specified at the top level meson_options.txt file. We should instead be able to provide roughly similar level of options as kconfig. These include: some options that are not shown, for example if you have win…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
e.g. meson dependency('zlib', modules: ['cheese'], optional_modules: ['bread'], main: true, static: false) is considered valid, at the moment.
e.g. meson dependency('zlib', modules: ['cheese'], optional_modules: ['bread'], main: true, static: false) is considered valid, at the moment.
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Hey, This a follow-up on Issue description If one does this shell git clone cd ZeGrapher git checkout dd1273e meson setup build && meson compile One will see these warnings shell Warning: datapoints.h:40: QQuickItem is used as base type but cannot be found. Warning: graph.h:37: QQuickPaintedItem is used as base type but cannot be found. Warning: graph.h:37: MathObjectDraw is used as base type but cannot be found. Warning: highlighter.h:10: QSyntaxHighlighter is used as base type but cannot be found. Warning: information.h:35: QObject is used as base type but cannot be found. Warning:…
Hey, This a follow-up on Issue description If one does this shell git clone cd ZeGrapher git checkout dd1273e meson setup build && meson compile One will see these warnings shell Warning: datapoints.h:40: QQuickItem is used as base type but cannot be found. Warning: graph.h:37…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
gnome.gtkdoc() is indirectly called through meson --internal gtkdoc. That means two things: We can't call ninja some_file_generated_by_gtkdoc-mkdb (it's called by meson --instal...) We can't see the "real" command (gtkdoc-mkdb) to check the passed arguments. That'd be great to have a --verbose parameter to pass to meson and meson --internal. Meson also should print the commands on fail (just as Ninja does). Another way to solve the problem would be to completely remove the --internal calls and let ninja do the job.
gnome.gtkdoc() is indirectly called through meson --internal gtkdoc. That means two things: We can't call ninja some_file_generated_by_gtkdoc-mkdb (it's called by meson --instal...) We can't see the "real" command (gtkdoc-mkdb) to check the passed arguments. That'd be great to…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Similar to what some distros have for missing commands: console $ jython bash: jython: command not found... Install package 'jython' to provide command 'jython'? [N/y] This will really improve the 'build a project for the first time' experience, which is pretty shit for all build systems in the world right now, as detailed in Must also include an option for disabling this when building in CI, for instance.
Similar to what some distros have for missing commands: console $ jython bash: jython: command not found... Install package 'jython' to provide command 'jython'? [N/y] This will really improve the 'build a project for the first time' experience, which is pretty shit for all…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
It would be really handy if we could have out of the box integration with it.
It would be really handy if we could have out of the box integration with it.
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Although very similar to #371 , some install scripts do not only generate files, but require a certain command to be run again. A specific case is 'gtk-update-icon-cache', which should be run again after the icons have been removed.
Although very similar to #371 , some install scripts do not only generate files, but require a certain command to be run again. A specific case is 'gtk-update-icon-cache', which should be run again after the icons have been removed.
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
Describe the bug An improper file path is provided to cmake subprojects when using mingw-w64-cmake. To Reproduce Please include your meson.build files, preferably as a minimal toy example showing the issue. You may need to create simple source code files (don't include private/proprietary code). Install python,pip,meson &c through mingw when possible and pip when not. Install the mingw cmake package call meson configure with a cmake subproject in your root meson build: cmake = import('cmake') jansson_subproj = cmake.subproject('jansson-2.14.1') jansson_lib =…
Describe the bug An improper file path is provided to cmake subprojects when using mingw-w64-cmake. To Reproduce Please include your meson.build files, preferably as a minimal toy example showing the issue. You may need to create simple source code files (don't include…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
Describe the bug There seems to be an issue passing the cpp_std/cuda_std options to cmake subprojects, specifically for cuda targets. The cuda targets from the cmake project have the cpp_std argument prepended to them, and don't have their exising std arguments stripped out. Example of a subproject target from build.ninja when setting cpp_std=c+=23 cuda_std=c++20: ARGS = -D_GLIBCXX_ASSERTIONS=1 -DCCCL_ENABLE_ASSERTIONS=1 -Isubprojects/ / _cuda.so.p -Xcompiler=-Wall,-Winvalid-pch,-Wextra -std=c++23 -G -g -Xcompiler=-fPIC -isystem=/usr/include/x86_64-linux-gnu/openblas-pthread…
Describe the bug There seems to be an issue passing the cpp_std/cuda_std options to cmake subprojects, specifically for cuda targets. The cuda targets from the cmake project have the cpp_std argument prepended to them, and don't have their exising std arguments stripped out…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
It would be nice to provide a syntax-check functionality for meson files (like apachectl configtest). This would allow on-the-fly syntax checks from within Emacs (via Flycheck) and other editors.
It would be nice to provide a syntax-check functionality for meson files (like apachectl configtest). This would allow on-the-fly syntax checks from within Emacs (via Flycheck) and other editors.
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
This is a Meson bug and should be reported Log: amulet-nbt_python-arm32.txt OS is Windows 11 ARM64 Python is 3.12 ARM32
This is a Meson bug and should be reported Log: amulet-nbt_python-arm32.txt OS is Windows 11 ARM64 Python is 3.12 ARM32
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
It would be nice to support Intel Math Kernel Library via dependency('mkl'), which would replicate the logic of Intel MKL Link Advisor.
It would be nice to support Intel Math Kernel Library via dependency('mkl'), which would replicate the logic of Intel MKL Link Advisor.
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Describe the bug target_include_directories(libfoo PRIVATE) implies that these private headers will not be propagated to the user of the libfoo. To Reproduce branch cmake-module Expected behavior test.c does not see private-include/private.h Autogenerated meson.build by the cmake module: meson project('meow', 'c') libmeow_dir = include_directories('private-include', 'public-include', '__CMake_build', '.') libmeow_sys = include_directories(is_system : true) libmeow_inc = [libmeow_dir, libmeow_sys] libmeow_src = files('meow.c') libmeow = static_library( 'libmeow', libmeow_src, build_by_default…
Describe the bug target_include_directories(libfoo PRIVATE) implies that these private headers will not be propagated to the user of the libfoo. To Reproduce branch cmake-module Expected behavior test.c does not see private-include/private.h Autogenerated meson.build by the…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
Currently, to install my public headers and generated enums.h, I have to do something like: meson includedir = join_paths(prefix, get_option('includedir')) libblah_include_subdir = join_paths(libblah_api_name, 'libblah') libblah_enums = gnome.mkenums_simple('enums', sources: libblah_headers, install_header: true, install_dir: join_paths(includedir, libblah_include_subdir), ) Public library bits. install_headers(libblah_headers, subdir: libblah_include_subdir, ) It would be good if gnome.mkenums_simple() took a subdir argument like install_headers, so that dealing with includedir directly was…
Currently, to install my public headers and generated enums.h, I have to do something like: meson includedir = join_paths(prefix, get_option('includedir')) libblah_include_subdir = join_paths(libblah_api_name, 'libblah') libblah_enums = gnome.mkenums_simple('enums', sources…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
I ran ninja -C build after changing some options. At the middle, or towards the end, I hit ^Z to check on something. After checking, I totally forgot that the job was already running, and started it again. Realizing I had done that, I killed the new job, and resumed the old one. I got: $ nice ninja -j4 -C armv7-build ninja: Entering directory armv7-build' [0/1] Regenerating build files. Error during basic setup: Something went terribly wrong. Please file a bug. FAILED: build.ninja /usr/bin/python3.6 /home/ilia/src/meson/meson.py --internal regenerate /home/ilia/src/mesa-meson…
I ran ninja -C build after changing some options. At the middle, or towards the end, I hit ^Z to check on something. After checking, I totally forgot that the job was already running, and started it again. Realizing I had done that, I killed the new job, and resumed the old…
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Since meson 0.40, meson it's able to install generated files into multiple directories. However, those installation directories are used one by one for each generated target. It would be nice to have something like the following, custom_target( output, input: output_input, output: output, command: cmd, install: true, install_dir: [dir1, dir2] ) It would generate the output file after processing output_input file with the cmd command, and at install time, this file would be copied to dir1 and dir2.
Since meson 0.40, meson it's able to install generated files into multiple directories. However, those installation directories are used one by one for each generated target. It would be nice to have something like the following, custom_target( output, input: output_input…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
I'm working on bringing the Korn shell project back to life along with a few others like @siteshwar from Red Hat. We switched the project from the legacy Nmake build system to Meson and are extremely happy with that decision and the behavior of Meson (this has sped up the build by an order of magnitude). Recently I implemented a change to switch from passing all the platform feature symbols via compiler -Dsomething flags to use the configure_file() mechanism. Because the legacy code has a huge number of platform feature symbols (approximately 600) I wanted to enumerate all of them in the…
I'm working on bringing the Korn shell project back to life along with a few others like @siteshwar from Red Hat. We switched the project from the legacy Nmake build system to Meson and are extremely happy with that decision and the behavior of Meson (this has sped up the build…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Using meson-0.43.0, ninja-1.8.2, gcc-7.2.0 Building glib-2.54.3 with lto as per below results in the following library sizes for libgio-2.0.so.0.5400.3 (stripped) 1,419,000 bytes with configure/make 1,525,688 bytes with meson/ninja i.e. about 100kb or 10% larger with meson/ninja from "ninja -v", it appears that lto is being used at link time, but maybe this isn't the case? CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" meson --prefix=/usr/local --buildtype=plain -Dwith-pcre=system…
Using meson-0.43.0, ninja-1.8.2, gcc-7.2.0 Building glib-2.54.3 with lto as per below results in the following library sizes for libgio-2.0.so.0.5400.3 (stripped) 1,419,000 bytes with configure/make 1,525,688 bytes with meson/ninja i.e. about 100kb or 10% larger with…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
Describe the bug Using dependency('boost', static: true) for some boost module that depends on another boost module, then (assuming that a static version of the boost module was found) the latter boost module is not included in the dependency, possibly causing linker errors. To Reproduce meson.build: meson project('repro', 'cpp') executable('repro', 'repro.cpp', dependencies: dependency('boost', modules: ['locale'], static: true)) repro.cpp: c++ #include int main(int argc, char argv) { auto locale = boost::locale::generator().generate(""); return 0; } Configuring and compiling this on Arch…
Describe the bug Using dependency('boost', static: true) for some boost module that depends on another boost module, then (assuming that a static version of the boost module was found) the latter boost module is not included in the dependency, possibly causing linker errors. To…
Reproduce the bug on the latest main branch of Meson, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Right now, I have a bit of a nasty hack: meson custom_target( 'policy', output: ['policy.@0@'.format(policy_version), 'file_contexts'], input: base_sources, command: [ 'secilc', # TODO: does meson have some internal option to indicate how verbose the # compiler should be? For now, just be maximally verbose. '--verbose', '--verbose', '--optimize', '--mls=@0@'.format(mcs ? 'true' : 'false'), '--policyvers=@0@'.format(policy_version), '@INPUT@', ], install: true, install_dir: [ join_paths(selinux_policy_root, 'policy'), join_paths(selinux_contexts_dir, 'files'), ], install_mode: 'rw-------',…
Right now, I have a bit of a nasty hack: meson custom_target( 'policy', output: ['policy.@0@'.format(policy_version), 'file_contexts'], input: base_sources, command: [ 'secilc', # TODO: does meson have some internal option to indicate how verbose the # compiler should be? For…
Reproduce the build problem in a clean environment (container or CI matrix), then propose the smallest change to the build scripts.
In the qt6 module, the compile_ui() function currently generates header files with a hardcoded .h extension. This makes it difficult to integrate with projects that use alternative header conventions such as .hpp or custom extensions required by internal coding standards. Current behavior The generated header file extension is fixed (e.g. .h) and cannot be changed via function arguments or project options. Expected behavior It should be possible to configure the output header extension, for example: .h (default, backward compatible) .hpp Proposed solution Add an optional parameter to…
In the qt6 module, the compile_ui() function currently generates header files with a hardcoded .h extension. This makes it difficult to integrate with projects that use alternative header conventions such as .hpp or custom extensions required by internal coding standards…
Comment on the issue with a short design sketch and ask a maintainer to confirm the approach before writing code.
Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.
Recent issues and discussions in 12 tracked projects (Apache TVM, CCCL (Thrust, CUB, libcudacxx), Gazebo (gz-sim), Intel oneAPI DPC++ compiler (intel/llvm) and 8 more) mention “compile time”. This is an automatically detected signal, not a validated need.
I was told that support of Rust was experimental so I can expect hickups and that's understandable but currently it seems external crates are not supported. Since you can't really do much in Rust without external crates, it basically means