Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing msgpack (1.4.4) on ruby 3.0.4 on M1 mac

While installing msgpack gem I'am receiving this error:

/Users/orbanbotond/.frum/versions/3.0.4/lib/ruby/gems/3.0.0/gems/msgpack-1.4.4/ext/msgpack
make DESTDIR\=
compiling buffer.c
compiling buffer_class.c
buffer_class.c:261:17: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka
'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long
(*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
                read_until_eof_error, (VALUE)(void*) args,
                ^~~~~~~~~~~~~~~~~~~~
/Users/orbanbotond/.frum/versions/3.0.4/include/ruby-3.0.0/ruby/internal/iterator.h:51:47: note:
passing argument to parameter here
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
                                              ^
1 error generated.
make: *** [buffer_class.o] Error 1

make failed, exit code 2
like image 795
Boti Avatar asked Dec 07 '25 08:12

Boti


1 Answers

I have similar issue when setting up on my mac M2, fixed by adding option:

gem install msgpack -v '1.4.2' -- --with-cflags=-Wno-error=incompatible-function-pointer-types

So I think you can try use the same version by replacing the version of above command to 1.4.4

like image 166
ugifractal Avatar answered Dec 10 '25 02:12

ugifractal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!