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

Fix to build with MySQL 5.1 #1197

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Fix to build with MySQL 5.1 #1197

merged 1 commit into from
Jan 17, 2022

Conversation

arika
Copy link
Contributor

@arika arika commented Jun 22, 2021

mysql2 0.5.3 can't build with MySQL 5.1.

$ rake compile -- --with-mysql-dir=$(pwd)/mysql-5.1.73-linux-x86_64-glibc23
cd tmp/x86_64-linux/mysql2/2.6.7
/usr/local/bin/ruby -I. ../../../../ext/mysql2/extconf.rb -- --with-mysql-dir=/mysql2/mysql-5.1.73-linux-x86_64-glibc23
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... no
-----
Using --with-mysql-dir=/mysql2/mysql-5.1.73-linux-x86_64-glibc23
-----
checking for -lmysqlclient... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... no
checking for MYSQL_OPT_SSL_ENFORCE in mysql.h... no
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... no
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... no
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 libpath to /mysql2/mysql-5.1.73-linux-x86_64-glibc23/lib
-----
creating Makefile
cd -
cd tmp/x86_64-linux/mysql2/2.6.7
/usr/bin/make
compiling ../../../../ext/mysql2/client.c
../../../../ext/mysql2/client.c: In function ‘_mysql_client_options’:
../../../../ext/mysql2/client.c:925:10: error: ‘MYSQL_DEFAULT_AUTH’ undeclared (first use in this function); did you mean ‘MYSQL_SECURE_AUTH’?
     case MYSQL_DEFAULT_AUTH:
          ^~~~~~~~~~~~~~~~~~
          MYSQL_SECURE_AUTH
../../../../ext/mysql2/client.c:925:10: note: each undeclared identifier is reported only once for each function it appears in
../../../../ext/mysql2/client.c: In function ‘set_default_auth’:
../../../../ext/mysql2/client.c:1394:38: error: ‘MYSQL_DEFAULT_AUTH’ undeclared (first use in this function); did you mean ‘MYSQL_SECURE_AUTH’?
   return _mysql_client_options(self, MYSQL_DEFAULT_AUTH, value);
                                      ^~~~~~~~~~~~~~~~~~
                                      MYSQL_SECURE_AUTH
../../../../ext/mysql2/client.c:1395:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
../../../../ext/mysql2/client.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-used-but-marked-unused’
cc1: warning: unrecognized command line option ‘-Wno-static-in-inline’
cc1: warning: unrecognized command line option ‘-Wno-reserved-id-macro’
cc1: warning: unrecognized command line option ‘-Wno-missing-variable-declarations’
cc1: warning: unrecognized command line option ‘-Wno-documentation-unknown-command’
cc1: warning: unrecognized command line option ‘-Wno-disabled-macro-expansion’
cc1: warning: unrecognized command line option ‘-Wno-covered-switch-default’
cc1: warning: unrecognized command line option ‘-Wno-conditional-uninitialized’
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
make: *** [Makefile:245: client.o] Error 1
rake aborted!

@sodabrew sodabrew merged commit 8193dc4 into brianmario:master Jan 17, 2022
@sodabrew
Copy link
Collaborator

Note that MySQL 5.1 was removed from the test matrix long ago. No promises that it won't break again for other reasons.

@arika arika deleted the mysql-5.1 branch January 18, 2022 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants