Skip to content

tinycc's headers are not included when built from the frida repo #1072

@bellma

Description

@bellma

When trying to compile a CModule with the embedded tinycc compiler, I am getting errors that stdarg.h cannot be found. Under certain circumstances, it appears like tinycc's headers are not included in the runtime if you build from the https://github.com/frida/frida repo.

I may be overlooking something, but I believe the solution is to change the line at

libtcc_incdir = meson.project_source_root() / 'subprojects' / 'tinycc' / 'include'

to this

libtcc_incdir = meson.global_source_root() / 'subprojects' / 'tinycc' / 'include'

The change sets libtcc_incdir to <frida>/subprojects/tinycc/include instead of <frida>/subprojects/frida-gum/subprojects/tinycc/include (which doesn't exist).

I am compiling with a custom toolchain without a prebuilt SDK, and configuring with the following:

./configure --without-prebuilds=sdk:host --host=arm-unknown-linux-gnueabi --enable-gadget --enable-server -- -Dfrida_qml=disabled -Dfrida-gum:devkits=gum,gumjs -Dfrida-core:compiler_backend=enabled -Dfrida-core:devkits=core

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions