Skip to content

[rails] Error: incompatible function pointer types passing 'VALUE (VALUE *)'

Published: at 02:12 AM (1 min read)

Recently, while working on my RoR project, I encountered an error during the bundle install command.


rbtree.c:168:24: error: incompatible function pointer types passing 'VALUE (VALUE *)' (aka 'unsigned long (unsigned long *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned
long (*)(unsigned long)') [-Wincompatible-function-pointer-types]

It looks like the error is caused by incompatible function pointer types. 💭

To fix this error, you can try manually installing the problematic package with the cflag parameter --with-cflags="-Wno-incompatible-function-pointer-types".

For example, if you are using the rbtree package, you can try the following command:

gem install rbtree -v '0.4.5' -- --with-cflags="-Wno-incompatible-function-pointer-types"

and then run bundle install again.

This should fix the error and allow you to continue with your RoR project. 🌟

References