zk-ruby / zookeeper

Zookeeper bindings for Ruby
MIT License
148 stars 75 forks source link

Failure to build zookeeper gem's native extension on linux-aarch64 #104

Closed patcable closed 3 years ago

patcable commented 3 years ago

Out of the box, the zkc extension won't build on arm64/aarch64 hosts. The error I get is:

checking build system type... ./config.guess: unable to guess system type

This script, last modified 2005-07-08, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
and
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

Replacing the config.guess and config.sub files from the URLs mentioned solved the problem and I could compile the native library.

At one point I remember v1.4.11 not building at all on arm64 even after replacing config.{guess,sub} but it seems like that must have been fixed in a patch for 1.5.0. The error I got was the same one mentioned in ZOOKEEPER-1374.

malmckay commented 3 years ago

@patcable Thanks for the report. Would you mind testing this PR → https://github.com/zk-ruby/zookeeper/pull/103 ?

You should be able to test by specifying the branch in your Gemfile:

gem 'zookeeper', git: 'https://github.com/zk-ruby/zookeeper.git', branch: 'mmckay/update_config.guess'
patcable commented 3 years ago

@malmckay looks like it worked -- Bundle complete! 1 Gemfile dependency, 2 gems now installed.

I ran this on a Ubuntu 20.04.1 box:

Linux i-03e55cca18dba71ea 5.8.0-1038-aws #40~20.04.1-Ubuntu SMP Thu Jun 17 13:20:15 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
malmckay commented 3 years ago

This is fixed in #105