[99/181] Compiling C object bindings/gumjs/libfrida-gumjs-1.0.so.p/gumcmodule.c.o
FAILED: bindings/gumjs/libfrida-gumjs-1.0.so.p/gumcmodule.c.o
gcc ... -o bindings/gumjs/libfrida-gumjs-1.0.so.p/gumcmodule.c.o -c ../bindings/gumjs/gumcmodule.c
In file included from /nix/store/i4dqcpppyyq5yqcvw95mv5s11yfyy8pf-glib-2.74.3/lib/glib-2.0/include/glibconfig.h:9,
from /nix/store/7gp6sgjxwr4bzvy4r29a0rmb476pxww0-glib-2.74.3-dev/include/glib-2.0/glib/gtypes.h:34,
from /nix/store/7gp6sgjxwr4bzvy4r29a0rmb476pxww0-glib-2.74.3-dev/include/glib-2.0/glib/galloca.h:34,
from /nix/store/7gp6sgjxwr4bzvy4r29a0rmb476pxww0-glib-2.74.3-dev/include/glib-2.0/glib.h:32,
from ../gum/gumdefs.h:10,
from ../gum/gummemory.h:11,
from ../bindings/gumjs/gumcmodule.h:10,
from ../bindings/gumjs/gumcmodule.c:7:
bindings/gumjs/gumcmodule-runtime.h: In function ‘gum_cmodule_get_symbols’:
bindings/gumjs/gumcmodule-runtime.h:3414:70: error: ‘dlclose’ undeclared (first use in this function); did you mean ‘pclose’?
3414 | g_hash_table_insert (symbols, "dlclose", GUM_FUNCPTR_TO_POINTER (dlclose));
| ^~~~~~~
fix: generate-runtime.py should ignore tcclib.h
dlclose comes from tcclib.h
generate-runtime.py with debug prints
```py
for header_dir, header_reldir, header_filter, header_transform, header_kind in inputs:
print(f"generate-runtime.py: header_dir={header_dir}", file=sys.stderr)
print(f"generate-runtime.py: header_reldir={header_reldir}", file=sys.stderr)
print(f"generate-runtime.py: header_filter={header_filter}", file=sys.stderr)
for header_name, header_source in find_headers(header_dir, header_reldir, header_filter, header_transform):
print(f"generate-runtime.py: header_name={header_name}", file=sys.stderr)
input_identifier = "gum_cmodule_{0}".format(identifier(header_name))
for pattern in (cmodule_function_pattern, cmodule_variable_pattern):
for m in pattern.finditer(header_source):
name = m.group(2)
symbols.append(name)
print(f"generate-runtime.py: symbol={name}", file=sys.stderr)
```
fails to compile with vanilla tinycc
fix: generate-runtime.py should ignore tcclib.h
dlclose comes from tcclib.h
generate-runtime.py with debug prints
```py for header_dir, header_reldir, header_filter, header_transform, header_kind in inputs: print(f"generate-runtime.py: header_dir={header_dir}", file=sys.stderr) print(f"generate-runtime.py: header_reldir={header_reldir}", file=sys.stderr) print(f"generate-runtime.py: header_filter={header_filter}", file=sys.stderr) for header_name, header_source in find_headers(header_dir, header_reldir, header_filter, header_transform): print(f"generate-runtime.py: header_name={header_name}", file=sys.stderr) input_identifier = "gum_cmodule_{0}".format(identifier(header_name)) for pattern in (cmodule_function_pattern, cmodule_variable_pattern): for m in pattern.finditer(header_source): name = m.group(2) symbols.append(name) print(f"generate-runtime.py: symbol={name}", file=sys.stderr) ```also mentioned in #713
see also https://github.com/frida/tinycc/issues/6