-
Notifications
You must be signed in to change notification settings - Fork 552
Description
Hello, I've fought with this block for 24 hours and would love some help.
I ensure that I am in the directory of the app I'm working on.
then:
brew install [email protected]
(ive also tried with the current mysql 8+)
=> installs fine.
bundle install
(version of bundle is 1.16.2)
=>
Fetching mysql2 0.4.4
Installing mysql2 0.4.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/amandacapella/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/Users/amandacapella/.rbenv/versions/2.4.3/bin/ruby -r
./siteconf20180620-48087-1cu44mh.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/mysql/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/mysql/lib
-----
creating Makefile
current directory:
/Users/amandacapella/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
make "DESTDIR=" clean
current directory:
/Users/amandacapella/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
make "DESTDIR="
compiling client.c
In file included from client.c:1:
In file included from ./mysql2_ext.h:41:
./result.h:24:3: error: unknown type name 'my_bool'
my_bool *is_null;
^
./result.h:25:3: error: unknown type name 'my_bool'
my_bool *error;
^
client.c:454:3: error: use of undeclared identifier 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c:456:19: error: use of undeclared identifier 'res'
return (void *)(res == 0 ? Qtrue : Qfalse);
^
client.c:775:3: error: use of undeclared identifier 'my_bool'
my_bool boolval;
^
client.c:806:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:807:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:810:10: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did
you mean 'MYSQL_DEFAULT_AUTH'?
case MYSQL_SECURE_AUTH:
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/mysql/include/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
client.c:811:7: error: use of undeclared identifier 'boolval'
boolval = (value == Qfalse ? 0 : 1);
^
client.c:812:17: error: use of undeclared identifier 'boolval'
retval = &boolval;
^
client.c:843:38: error: use of undeclared identifier 'boolval'
wrapper->reconnect_enabled = boolval;
^
client.c:1231:38: error: use of undeclared identifier 'MYSQL_SECURE_AUTH'; did
you mean 'MYSQL_DEFAULT_AUTH'?
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^~~~~~~~~~~~~~~~~
MYSQL_DEFAULT_AUTH
/usr/local/mysql/include/mysql.h:188:3: note: 'MYSQL_DEFAULT_AUTH' declared here
MYSQL_DEFAULT_AUTH,
^
12 errors generated.
make: *** [client.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/amandacapella/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4
for inspection.
Results logged to
/Users/amandacapella/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-17/2.4.0-static/mysql2-0.4.4/gem_make.out
An error occurred while installing mysql2 (0.4.4), and Bundler cannot
continue.
Make sure that `gem install mysql2 -v '0.4.4' --source 'http://rubygems.org/'`
succeeds before bundling.
In Gemfile:
mysql2
okay, so maybe sudo gem install mysql2 -v '0.4.4' --source 'http://rubygems.org/'
=> outputs the same error. I notice the checking for rb_thread_blocking_region()... no
and have googled this for help, but no results have helped.
I recently wiped and reinstalled everything for my env. I use Docker to start mysql?
macOS High Sierra 10.13.5
mysql 5.6 and 8 have same issue.
ruby 2.4.3
rails 4
xcode is up to date and dev tools/cl tools installed
what am I missing? What else can I provide to get help on this issue? It seems every issue on SO is a variant of this issue, but doesnt match perfectly (or the answers do not remedy the