~xvilka

Shanghai, China

https://rizin.re

Reverse engineer, Rizin RE framework core team member, Rustacean and OCamler, foreign languages fanatic.


#11 subprojects/libdemangle.wrap:1:1: error: invalid section 'wrap-git' 13 days ago

Ticket created by ~xvilka on ~lattis/muon

/home/akochkov/rizin/rizin_copy/subprojects/libdemangle.wrap:1:1: error: invalid section 'wrap-git'
  1 | [wrap-git]
      ^
/home/akochkov/rizin/rizin_copy/meson.build:266:20: error: in function subproject
266 | libdemangle_proj = subproject('libdemangle', default_options: libdemangle_options)
                         ^

It happens on basic wrap files like:


[wrap-git]
url = https://github.com/rizinorg/rz-libdemangle.git
revision = 23398b4f3f6a97f89ba0a3c543ba276a670a151f

#9 Support `directory` keys in subproject wraps 29 days ago

Ticket created by ~xvilka on ~lattis/muon

/home/akochkov/rizin/rizin_copy/subprojects/libuv.wrap:2:1: error: invalid key "directory"
  2 | directory = libuv-v1.40.0
      ^
/home/akochkov/rizin/rizin_copy/meson.build:259:18: error: in builtin function subproject
259 |     libuv_proj = subproject('libuv', default_options: ['default_library=static'])
                       ^

This is what we have inside this wrap file:

[wrap-file]
directory = libuv-v1.40.0

source_url = https://github.com/rizinorg/fallback-repo/raw/main/libuv-v1.40.0.tar.gz
source_filename = libuv-v1.40.0.tar.gz
source_hash = 61a90db95bac00adec1cc5ddc767ebbcaabc70242bd1134a7a6b1fb1d498a194
source_fallback_url = https://dist.libuv.org/dist/v1.40.0/libuv-v1.40.0.tar.gz

patch_directory = libuv-v1.40.0

See https://github.com/rizinorg/rizin/blob/dev/subprojects/libuv.wrap

#8 Add support for disabler functions 29 days ago

Ticket created by ~xvilka on ~lattis/muon

/home/akochkov/rizin/rizin_copy/meson.build:251:21: error: disablers are not supported
251 | libuv_dep = disabler()
                          ^
/home/akochkov/rizin/rizin_copy/meson.build:251:13: error: in builtin function disabler
251 | libuv_dep = disabler()
                  ^

See https://mesonbuild.com/Disabler.html

#7 Implement `add_global_arguments()` function 29 days ago

Comment by ~xvilka on ~lattis/muon

In our case we use the add_global_arguments() on purpose, to force these arguments on subprojects too, see the code:

# Sanitize correct usage of rz_strf()
if cc.has_argument('-Werror=sizeof-pointer-memaccess')
  add_global_arguments('-Werror=sizeof-pointer-memaccess', language: ['c', 'cpp'])
endif

It has its uses for sure.

#7 Implement `add_global_arguments()` function a month ago

Ticket created by ~xvilka on ~lattis/muon

error function not implemented
/home/akochkov/rizin/rizin_copy/meson.build:136:3: error: in builtin function add_global_arguments
136 |   add_global_arguments('-Werror=sizeof-pointer-memaccess', language: ['c', 'cpp'])
        ^

See https://mesonbuild.com/Adding-arguments.html

#6 add_project_arguments(arg1, language: []): error: expected type string, got array a month ago

Ticket created by ~xvilka on ~lattis/muon

[i] ℤ ~/rizin/muon/build/muon setup build                                                                                                                                                                                         14:12:22 
info detected compiler gcc 11.2.1 (cc)
info configuring 'rizin', version: v0.3.0-git
info rizin lib version: 0.3.0-git
info '--std=gnu99' supported: YES
/home/akochkov/rizin/rizin_copy/meson.build:110:50: error: expected type string, got array
110 |   add_project_arguments('--std=gnu99', language: ['c', 'cpp'])
                                                       ^
/home/akochkov/rizin/rizin_copy/meson.build:110:3: error: in builtin function add_project_arguments
110 |   add_project_arguments('--std=gnu99', language: ['c', 'cpp'])

#5 run_command(): error: invalid type for run_command argument: 'array' a month ago

Ticket created by ~xvilka on ~lattis/muon

[i] ℤ ~/rizin/muon/build/muon setup build                                                                                                                                                                                         14:05:49 
info detected compiler gcc 11.2.1 (cc)
info configuring 'rizin', version: v0.3.0-git
/home/akochkov/rizin/rizin_copy/meson.build:49:40: error: invalid type for run_command argument: 'array'
 49 |   git_rev_parse = run_command(py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD')
                                             ^
/home/akochkov/rizin/rizin_copy/meson.build:49:19: error: in builtin function run_command
 49 |   git_rev_parse = run_command(py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD')
                        ^

The code in question is:

py3_exe = import('python').find_installation()
git_exe = find_program('git', required: false)
repo = '.'
git_exe_repo_py = files('sys/meson_git_wrapper.py')
git_rev_parse = run_command(py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD')

#3 Add support for "pkgconfig" module a month ago

Comment by ~xvilka on ~lattis/muon

Thank you! It indeed makes the build continue, which is sufficient enough for my needs.

#4 Add support for "is_subproject()" function a month ago

Ticket created by ~xvilka on ~lattis/muon

There is a "is_subproject()" function in the Meson that checks if the project running as someone's else subproject.

https://mesonbuild.com/Subprojects.html

[i] ℤ ~/rizin/muon/build/muon setup build                                                                                                                                                                                         13:57:46 
info detected compiler gcc 11.2.1 (cc)
info configuring 'rizin', version: v0.3.0-git
/home/akochkov/rizin/rizin_copy/meson.build:41:10: error: function is_subproject not found
 41 | if meson.is_subproject()
               ^

#3 Add support for "pkgconfig" module a month ago

Ticket created by ~xvilka on ~lattis/muon

It's quite common module: https://mesonbuild.com/Pkgconfig-module.html

See the example of its usage:

pkgconfig_mod = import('pkgconfig')
pkgconfig_mod.generate(rz_syscall,
  subdirs: 'librz',
  version: rizin_version,
  name: 'rz_syscall',
  filebase: 'rz_syscall',
  libraries: pkgcfg_sanitize_libs,
  requires: [
    'rz_util'
  ],
  description: 'rizin foundation libraries'
)