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 Ruby 3.1 compatibility #109

Merged
merged 3 commits into from
May 4, 2022
Merged

Conversation

casperisfine
Copy link
Contributor

Fix: #108

The allocator function need to be explictly defined.

@malmckay

cc @peterzhu2118: would love if you could give this a quick look.

The allocator function need to be explictly defined.
@malmckay malmckay self-requested a review May 3, 2022 00:47
@malmckay malmckay removed their request for review May 3, 2022 01:10
@malmckay malmckay mentioned this pull request May 3, 2022
Copy link
Member

@malmckay malmckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for tracking this down.

@casperisfine
Copy link
Contributor Author

Welcome. Not too sure what's wrong with the 3.1/macOS CI:

test -z "/Users/runner/work/zookeeper/zookeeper/ext/bin" || /Users/runner/work/zookeeper/zookeeper/ext/zkc-3.4.5/c/install-sh -d "/Users/runner/work/zookeeper/zookeeper/ext/bin"
  /bin/sh ./libtool --mode=install /usr/bin/install -c 'cli_st' '/Users/runner/work/zookeeper/zookeeper/ext/bin/cli_st'
/usr/bin/install -c .libs/cli_st /Users/runner/work/zookeeper/zookeeper/ext/bin/cli_st
  /bin/sh ./libtool --mode=install /usr/bin/install -c 'cli_mt' '/Users/runner/work/zookeeper/zookeeper/ext/bin/cli_mt'
/usr/bin/install -c .libs/cli_mt /Users/runner/work/zookeeper/zookeeper/ext/bin/cli_mt
  /bin/sh ./libtool --mode=install /usr/bin/install -c 'load_gen' '/Users/runner/work/zookeeper/zookeeper/ext/bin/load_gen'
/usr/bin/install -c .libs/load_gen /Users/runner/work/zookeeper/zookeeper/ext/bin/load_gen
test -z "/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper" || /Users/runner/work/zookeeper/zookeeper/ext/zkc-3.4.5/c/install-sh -d "/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper"
 /usr/bin/install -c -m 644 'include/zookeeper.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/zookeeper.h'
 /usr/bin/install -c -m 644 'include/zookeeper_version.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/zookeeper_version.h'
 /usr/bin/install -c -m 644 'include/zookeeper_log.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/zookeeper_log.h'
 /usr/bin/install -c -m 644 'include/proto.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/proto.h'
 /usr/bin/install -c -m 644 'include/recordio.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/recordio.h'
 /usr/bin/install -c -m 644 'generated/zookeeper.jute.h' '/Users/runner/work/zookeeper/zookeeper/ext/include/zookeeper/zookeeper.jute.h'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
checking for rb_thread_blocking_region()... 
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/runner/hostedtoolcache/Ruby/3.1.2/x64/bin/$(RUBY_BASE_NAME)
/Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:498:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:591:in `try_link0'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:609:in `try_link'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:830:in `try_func'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:1119:in `block in have_func'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:1007:in `block in checking_for'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:362:in `block (2 levels) in postpone'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:332:in `open'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:362:in `block in postpone'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:332:in `open'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:358:in `postpone'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:1006:in `checking_for'
	from /Users/runner/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/3.1.0/mkmf.rb:1118:in `have_func'
	from extconf.rb:98:in `<main>'
rake aborted!

It works fine on my machine :/

@malmckay malmckay merged commit b43abf8 into zk-ruby:master May 4, 2022
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.

3 participants