Skip to content

onig_sys fails to compile on Arch Linux (GCC 13+) #17

@sancheslfl

Description

@sancheslfl

I'm attempting to install glimpse via cargo and yay on Arch but the build fails with errors related to incompatible function pointer types coming from the onig_sys crate, specifically in the bundled Oniguruma C code. The compiler throws errors like “initialization of ‘int (*)(void)’ from incompatible pointer type” and “too many arguments to function.” I'm using fully updated Arch Linux with GCC 13 and Rust 1.78.0.

After some searching, i found that these issues are due to modern compilers enforcing stricter checks on function pointer compatibility, and the C code may be using older function declarations but I'm new to Arch and I don't know if this is an actual bug in the source code or just me doing something wrong with how my system is set up. I'd appreciate any guidance on whether this is a known issue and what the proper fix might be.

Exception
error: initialization of 'int (*)(void)' from incompatible pointer type 'int (*)(st_str_end_key *, st_str_end_key *)' at oniguruma/src/regparse.c:588:5 error: too many arguments to function 'table->type->hash'; expected 0, have 1 at oniguruma/src/st.c:56:43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions