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
Gem installation fails for me starting from 1.8.3. I started to check commits and this is what I found:
When I'm on b5b97bcbundle exec rake succeeds.
When I'm on 77be60cbundle exec rake fails.
Making following change on the latest master fixes the issue:
diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb
index 1b0ca4ed..ae89b019 100644
--- a/ext/nokogiri/extconf.rb+++ b/ext/nokogiri/extconf.rb@@ -434,7 +434,7 @@ end
if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
$CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
- $CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wextra -Wmissing-noreturn -Winline"+ $CFLAGS << " -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline"
end
case
My setup:
macOS 10.13.6
Xcode 9.4.1
homebrew latest version
libxml2: stable 2.9.7 (bottled) – FORCE LINKED
libxslt: stable 1.1.32 – FORCE LINKED
brew link libxml2 libxslt --force
My $CPPFLAGS env variable: -I/opt/brew/include
My $LDFLAGS env variable: -L/opt/brew/lib
My $NOKOGIRI_USE_SYSTEM_LIBRARIES env variable: Y
Rake log:
$ bundle exec rake
cd tmp/x86_64-darwin17/nokogiri/2.5.1
/Users/ilarionov/.rvm/rubies/ruby-2.5.1/bin/ruby -I. ../../../../ext/nokogiri/extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using system libraries.
pkg-config could not be used to find libxml-2.0
Please install either `pkg-config` or the pkg-config gem per
gem install pkg-config -v "~> 1.1"
pkg-config could not be used to find libxslt
Please install either `pkg-config` or the pkg-config gem per
gem install pkg-config -v "~> 1.1"
pkg-config could not be used to find libexslt
Please install either `pkg-config` or the pkg-config gem per
gem install pkg-config -v "~> 1.1"
ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
rake aborted!
Command failed with status (1): [/Users/ilarionov/.rvm/rubies/ruby-2.5.1/bi...]
/Users/ilarionov/workspace/devel/nokogiri/.bundle/vendor/ruby/2.5.0/gems/rake-compiler-1.0.4/lib/rake/extensiontask.rb:205:in `block (2 levels) in define_compile_tasks'
/Users/ilarionov/workspace/devel/nokogiri/.bundle/vendor/ruby/2.5.0/gems/rake-compiler-1.0.4/lib/rake/extensiontask.rb:202:in `block in define_compile_tasks'
/Users/ilarionov/workspace/devel/nokogiri/.bundle/vendor/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `load'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:28:in `run'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli.rb:424:in `exec'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli.rb:27:in `dispatch'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/cli.rb:18:in `start'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/exe/bundle:30:in `block in <top (required)>'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `<main>'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
/Users/ilarionov/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => default => test => compile => compile:x86_64-darwin17 => compile:nokogiri:x86_64-darwin17 => copy:nokogiri:x86_64-darwin17:2.5.1 => tmp/x86_64-darwin17/nokogiri/2.5.1/nokogiri.bundle => tmp/x86_64-darwin17/nokogiri/2.5.1/Makefile
(See full trace by running task with --trace)
Gem installation fails for me starting from 1.8.3. I started to check commits and this is what I found:
When I'm on b5b97bc
bundle exec rake
succeeds.When I'm on 77be60c
bundle exec rake
fails.Making following change on the latest master fixes the issue:
My setup:
brew link libxml2 libxslt --force
$CPPFLAGS
env variable:-I/opt/brew/include
$LDFLAGS
env variable:-L/opt/brew/lib
$NOKOGIRI_USE_SYSTEM_LIBRARIES
env variable:Y
Rake log:
pkg_config output:
Attached
mkmf.log
when trying to install 1.8.4 using rubygems:mkmf.log
The text was updated successfully, but these errors were encountered: