meson 问题汇总

Question 0x01

configure 编译错误,报错如下

1
meson ERROR: Command "/usr/bin/make distclean" failed with status 2.

原因是 meson 是在 buildir 下编译 configure 的,会出现路径错误的问题

所以我们要在 configure 文件中写入如下代码以进入正确的目录

1
2
3
4
#! /bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}"