DEV Community

Cover image for Mysql Problems with Config
enriquedb
enriquedb

Posted on

Mysql Problems with Config

Today firstly saw the unarity of pure_json and json...
As well as had an issue when attempting to update json,
The issue seemed to be a dependancy problem with sdoc.
After removing sdoc and rdoc from the equation the issue persisted:
....
compiling mysql2_ext.c
compiling result.c
result.c:326:40: warning: incompatible pointer types assigning to 'my_bool ' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
wrapper->result_buffers[i].is_null = &wrapper->is_null[i];
^ ~~~~~~~~~~~~~~~~~~~~
result.c:328:40: warning: incompatible pointer types assigning to 'my_bool *' (aka 'char *') from 'bool *' [-Wincompatible-pointer-types]
wrapper->result_buffers[i].error = &wrapper->error[i];
^ ~~~~~~~~~~~~~~~~~~
2 warnings generated.
compiling statement.c
linking shared-object mysql2/mysql2.bundle
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *
* [mysql2.bundle] Error 1
make failed, exit code 2
....
I found the compilation to be somehow incorrect, tried uninstalling and installing the gem and it somehow pointed to a previously used version of mysql2,
So, after some research, a post on SO about the config of mysql directly changed it through bundle config local instead of by installation of the gem and using the flags there.

The post was: https://stackoverflow.com/questions/56786993/mysql2-gem-fails-on-bundle-install-despite-installing-using-gem-install-co

and the answer to my issue was:
bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"

Top comments (0)