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

Support Ruby 3.0 #22

Merged
merged 7 commits into from
Aug 19, 2023
Merged

Support Ruby 3.0 #22

merged 7 commits into from
Aug 19, 2023

Conversation

khiav223577
Copy link
Owner

@khiav223577 khiav223577 commented Aug 19, 2023

unknown type name ‘my_bool’; did you mean ‘_Bool’?

If you encounter this:
Upgrade mysql2 gem to ~> 0.4.10
See: brianmario/mysql2#980

Error messages:

Fetching mysql2 0.3.21
Installing mysql2 0.3.21 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

...

compiling client.c
client.c: In function ‘nogvl_read_query_result’:
client.c:439:3: error: unknown type name ‘my_bool’; did you mean ‘_Bool’?
  439 |   my_bool res = mysql_read_query_result(client);
      |   ^~~~~~~
      |   _Bool
client.c: In function ‘rb_query’:

undefined symbol: rb_tainted_str_new2

If you encounter this:
Upgrade pg gem to ~> 1.2
See: ged/ruby-pg#307

Error messages:

/opt/hostedtoolcache/Ruby/3.2.2/x64/bin/ruby: symbol lookup error: /home/runner/work/atomically/atomically/vendor/bundle/ruby/3.2.0/gems/pg-1.1.4/lib/pg_ext.so: undefined symbol: rb_tainted_str_new2

‘rb_cData’ undeclared

If you encounter this:
Upgrade pg gem to ~> 1.4.6
See: ged/ruby-pg#496

Error messages:

pg_result.c:1590:65: error: ‘rb_cData’ undeclared (first use in this function)
1590 |         rb_cPGresult = rb_define_class_under( rb_mPG, "Result", rb_cData
);
      |                                                                 ^~~~~~~~
pg_result.c:1590:65: note: each undeclared identifier is reported only once for
each function it appears in
pg_result.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been
intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have
been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may
have been intended to silence earlier diagnostics
make: *** [Makefile:248: pg_result.o] Error 1

make failed, exit code 2

See: brianmario/mysql2#980

Error messages:

Fetching mysql2 0.3.21
Installing mysql2 0.3.21 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

...

compiling client.c
client.c: In function ‘nogvl_read_query_result’:
client.c:439:3: error: unknown type name ‘my_bool’; did you mean ‘_Bool’?
  439 |   my_bool res = mysql_read_query_result(client);
      |   ^~~~~~~
      |   _Bool
client.c: In function ‘rb_query’:
…str_new2

See: https://status.heroku.com/incidents/1940

Engineers found that Ruby Private Space apps with pg gem 1.2.0 or above are affected. We would like to ask our customers to downgrade pg gem to 1.1.4 with editing the corresponding line in the Gemfile like

'pg', '~> 1.1.4'
@khiav223577 khiav223577 merged commit c2b0721 into master Aug 19, 2023
48 checks passed
@khiav223577 khiav223577 deleted the feature/support_ruby_3_0 branch August 19, 2023 11:56
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.

1 participant