Recent searches


No recent searches

Failed to install ZAT - nokogiri

Answered


Posted Jul 21, 2021

Hi,

I am attempting to install ZAT by following the steps here: https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/installing-and-using-the-zendesk-apps-tools/

I am installing on a Macbook Pro 2020 (w/ M1 chip) - I am installing against an alternate version of Ruby from the system default (v3.0.2). The latest version of xCode CLI is also installed.

However, ZAT is failing to install, when it reaches the nokogiri gem - the error I am getting is:

gem install zendesk_apps_tools
Building native extensions. This could take a while...
ERROR: Error installing zendesk_apps_tools:
ERROR: Failed to build gem native extension.

current directory: /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/ext/nokogiri
/Users/sf/.rubies/ruby-3.0.2/bin/ruby -I /Users/sf/.rubies/ruby-3.0.2/lib/ruby/3.0.0 -r ./siteconf20210721-66094-ahrd7y.rb extconf.rb
checking if the C compiler accepts -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for iconv.h... yes
checking for gzdopen() in -lz... yes
checking for iconv using --with-opt-* flags... yes
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
- 0002-Remove-script-macro-support.patch
- 0003-Update-entities-to-remove-handling-of-ssi.patch
- 0004-libxml2.la-is-in-top_builddir.patch
- 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch

Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:

gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]

If you are using Bundler, tell it to use the option:

bundle config build.nokogiri --use-system-libraries
bundle install

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into tmp/arm64-apple-darwin20/ports/libxml2/2.9.10... OK
Running git apply with /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK
Running git apply with /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/patches/libxml2/0002-Remove-script-macro-support.patch... OK
Running git apply with /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK
Running git apply with /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK
Running git apply with /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch... OK
Running 'configure' for libxml2 2.9.10... ERROR, review '/Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10/ext/nokogiri/tmp/arm64-apple-darwin20/ports/libxml2/2.9.10/configure.log' to see what happened. Last lines are:
========================================================================
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... arm-apple-darwin20.3.0
checking host system type... Invalid configuration `arm64-apple-darwin20': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20 failed
========================================================================
*** 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
need configuration options.

Provided configuration options:
--with-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/sf/.rubies/ruby-3.0.2/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
/Users/sf/.gem/ruby/3.0.2/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:402:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/sf/.gem/ruby/3.0.2/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in `chdir'
from /Users/sf/.gem/ruby/3.0.2/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in `execute'
from /Users/sf/.gem/ruby/3.0.2/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:110:in `configure'
from /Users/sf/.gem/ruby/3.0.2/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:153:in `cook'
from extconf.rb:365:in `block (2 levels) in process_recipe'
from extconf.rb:257:in `block in chdir_for_build'
from extconf.rb:256:in `chdir'
from extconf.rb:256:in `chdir_for_build'
from extconf.rb:364:in `block in process_recipe'
from <internal:kernel>:90:in `tap'
from extconf.rb:262:in `process_recipe'
from extconf.rb:557:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/sf/.gem/ruby/3.0.2/extensions/arm64-darwin-20/3.0.0-static/nokogiri-1.10.10/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/sf/.gem/ruby/3.0.2/gems/nokogiri-1.10.10 for inspection.
Results logged to /Users/sf/.gem/ruby/3.0.2/extensions/arm64-darwin-20/3.0.0-static/nokogiri-1.10.10/gem_make.out

I can install the latest version of nokogiri (1.11.7 arm64-darwin), however the version being installed via ZAT is 1.10.10. If I attempt to install that gem directly, I get the same error.

Any assistance on getting this working, would be greatly appreciated.

Best regards,
Stephen


0

2

2 comments

image avatar

Chris Sos

Zendesk Product Manager

Hi Stephen,

Sorry to hear about issues with ZAT on M1 Macs. Currently, ZAT does have some issues with the native versions of Ruby installed on MacOS.

To get around painful Ruby environment set up, I would suggest taking a look at ZCLI. ZCLI is ZAT's successor and is built on NodeJS rather than Ruby. This should also be a straightforward install and work better than ZAT did.

Let me know how you go.

Chris

 

1


Hi Chris,

Thank you for that - it was significantly less challenging to install. :)

All sorted now, thanks!

Best regards,
Stephen

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post