Skip to content

Build failed with an invalid pointer type #23

@jtippett

Description

@jtippett

On trying to build this inside mruby, I get this errror:

$/mruby/build/repos/host/mruby-zmq/src/mrb_libzmq.c:685:38: error: incompatible function pointer types passing 'void (mrb_state *, const mrb_value)' (aka 'void (struct mrb_state *, const struct mrb_value)') to parameter of type 'mrb_func_t' (aka 'struct mrb_value (*)(struct mrb_state *, struct mrb_value)') [-Wincompatible-function-pointer-types]
    mrb_value exc = mrb_protect(mrb, mrb_zmq_thread_fn_cb, mrb_cptr_value(mrb, mrb_zmq_thread_data), &error);
                                     ^~~~~~~~~~~~~~~~~~~~
$/mruby/include/mruby/error.h:94:58: note: passing argument to parameter 'body' here
MRB_API mrb_value mrb_protect(mrb_state *mrb, mrb_func_t body, mrb_value data, mrb_bool *state);
                                                         ^
1 warning and 1 error generated.
rake aborted!
Command failed with status (1): [clang -MMD -c -std=gnu99 -g -O3 -Wall -Wun...]

This is on a mac, arm64, OS 14.7. I believe all necessary tools are installed.

I'm no C expert so I have nothing to add to the error message. Let me know if there's any more information needed.

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