ruby on rails - Installing mysql2 gem - HAVE_UINT (ushort, uint type redefinition errors) -
yes, yet question installing mysql2 gem use in ruby on rails. it's error haven't been able find listed in question.
i've got 64 bit mysql , rvm installed on os x mountain lion. when trying install mysql2 gem, keep getting error make
redefinition of ushort
, uint
in mysql2_ext.h. found file in couple of different places (apparently cached, because changing file did nothing when reran gem install mysql2
command) , found these lines in it:
#ifndef have_uint #define have_uint typedef unsigned short ushort; typedef unsigned int uint; #endif
it indeed trying redefine ushort
, uint
though still has them. how tell symbols defined?
turns out there's way specify cflags force recognize have_uint definition. not (apparently gem installation manages ignore environment variables set way):
sudo env cflags="-dhave_uint" gem install mysql2
see this question how this:
gem install mysql2 -- --with-cflags=\"-dhave_uint\"
and worked!
Comments
Post a Comment