You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the complete output of gem install or bundle install?
bundle
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using rake 13.0.3
Using concurrent-ruby 1.1.8
Using minitest 5.14.4
Using nio4r 2.5.7
Using zeitwerk 2.4.2
Using mini_mime 1.0.3
Using erubi 1.10.0
Using public_suffix 4.0.6
Using ruby2_keywords 0.0.4
Using net-ssh 6.1.0
Using alba 0.13.1
Using thread_safe 0.3.6
Using ast 2.4.2
Using geocoder 1.6.6
Using method_source 1.0.0
Using thor 1.1.0
Using bcrypt 3.1.16
Using bcrypt_pbkdf 1.1.0
Using bindex 0.8.1
Using msgpack 1.4.2
Using brakeman 4.10.1
Using bundler 2.2.15
Using cancancan 3.2.1
Using regexp_parser 2.1.1
Using capybara-choices 0.1.0
Using childprocess 3.0.0
Using choice 0.2.0
Using chronic 0.10.2
Using connection_pool 2.2.3
Using dead_end 1.1.6
Using orm_adapter 0.5.0
Using docile 1.3.5
Using unf_ext 0.0.7.7
Using racc 1.5.2
Using dotenv 2.7.6
Using dry-inflector 0.2.0
Using ice_nine 0.11.2
Using dry-transformer 0.1.1
Using ed25519 1.2.4
Using http-form_data 2.3.0
Using ffi 1.15.0
Using faraday-net_http 1.0.1
Using multipart-post 2.1.1
Using slop 4.8.2
Using systemu 2.6.5
Using rb-fsevent 0.10.4
Using maxminddb 0.1.22
Using mocha 1.12.0
Using nats-pure 0.6.2
Using pagy 4.1.0
Using parallel 1.20.1
Using pg 1.2.3
Using rexml 3.2.5
Using tilt 2.0.10
Using rainbow 3.0.0
Using redis 4.2.5
Using rubyzip 2.3.0
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.0.0
Using semantic_range 3.0.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.2
Using temple 0.8.2
Using smarter_csv 1.2.8
Using state_machine 1.2.0
Using state_machines 0.5.0
Using turbolinks-source 5.2.0
Using i18n 1.8.10
Using tzinfo 2.0.4
Using ruby_event_store 2.1.0
Using dry-core 0.5.0
Using minitest-retry 0.2.1
Using puma 5.2.2
Using mail 2.7.1
Using addressable 2.7.0
Using net-scp 3.0.0
Using marcel 1.0.1
Using bootsnap 1.7.3
Using bundler-audit 0.8.0
Using crass 1.0.6
Using mustermann 1.1.1
Using dry-equalizer 0.3.0
Using whenever 1.0.0
Using activesupport 6.1.3.1
Using aggregate_root 2.1.0
Using dry-configurable 0.12.1
Using dry-logic 1.1.0
Using rack 2.2.3
Using ffi-compiler 1.0.1
Using faraday 1.3.0
Using macaddr 1.7.2
Using rb-inotify 0.10.1
Using ruby-graphviz 1.2.5
Using selenium-webdriver 3.142.7
Using simplecov 0.21.2
Using slim 4.1.0
Using turbolinks 5.2.1
Using tzinfo-data 1.2021.1
Using validates_email_format_of 1.6.3
Using sshkit 1.21.2
Using launchy 2.5.0
Using globalid 0.4.2
Using activemodel 6.1.3.1
Using carmen 1.1.3
Using dry-monads 1.3.5
Using factory_bot 6.1.0
Using jbuilder 2.11.2
Using dry-container 0.7.2
Using builder 3.2.4
Using websocket-extensions 0.1.5
Using unf 0.1.4
Using mini_portile2 2.5.0
Using rack-test 1.1.0
Using websocket-driver 0.7.3
Using activejob 6.1.3.1
Using activerecord 6.1.3.1
Using airbrussh 1.4.0
Using warden 1.2.9
Using sshkit-interactive 0.3.0
Using domain_name 0.5.20190701
Using dry-types 1.5.1
Using http-parser 1.2.3
Using uuid 2.3.9
Using letter_opener 1.7.0
Using listen 3.5.1
Using request_store 1.5.0
Using rack-attack 6.5.0
Using rack-protection 2.1.0
Using rack-proxy 0.6.5
Using sentry-ruby-core 4.3.1
Using sidekiq 6.2.0
Using state_machines-activemodel 0.8.0
Using parser 3.0.1.0
Using arkency-command_bus 0.4.0
Fetching nokogiri 1.11.2
Using activerecord-import 1.0.8
Using ancestry 3.2.1
Using capistrano 3.16.0
Using dry-struct 1.4.0
Using http-cookie 1.0.3
Using rails-erd 1.6.1
Using sinatra 2.1.0
Using rubocop-ast 1.4.1
Using sentry-ruby 4.3.1
Using sentry-sidekiq 4.3.0
Using state_machines-activerecord 0.8.0
Using store_model 0.8.2
Using capistrano-bundler 2.0.1
Using capistrano-passenger 0.2.1
Using capistrano-rails 1.6.1
Using capistrano-shell 0.2.0
Using http 4.4.1
Using rails_event_store_active_record 2.1.0
Using elastic-apm 3.15.1
Using ruby_event_store-browser 2.1.0
Using rubocop 1.12.1
Using capistrano-rails-console 2.3.0
Using rails_event_store 2.1.0
Using rubocop-performance 1.10.2
Using rubocop-rails 2.9.1
Installing nokogiri 1.11.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/ext/nokogiri
~/.rubies/ruby-3.0.1/bin/ruby -I ~/.rubies/ruby-3.0.1/lib/ruby/3.0.0 -r ./siteconf20210407-43623-ylvto7.rb extconf.rb
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
checking for whether -Wno-error=unused-command-line-argument-hard-error-in-future is accepted as CFLAGS... no
Building nokogiri using packaged libraries.
Static linking is enabled.
Cross build is disabled.
checking for iconv.h... yes
checking for gzdopen() in -lz... yes
Using mini_portile version 2.5.0
checking for iconv... yes
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libxml2-2.9.10.
Configuration options: --host\=arm64-apple-darwin20 --enable-static --disable-shared --libdir\=~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/ports/arm64-apple-darwin20/libxml2/2.9.10/lib
--with-iconv\=yes --without-python --without-readline --with-c14n --with-debug --with-threads --disable-shared --enable-static RANLIB\=/usr/bin/ranlib AR\=/usr/bin/ar CFLAGS\=-O2\ -U_FORTIFY_SOURCE\ -g\
-fPIC
The following patches are being 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
- 0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch
- 0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch
- 0008-use-glibc-strlen.patch
- 0009-avoid-isnan-isinf.patch
- 0010-parser.c-shrink-the-input-buffer-when-appropriate.patch
The Nokogiri maintainers intend to provide timely security updates, but if
this is a concern for you and want to use your OS/distro system library
instead, then abort this installation process and install nokogiri as
instructed at:
https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries
Note, however, that nokogiri cannot guarantee compatiblity with every
version of libxml2 that may be 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 ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0002-Remove-script-macro-support.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0008-use-glibc-strlen.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0009-avoid-isnan-isinf.patch... OK
Running git apply with ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch... OK
Running 'configure' for libxml2 2.9.10... ERROR, review '~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2/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
--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=~/.rubies/ruby-3.0.1/bin/$(RUBY_BASE_NAME)
--help
--clean
--prevent-strip
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--enable-system-libraries
--disable-system-libraries
--use-system-libraries
--enable-static
--disable-static
--enable-cross-build
--disable-cross-build
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
~/.gem/ruby/3.0.1/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:405:in `block in execute': Failed to complete configure task (RuntimeError)
from ~/.gem/ruby/3.0.1/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:376:in `chdir'
from ~/.gem/ruby/3.0.1/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:376:in `execute'
from ~/.gem/ruby/3.0.1/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:110:in `configure'
from ~/.gem/ruby/3.0.1/gems/mini_portile2-2.5.0/lib/mini_portile2/mini_portile.rb:153:in `cook'
from extconf.rb:507:in `block (2 levels) in process_recipe'
from extconf.rb:290:in `block in chdir_for_build'
from extconf.rb:289:in `chdir'
from extconf.rb:289:in `chdir_for_build'
from extconf.rb:506:in `block in process_recipe'
from <internal:kernel>:90:in `tap'
from extconf.rb:409:in `process_recipe'
from extconf.rb:744:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
~/.gem/ruby/3.0.1/extensions/arm64-darwin-20/3.0.0/nokogiri-1.11.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in ~/.gem/ruby/3.0.1/gems/nokogiri-1.11.2 for inspection.
Results logged to ~/.gem/ruby/3.0.1/extensions/arm64-darwin-20/3.0.0/nokogiri-1.11.2/gem_make.out
An error occurred while installing nokogiri (1.11.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.11.2' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
actioncable was resolved to 6.1.3.1, which depends on
actionpack was resolved to 6.1.3.1, which depends on
actionview was resolved to 6.1.3.1, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
If installation failed during compilation, what are the complete contents of the mkmf.log file generated during the failed installation?
deepj
changed the title
[install] Installtion Nokogiri 1.11.2 fails on Apple M1 with Ruby 3.0.1
[install] Installation Nokogiri 1.11.2 fails on Apple M1 with Ruby 3.0.1
Apr 7, 2021
Hi @deepj, sorry you're having problems. I'll try to help.
As I mentioned in the other issue, your output tells me that the native (precompiled) gem isn't being installed. Instead, bundler is choosing the vanilla ruby platform gem and trying to compile it.
Compilation won't work on M1 until #2214 lands in a release (soon!). But let's look at why bundler isn't doing the right thing ...
Can you share your Gemfile.lock? Can you reproduce this with a simpler Gemfile (containing only Nokogiri)? Are you able to gem install nokogiri (that is, does gem install choose the right native platform gem)?
@flavorjones Hello. Please, don't apologize. I noticed Nokogiri 1.11.3 has been released and it looks it solves the problem. now
Fetching nokogiri 1.11.3 (arm64-darwin)
Using activerecord-import 1.0.8
Using ancestry 3.2.1
Using rubocop-performance 1.10.2
Using capistrano 3.16.0
Using rubocop-rails 2.9.1
Using state_machines-activerecord 0.8.0
Using store_model 0.8.2
Using elastic-apm 3.15.1
Using rails-erd 1.6.1
Using rails_event_store_active_record 2.1.0
Using capistrano-passenger 0.2.1
Using capistrano-rails-console 2.3.0
Using capistrano-shell 0.2.0
Using capistrano-bundler 2.0.1
Using capistrano-rails 1.6.1
Using rails_event_store 2.1.0
Installing alba 1.0.0
Installing sentry-ruby-core 4.3.2
Installing sidekiq 6.2.1
Using sentry-sidekiq 4.3.0
Fetching sentry-ruby 4.3.2
Installing sentry-ruby 4.3.2
Installing nokogiri 1.11.3 (arm64-darwin)
Have you read and followed the installation tutorial at http://www.nokogiri.org/tutorials/installing_nokogiri.html?
What is the complete output of
gem install
orbundle install
?If installation failed during compilation, what are the complete contents of the
mkmf.log
file generated during the failed installation?Tell us about your system!
If you're using Bundler:
bundle version
?bundle config
? (Take care to redact any credentials)There is no issue with Ruby 3.0.0 on the same system and setup. Both Ruby are installed via
ruby-build
.The text was updated successfully, but these errors were encountered: