Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql2 fails to build, ST_CONTINUE error #3795

Closed
saizai opened this issue May 14, 2018 · 4 comments
Closed

mysql2 fails to build, ST_CONTINUE error #3795

saizai opened this issue May 14, 2018 · 4 comments
Labels
C-API Compatibility Function and feature compatibility with the MRI C-API

Comments

@saizai
Copy link

saizai commented May 14, 2018

$ mysql --version
mysql  Ver 14.14 Distrib 5.7.22, for osx10.13 (x86_64) using  EditLine wrapper
$ rvm use ruby-2.5.1
Using /Users/saizai/.rvm/gems/ruby-2.5.1
Creating alias current for ruby-2.5.1.....
$ ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config
Building native extensions with: '--with-mysql-config=/usr/local/bin/mysql_config'
This could take a while...
Successfully installed mysql2-0.5.1
1 gem installed
$ rvm use rbx-3.102
Using /Users/saizai/.rvm/gems/rbx-3.102
Creating alias current for rbx-3.102.....
$ ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config
Building native extensions with: '--with-mysql-config=/usr/local/bin/mysql_config'
This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

    current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
/Users/saizai/.rvm/rubies/rbx-3.102/bin/rbx -r ./siteconf20180514-49803-1s5unq2.rb extconf.rb --with-mysql-config=/usr/local/bin/mysql_config
checking for rb_absint_size()... no
checking for rb_absint_singlebit_p()... no
checking for rb_wait_for_single_fd()... no
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... yes
checking for MYSQL.net.pvio in mysql.h... no
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
checking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_WAS_SLOW in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
checking for my_bool in mysql.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.7.22/lib
-----
creating Makefile

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR=" clean

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:412:10: error: use of undeclared identifier 'ST_CONTINUE'
  return ST_CONTINUE;
         ^
1 error generated.
make: *** [client.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1 for inspection.
Results logged to /Users/saizai/.rvm/gems/rbx-3.102/extensions/x86_64-darwin-17/2.3/mysql2-0.5.1/gem_make.out
$ cat /Users/saizai/.rvm/gems/rbx-3.102/extensions/x86_64-darwin-17/2.3/mysql2-0.5.1/gem_make.out
current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
/Users/saizai/.rvm/rubies/rbx-3.102/bin/rbx -r ./siteconf20180514-49803-1s5unq2.rb extconf.rb --with-mysql-config=/usr/local/bin/mysql_config
checking for rb_absint_size()... no
checking for rb_absint_singlebit_p()... no
checking for rb_wait_for_single_fd()... no
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... yes
checking for MYSQL.net.pvio in mysql.h... no
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
checking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_WAS_SLOW in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
checking for my_bool in mysql.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.7.22/lib
-----
creating Makefile

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR=" clean

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:412:10: error: use of undeclared identifier 'ST_CONTINUE'
  return ST_CONTINUE;
         ^
1 error generated.
make: *** [client.o] Error 1

make failed, exit code 2
@brixen
Copy link
Member

brixen commented May 15, 2018

@saizai I don't know what the impact of --with-mysql-config may be, so could you try without it?

I was able to install on Trusty as follows, so again, I wonder whether this is an RVM issue:

vagrant@vagrant-ubuntu-trusty-64:~/devel$ ARCHFLAGS="-arch x86_64" gem install mysql2
Building native extensions. This could take a while...
Successfully installed mysql2-0.5.1
1 gem installed
vagrant@vagrant-ubuntu-trusty-64:~/devel$ ruby -v
rubinius 3.103 (2.3.1 7f1b0eee 2018-05-11 3.9.1 D) [x86_64-linux-gnu]

@saizai
Copy link
Author

saizai commented May 15, 2018

Same result. @mpapis?

$ rvm use rbx-3.102
Using /Users/saizai/.rvm/gems/rbx-3.102
$ gem install mysql2
Building native extensions. This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

    current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
/Users/saizai/.rvm/rubies/rbx-3.102/bin/rbx -r ./siteconf20180515-80102-1yhuxea.rb extconf.rb
checking for rb_absint_size()... no
checking for rb_absint_singlebit_p()... no
checking for rb_wait_for_single_fd()... no
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... yes
checking for MYSQL.net.pvio in mysql.h... no
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
checking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_WAS_SLOW in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
checking for my_bool in mysql.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.7.22/lib
-----
creating Makefile

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR=" clean

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:412:10: error: use of undeclared identifier 'ST_CONTINUE'
  return ST_CONTINUE;
         ^
1 error generated.
make: *** [client.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1 for inspection.
Results logged to /Users/saizai/.rvm/gems/rbx-3.102/extensions/x86_64-darwin-17/2.3/mysql2-0.5.1/gem_make.out
$ ruby -v
rubinius 3.102 (2.3.1 e9b88b01 2018-05-11 6.0.0) [x86_64-darwin17.5.0]
$ ARCHFLAGS="-arch x86_64" gem install mysql2
Building native extensions. This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

    current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
/Users/saizai/.rvm/rubies/rbx-3.102/bin/rbx -r ./siteconf20180515-80759-1t1njts.rb extconf.rb
checking for rb_absint_size()... no
checking for rb_absint_singlebit_p()... no
checking for rb_wait_for_single_fd()... no
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... yes
checking for MYSQL.net.pvio in mysql.h... no
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
checking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_WAS_SLOW in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
checking for my_bool in mysql.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.7.22/lib
-----
creating Makefile

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR=" clean

current directory: /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1/ext/mysql2
make "DESTDIR="
compiling infile.c
compiling client.c
client.c:412:10: error: use of undeclared identifier 'ST_CONTINUE'
  return ST_CONTINUE;
         ^
1 error generated.
make: *** [client.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/saizai/.rvm/gems/rbx-3.102/gems/mysql2-0.5.1 for inspection.
Results logged to /Users/saizai/.rvm/gems/rbx-3.102/extensions/x86_64-darwin-17/2.3/mysql2-0.5.1/gem_make.out

@konung
Copy link

konung commented Sep 13, 2018

Hi. Trying out rbx for the first time one of my home projects ( just to try out Rubinius)

I'm running into the same issue building mysql2 gem on

  • OS: Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
  • DB: MySQL Distrib 5.6.41, for osx10.13 (x86_64) using EditLine wrapper
  • RBENV: 1.1.1
  • Rubinus: Tried with 3.99 & 3.107

Just for the heck of it, I tried gem install mysql ( NOT mysql2) and it worked just fine with Rubinius. Also the same gem (mysql2) is being built fine using MRI 1.9.3-p551, 2.1.5, 2.5.1 and 2.6.0-preview2 . So I'm fairly certain MySQL and rbenv setup are not the cause.

However - I was able to install mysql2 -v 0.4.10 with rbx 3.107

Any ideas what else I could try to get mysql2 v 0.5.2 install?

Thank you

@brixen brixen added the C-API Compatibility Function and feature compatibility with the MRI C-API label Jan 4, 2020
@brixen
Copy link
Member

brixen commented Jan 4, 2020

In general, the MRI C-API for Rubinius is deprecated, but that doesn't mean it will be going anywhere soon. Compatibility for C-extensions will continue to be evaluated on a case-by-case basis. However, C-extensions that depend on functions that examine or manipulate built-in MRI data structures will never be supported.

The focus for Rubinius in the near term is on the following capabilities:

  1. Instruction set
  2. Debugger
  3. Profiler
  4. Just-in-time compiler
  5. Concurrency
  6. Garbage collector

Contributions in the form of PRs for any of the areas of focus above are appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-API Compatibility Function and feature compatibility with the MRI C-API
Projects
None yet
Development

No branches or pull requests

3 participants