Paolo Bonzini <pbonz...@redhat.com> writes:
> Cope with the old version that is provided in Debian 12 and Ubuntu 22.04. > --size_t-is-usize is needed on bindgen <0.61.0 (Debian 12, Ubuntu 22.04), > and it was removed in bindgen 0.65.0, so check for it in meson.build. The bindgen 0.59.1 installed from Ubuntu 22.04 apt source does not support the following args: '--formatter', 'rustfmt', '--merge-extern-blocks', '--allowlist-file', meson.project_source_root() + '/include/.*', '--allowlist-file', meson.project_source_root() + '/.*', '--allowlist-file', meson.project_build_root() + '/.*' The first two args are cosmetic and should not hurt if removed (but I need to double check). Removing the allowlist-file, however, causes IPPORT_RESERVED to be generated twice using different types and thus break the build. Allowlists for bindgen 0.59.1 can only be specified as regex on function, type or var. I don't find (yet) an equivalent way of --allowlist-file. A dirty trick is `--blocklist-item IPPORT_RESERVED`, which works but is so ad-hoc. -- Best Regards Junjie Mao