~xvilka

Shanghai, China

https://rizin.re

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


#86 Muon + TCC (TinyCC) can't find 'rt' library 17 days ago

Comment by ~xvilka on ~lattis/muon

Ok, thanks to ~vtorri, it was found that this problem happens when CC is set in environment prior to calling muon, e.g. env CC=tcc muon setup build but this problem doesn't happen if we set it through muon itself: muon -Denv.CC=tcc setup build. Quite strange. So I guess the real bug is in some difference how muon picks up environment variables.

#86 Muon + TCC (TinyCC) can't find 'rt' library 18 days ago

Comment by ~xvilka on ~lattis/muon

~lattis, I retried again with latest Muon and TCC commits and the problem is still the same. Do you know what might be the reason?

#117 muon: ../src/datastructures/arr.c:98: arr_get: Assertion `i < arr->len' failed. 8 months ago

Ticket created by ~xvilka on ~lattis/muon

detected compiler gcc '11.4.0' (['cc']), linker: ld.bfd (['ld.bfd']), static_linker: ar (gcc) (['ar'])
/home/runner/work/rizin/rizin/subprojects/pcre2_cross_native.wrap:1:1: warning previous provide for 1330 from 2356, is being overridden by 2361
  1 | [wrap-git]
      ^
configuring 'rizin', version: v0.8.0
message: rizin lib version: 0.8 
c compiler: supports argument '--std=gnu99': YES
c compiler: supports argument '-Werror=sizeof-pointer-memaccess': YES
c compiler: supports argument '-Wimplicit-fallthrough=3': YES
Cloning into '/home/runner/work/rizin/rizin/subprojects/capstone-next'...
HEAD is now at b4fde983 [PPC] Expose instruction formats (#2276)
[capstone-next] entering subproject 'capstone-next'
muon: ../src/datastructures/arr.c:98: arr_get: Assertion `i < arr->len' failed.
/home/runner/work/rizin/rizin/meson.build:186:21: error encountered unhandled error
186 |     capstone_proj = subproject('capstone-' + capstone_version, default_options: ['default_library=static'])
                          ^______________________________________________________________________________________
/home/runner/work/_temp/4bc8ab07-d736-4edd-825d-012f546a09e2.sh: line 1:  3217 Aborted                 (core dumped) muon setup build

See this meson file: https://github.com/rizinorg/rizin/blob/dev/meson.build

#86 Muon + TCC (TinyCC) can't find 'rt' library 1 year, 1 month ago

Comment by ~xvilka on ~lattis/muon

#29 Add user groups and access groups 1 year, 4 months ago

Comment by ~xvilka on ~sircmpwn/meta.sr.ht

Have there been any updates on this issue?

#86 Muon + TCC (TinyCC) can't find 'rt' library 1 year, 6 months ago

on ~lattis/muon

Changed to pass -print-search-dirs. ~xvilka, can you confirm this fixes the tcc issue?

#72 ArcaOS Support 1 year, 10 months ago

on ~lattis/muon

@~xvilka no news on this ?

#86 Muon + TCC (TinyCC) can't find 'rt' library 1 year, 10 months ago

on ~lattis/muon

@~xvilka look at line 316 in compiler.c:

https://git.sr.ht/~lattis/muon/tree/master/item/src/compilers.c#L313

you can try to fix tinycc here with the correct option to pass to tinycc.

#86 Muon + TCC (TinyCC) can't find 'rt' library 1 year, 10 months ago

Comment by ~xvilka on ~lattis/muon

Ah, we use our patched fork for that: https://github.com/ret2libc/meson.git There was a PR (https://github.com/mesonbuild/meson/pull/8248) to meson but it was never accepted, so we decided it will be easier to just completely move to Muon for this configuration.

#86 Muon + TCC (TinyCC) can't find 'rt' library 1 year, 10 months ago

Ticket created by ~xvilka on ~lattis/muon

When we try build Rizin with Muon + TinyCC it can't find the necessary library, while Meson can:

/home/runner/work/rizin/rizin/meson.build:354:33: error library not found
354 |     it_lrt = it_cc.find_library('rt', required: true, static: is_static_build)
                                      ^
/home/runner/work/rizin/rizin/meson.build:354:20: error in method compiler.find_library()
354 |     it_lrt = it_cc.find_library('rt', required: true, static: is_static_build)
                         ^
Error: Process completed with exit code 1.

See PR at https://github.com/rizinorg/rizin/pull/3345