Impossible to install nokogiri in windows, libiconv problem

5,606 views
Skip to first unread message

guillaum...@gmail.com

unread,
Sep 5, 2014, 4:24:30 AM9/5/14
to nokogi...@googlegroups.com
Hi,

I try to install nokogiri on windows computer with ruby 2.0, and I had this result:

Extracting libiconv-1.14.tar.gz into tmp/i686-pc-mingw32/ports/libiconv/1.14... OK
Running 'configure' for libiconv 1.14... ERROR, review 'tmp/i686-pc-mingw32/ports/libiconv/1.14/configure.log' to see what happened.
*** 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=C:/Ruby200/bin/ruby
        --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
C:/Ruby200/lib/ruby/gems/2.0.0/gems/mini_portile-0.6.0/lib/mini_portile.rb:279:in `block in execute': Failed to complete configure task (RuntimeError)
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mini_portile-0.6.0/lib/mini_portile.rb:271:in `chdir'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mini_portile-0.6.0/lib/mini_portile.rb:271:in `execute'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mini_portile-0.6.0/lib/mini_portile.rb:66:in `configure'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mini_portile-0.6.0/lib/mini_portile.rb:109:in `cook'
        from extconf.rb:253:in `block in process_recipe'
        from extconf.rb:154:in `tap'
        from extconf.rb:154:in `process_recipe'
        from extconf.rb:412:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.3.1 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/nokogiri-1.6.3.1/gem_make.out

In configure.log I have this message:
configure: error: invalid variable name: `CPPFLAGS\'

I don't understand because I tried in an other windows computer (with ruby 1.9.3) and I had no problem.

Any idea?

Thanks,
Guillaume CAPLAIN

Mike Dalessio

unread,
Sep 8, 2014, 8:03:10 AM9/8/14
to nokogiri-talk

Hi,

There is a Windows version of the gem that contains prebuilt DLLs. Please make sure you are downloading the gem that is appropriate for your platform, as the one you are installing is not the Windows build.

Thanks for using Nokogiri,
-m

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.
To post to this group, send email to nokogi...@googlegroups.com.
Visit this group at http://groups.google.com/group/nokogiri-talk.
For more options, visit https://groups.google.com/d/optout.

Xtra Coder

unread,
Oct 1, 2014, 2:15:52 PM10/1/14
to nokogi...@googlegroups.com
I have that same problem trying to install Nokogiri on windows and ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32].

Step to reproduce:
- install devkit: http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe and run 'ruby dk.rb init' + 'ruby dk.rb install' there
- in ruby, run 'gem install nokogiri'

for some reason 'prebuilt' version of nokogiri is not used and it tried to be built during installation - that fails (symptoms are the same as in first message for ruby 2.0). The same 'gem install' for 'ruby 2.0.0p576 (2014-09-19) [i386-mingw32]' downloads prebuilt version and output is following:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Fetching: mini_portile-0.6.0.gem (100%)
Successfully installed mini_portile-0.6.0
Fetching: nokogiri-1.6.3.1-x86-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.8.0, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
Successfully installed nokogiri-1.6.3.1-x86-mingw32
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

I have no idea why prebuilt version is not used with 2.1.3, but i'd like to know why and how to install nokogiri with 2.1.3 ...

Mike Dalessio

unread,
Nov 26, 2014, 5:36:05 PM11/26/14
to nokogi...@googlegroups.com
Hi,
Team Nokogiri does not support compiling Nokogiri on Windows. Instead, we helpfully provide Windows platform gems that contain pre-built DLLs for your XMLifying pleasure.

Is there a specific reason the Windows gems do not meet your needs? I'm not sure I completely understand your comments, but am I correct in concluding that either the `gem` CLI or `bundler` is not grabbing a Windows gem automatically for you? If so, can you reply with your gem environment (output from `gem env`)?

Thanks,
-m

Daniel Mueller

unread,
Dec 10, 2014, 5:41:52 AM12/10/14
to nokogi...@googlegroups.com
Hey 

I have the same issue. 


Extracting libiconv-1.14.tar.gz into tmp/i686-pc-mingw32/ports/libiconv/1.14...
OK
Running 'configure' for libiconv 1.14... ERROR, review 'C:/RailsInstaller/Ruby2.
1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.5/ext/nokogiri/tmp/i686-pc-mingw32/por
ts/libiconv/1.14/configure.log' to see what happened.
*** 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=C:/RailsInstaller/Ruby2.1.0/bin/ruby
        --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
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/mini_portile-0.6.1/lib/mini
_portile.rb:279:in `block in execute': Failed to complete configure task (Runtim
eError)
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/mini_portile-0
.6.1/lib/mini_portile.rb:271:in `chdir'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/mini_portile-0
.6.1/lib/mini_portile.rb:271:in `execute'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/mini_portile-0
.6.1/lib/mini_portile.rb:66:in `configure'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/mini_portile-0
.6.1/lib/mini_portile.rb:109:in `cook'
        from extconf.rb:268:in `block in process_recipe'
        from extconf.rb:167:in `tap'
        from extconf.rb:167:in `process_recipe'
        from extconf.rb:429:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1
.0/gems/nokogiri-1.6.5 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86
-mingw32/2.1.0/nokogiri-1.6.5/gem_make.out

-----------

Error log is identical to the one of Guillaume CAPLAIN. 
Any suggestion what I could do to get it running?

Thanks

Regards

Daniel

Mark Thomas

unread,
Dec 29, 2014, 10:24:22 AM12/29/14
to nokogi...@googlegroups.com
It does appear to be the case that a pre-built binary is not being selected; it tries to compile and fails.

I have Windows 8.1, fresh install of RailsInstaller (Ruby 2.1.5 + devkit). `gem env` output:

C:\Sites>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.3
  - RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby2.1.0/bin
  - SPEC CACHE DIRECTORY: C:/Users/mark/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0
     - C:/Users/mark/.gem/ruby/2.1.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
  - SHELL PATH:
     - C:\RailsInstaller\Git\cmd
     - C:\RailsInstaller\Ruby2.1.0\bin
     - C:\RailsInstaller\Ruby2.1.0\lib\ruby\gems\1.9.1\bin
     - C:\RailsInstaller\DevKit\bin
     - C:\Program Files (x86)\Google\Chrome\Application
     - C:\apps\pik\
     - c:\Program Files (x86)\Intel\iCLS Client\
     - c:\Program Files\Intel\iCLS Client\
     - C:\WINDOWS\system32
     - C:\WINDOWS
     - C:\WINDOWS\System32\Wbem
     - C:\WINDOWS\System32\WindowsPowerShell\v1.0\
     - C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
     - C:\Program Files (x86)\Windows Live\Shared
     - c:\apps\bin
     - C:\Program Files\nodejs\
     - C:\ruby\Ruby21\bin
     - C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\bin
     - C:\RailsInstaller\DevKit\bin
     - C:\apps\pik\
     - c:\Program Files (x86)\Intel\iCLS Client\
     - c:\Program Files\Intel\iCLS Client\
     - C:\Windows\system32
     - C:\Windows
     - C:\Windows\System32\Wbem
     - C:\Windows\System32\WindowsPowerShell\v1.0\
     - C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
     - C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
     - C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
     - C:\Program Files (x86)\Windows Live\Shared
     - c:\apps\bin
     - C:\ruby\bin
     - C:\Users\mark\AppData\Roaming\npm

C:\Sites>

MrPaul

unread,
Jan 14, 2015, 4:03:35 PM1/14/15
to nokogi...@googlegroups.com
I am having the same problem.  I am on a brand-new Ruby 2.1.5 installation on Win64.  I have tried with and without the devkit, and nokogiri won't install.  here is what I did:
1. Install Ruby
2. download and install the rubygems update to address certificate issues per http://help.rubygems.org/discussions/problems/19586-gem-install-gets-certificate-error
3. uninstall rubygems-update
4. install nokogiri

Here are my results without the devkit (right after the ruby install):

H:>ruby --version
ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]

H:>gem install --local e:\downloads\ruby\rubygems-update-2.2.3.gem
Successfully installed rubygems-update-2.2.3
Parsing documentation for rubygems-update-2.2.3
Installing ri documentation for rubygems-update-2.2.3
Done installing documentation for rubygems-update after 0 seconds
1 gem installed

H:>gem update --system
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/spec
s.4.8.gz)

H:>update_rubygems --no-ri --no-rdoc
RubyGems 2.2.3 installed

=== 2.2.2 / 2014-02-05

Bug fixes:

* Fixed ruby tests when BASERUBY is not set.  Patch for #778 by Nobuyoshi
  Nakada.
* Removed double requests in RemoteFetcher#cache_update_path to improve remote
  install speed.  Pull request #772 by Charlie Somerville.
* The mkmf.log is now placed next to gem_make.out when building extensions.
* `gem install -g --local` no longer accesses the network.  Bug #776 by Jeremy
  Evans.
* RubyGems now correctly handles URL passwords with encoded characters.  Pull
  request #781 by Brian Fletcher.
* RubyGems now correctly escapes URL characters.  Pull request #788 by Brian
  Fletcher.
* RubyGems can now unpack tar files where the type flag is not given.  Pull
  request #790 by Cody Russell.
* Typo corrections.  Pull request ruby/ruby#506 by windwiny.
* RubyGems now uses both the default certificates and ssl_ca_cert instead of
  one or the other.  Pull request #795 by zebardy.
* RubyGems can now use the bundler API against hosted gem servers in a
  directory.  Pull request #801 by Brian Fletcher.
* RubyGems bin stubs now ignore non-versions.  This allows RubyGems bin stubs
  to list file names like "_foo_".  Issue #799 by Postmodern.
* Restored behavior of Gem::Version::new when subclassed.  Issue #805 by
  Sergio Rubio.


------------------------------------------------------------------------------

RubyGems installed the following executables:
        e:/Ruby21-x64/bin/gem


H:>gem --version
2.2.3

H:>gen uninstall rubygems-update -x
'gen' is not recognized as an internal or external command,
operable program or batch file.

H:>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.2.3

H:>gem install nokogiri
Fetching: mini_portile-0.6.2.gem (100%)
Successfully installed mini_portile-0.6.2
Fetching: nokogiri-1.6.5.gem (100%)
ERROR:  Error installing nokogiri:
        The 'nokogiri' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

H:>gem li nokogiri -r

*** REMOTE GEMS ***

backupify-rsolr-nokogiri (0.12.1.1)
epp-nokogiri (1.0.0)
glebm-nokogiri (1.4.2.1)
jwagener-nokogiri (1.4.1)
nokogiri (1.6.5 ruby java x64-mingw32 x86-mingw32, 1.6.1 x86-mswin32-60, 1.4.4.1 x86-mswin32)
nokogiri-diff (0.2.0)
nokogiri-fitzsimmons (1.5.5.3 ruby java)
nokogiri-happymapper (0.5.9)
nokogiri-happymapper-deiga (0.5.10)
nokogiri-maglev- (1.5.5.20120817130721)
nokogiri-maven (1.5.0 java)
nokogiri-plist (0.5.0)
nokogiri-pretty (0.1.0)
nokogiri-streaming-reader (0.0.3)
nokogiri-styles (0.1.2)
nokogiri-xmlsec (0.0.4)
nokogiri-xmlsec-me-harder (0.9.1)
nokogiri-xmlsec1 (0.0.9)
nokogiri_bang_finders (1.0.0)
nokogiri_helper (0.0.1)
nokogiri_html_helpers (0.1.4)
nokogiri_truncate_html (0.0.4)
rack-nokogiri (0.1.0)
revo-nokogiri (1.4.1 java)
rsolr-nokogiri (0.0.0)
rss-nokogiri (0.0.1.1)
rubyjedi-nokogiri_java (1.4.0.20100513161003 java)
sax-machine-nokogiri-1.4.4-safe (0.0.15)
spp_nokogiri_ext (0.0.5)
superfeedr-nokogiri (1.4.0.20091116183308)
tenderlove-nokogiri (0.0.0.20081001111445, 0.0.0 x86-mswin32-60)
watir-nokogiri (1.0.0)

H:>>gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.3
  - RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x64-mingw32]
  - INSTALLATION DIRECTORY: e:/Ruby21-x64/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: e:/Ruby21-x64/bin/ruby.exe
  - EXECUTABLE DIRECTORY: e:/Ruby21-x64/bin
  - SPEC CACHE DIRECTORY: C:/Users/mrpaul/.gem/specs

  - RUBYGEMS PLATFORMS:
    - ruby
    - x64-mingw32
  - GEM PATHS:
     - e:/Ruby21-x64/lib/ruby/gems/2.1.0
     - C:/Users/mrpaul/.gem/ruby/2.1.0

  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - C:\WINDOWS\system32
     - C:\WINDOWS
     - C:\WINDOWS\System32\Wbem
     - C:\WINDOWS\System32\WindowsPowerShell\v1.0\
     - C:\WINDOWS\idmu\common
     - C:\Program Files\Windows Imaging\
     - C:\Program Files (x86)\QuickTime\QTSystem\
     - C:\Microsoft SQL Server Migration Assistant for Access\bin\
     - e:\Ruby21-x64\bin

Any thoughts on why I am not getting the compiled gem?

Mike Dalessio

unread,
Jan 18, 2015, 3:09:57 PM1/18/15
to nokogiri-talk
Hi all,

I've reproduced this on my own Windows 8.1 system:

```
C:\Users\miked>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.3
  - RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x64-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby21-x64/lib/ruby/gems/2.1.0
  - RUBY EXECUTABLE: C:/Ruby21-x64/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby21-x64/bin
  - SPEC CACHE DIRECTORY: C:/Users/miked/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x64-mingw32
  - GEM PATHS:
     - C:/Ruby21-x64/lib/ruby/gems/2.1.0
     - C:/Users/miked/.gem/ruby/2.1.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
  - SHELL PATH:
     - C:\Ruby21-x64\bin
     - C:\Windows\system32
     - C:\Windows
     - C:\Windows\System32\Wbem
     - C:\Windows\System32\WindowsPowerShell\v1.0\
ERROR:  Error installing nokogiri:
        The 'nokogiri' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions

```

I'll keep digging, but at this point I'd guess it's likely to be a rubygems issue and not a Nokogiri issue.


Mike Dalessio

unread,
Jan 18, 2015, 3:46:16 PM1/18/15
to nokogiri-talk
Ah ha -- this is an issue in Rubygems 2.2.3, as I demonstrated above. But when I upgrade to Rubygems 2.4.5 this problem goes away.

I haven't bothered to figure out what versions of Rubygems are good and bad, but please try upgrading to 2.4.5 and that should work.

Cheers,
-m

Mike Dalessio

unread,
Jan 18, 2015, 4:24:53 PM1/18/15
to nokogiri-talk
I've updated the installation tutorials page for Windows with this information:


-m

MrPaul

unread,
Jan 21, 2015, 2:16:57 PM1/21/15
to nokogi...@googlegroups.com
Thanks Mike!  That did the trick. Man, I spent way too long pounding my head against the wall on this one...

Gabriel Nongsiej

unread,
Nov 10, 2015, 10:12:53 PM11/10/15
to nokogiri-talk
I tried this. My rubygems is already at the latest version. But I'm still getting an error. It's saying that CPPFLAGS is not a valid flag.

Mike Dalessio

unread,
Nov 10, 2015, 10:27:08 PM11/10/15
to nokogiri-talk

Hi,

Thanks for asking this question.

I'm obligated to point out, though, that  you're replying to a 10-month-old thread without any information that might help someone reproduce and diagnose the issue you're seeing.

Let's start with: What's the error you're seeing?

On Nov 10, 2015 10:12 PM, "Gabriel Nongsiej" <jus4m...@gmail.com> wrote:
I tried this. My rubygems is already at the latest version. But I'm still getting an error. It's saying that CPPFLAGS is not a valid flag.

--

Gabriel Nongsiej

unread,
Nov 13, 2015, 7:15:41 AM11/13/15
to nokogiri-talk
Hi Mike,

Sorry for that. I just thought it would be easier to comment here since the problem is similar.
So I run 
gem install nokogiri
to install nokogiri on Windows as specified in the link. I am getting the following trace:

    current directory: C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2/ext/
nokogiri
C:/Ruby193/bin/ruby.exe -r ./siteconf20151113-752-1ppngjf.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of zlib-1.2.8.

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
************************************************************************
Downloading zlib-1.2.8.tar.gz
Downloading zlib-1.2.8.tar.gz (  2%)
Downloading zlib-1.2.8.tar.gz (  5%)
Downloading zlib-1.2.8.tar.gz (  8%)
Downloading zlib-1.2.8.tar.gz ( 11%)
Downloading zlib-1.2.8.tar.gz ( 14%)
Downloading zlib-1.2.8.tar.gz ( 17%)
Downloading zlib-1.2.8.tar.gz ( 20%)
Downloading zlib-1.2.8.tar.gz ( 22%)
Downloading zlib-1.2.8.tar.gz ( 23%)
Downloading zlib-1.2.8.tar.gz ( 26%)
Downloading zlib-1.2.8.tar.gz ( 29%)
Downloading zlib-1.2.8.tar.gz ( 32%)
Downloading zlib-1.2.8.tar.gz ( 35%)
Downloading zlib-1.2.8.tar.gz ( 38%)
Downloading zlib-1.2.8.tar.gz ( 40%)
Downloading zlib-1.2.8.tar.gz ( 43%)
Downloading zlib-1.2.8.tar.gz ( 46%)
Downloading zlib-1.2.8.tar.gz ( 49%)
Downloading zlib-1.2.8.tar.gz ( 50%)
Downloading zlib-1.2.8.tar.gz ( 53%)
Downloading zlib-1.2.8.tar.gz ( 55%)
Downloading zlib-1.2.8.tar.gz ( 58%)
Downloading zlib-1.2.8.tar.gz ( 61%)
Downloading zlib-1.2.8.tar.gz ( 64%)
Downloading zlib-1.2.8.tar.gz ( 67%)
Downloading zlib-1.2.8.tar.gz ( 70%)
Downloading zlib-1.2.8.tar.gz ( 73%)
Downloading zlib-1.2.8.tar.gz ( 76%)
Downloading zlib-1.2.8.tar.gz ( 79%)
Downloading zlib-1.2.8.tar.gz ( 82%)
Downloading zlib-1.2.8.tar.gz ( 84%)
Downloading zlib-1.2.8.tar.gz ( 87%)
Downloading zlib-1.2.8.tar.gz ( 90%)
Downloading zlib-1.2.8.tar.gz ( 93%)
Downloading zlib-1.2.8.tar.gz ( 96%)
Downloading zlib-1.2.8.tar.gz ( 99%)
Downloading zlib-1.2.8.tar.gz (100%)
Extracting zlib-1.2.8.tar.gz into tmp/i686-pc-mingw32/ports/zlib/1.2.8... OK
Running 'compile' for zlib 1.2.8... OK
Running 'install' for zlib 1.2.8... OK
Activating zlib 1.2.8 (from C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.6.2
/ports/i686-pc-mingw32/zlib/1.2.8)...
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libiconv-1.14.

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
************************************************************************
Downloading libiconv-1.14.tar.gz
Downloading libiconv-1.14.tar.gz (  1%)
Downloading libiconv-1.14.tar.gz (  2%)
Downloading libiconv-1.14.tar.gz (  3%)
Downloading libiconv-1.14.tar.gz (  4%)
Downloading libiconv-1.14.tar.gz (  5%)
Downloading libiconv-1.14.tar.gz (  6%)
Downloading libiconv-1.14.tar.gz (  7%)
Downloading libiconv-1.14.tar.gz (  8%)
Downloading libiconv-1.14.tar.gz (  9%)
Downloading libiconv-1.14.tar.gz ( 10%)
Downloading libiconv-1.14.tar.gz ( 11%)
Downloading libiconv-1.14.tar.gz ( 12%)
Downloading libiconv-1.14.tar.gz ( 13%)
Downloading libiconv-1.14.tar.gz ( 14%)
Downloading libiconv-1.14.tar.gz ( 15%)
Downloading libiconv-1.14.tar.gz ( 16%)
Downloading libiconv-1.14.tar.gz ( 17%)
Downloading libiconv-1.14.tar.gz ( 18%)
Downloading libiconv-1.14.tar.gz ( 19%)
Downloading libiconv-1.14.tar.gz ( 20%)
Downloading libiconv-1.14.tar.gz ( 21%)
Downloading libiconv-1.14.tar.gz ( 22%)
Downloading libiconv-1.14.tar.gz ( 23%)
Downloading libiconv-1.14.tar.gz ( 24%)
Downloading libiconv-1.14.tar.gz ( 25%)
Downloading libiconv-1.14.tar.gz ( 26%)
Downloading libiconv-1.14.tar.gz ( 27%)
Downloading libiconv-1.14.tar.gz ( 28%)
Downloading libiconv-1.14.tar.gz ( 29%)
Downloading libiconv-1.14.tar.gz ( 30%)
Downloading libiconv-1.14.tar.gz ( 31%)
Downloading libiconv-1.14.tar.gz ( 32%)
Downloading libiconv-1.14.tar.gz ( 33%)
Downloading libiconv-1.14.tar.gz ( 34%)
Downloading libiconv-1.14.tar.gz ( 35%)
Downloading libiconv-1.14.tar.gz ( 36%)
Downloading libiconv-1.14.tar.gz ( 37%)
Downloading libiconv-1.14.tar.gz ( 38%)
Downloading libiconv-1.14.tar.gz ( 39%)
Downloading libiconv-1.14.tar.gz ( 40%)
Downloading libiconv-1.14.tar.gz ( 41%)
Downloading libiconv-1.14.tar.gz ( 42%)
Downloading libiconv-1.14.tar.gz ( 43%)
Downloading libiconv-1.14.tar.gz ( 44%)
Downloading libiconv-1.14.tar.gz ( 45%)
Downloading libiconv-1.14.tar.gz ( 46%)
Downloading libiconv-1.14.tar.gz ( 47%)
Downloading libiconv-1.14.tar.gz ( 48%)
Downloading libiconv-1.14.tar.gz ( 49%)
Downloading libiconv-1.14.tar.gz ( 50%)
Downloading libiconv-1.14.tar.gz ( 51%)
Downloading libiconv-1.14.tar.gz ( 52%)
Downloading libiconv-1.14.tar.gz ( 53%)
Downloading libiconv-1.14.tar.gz ( 54%)
Downloading libiconv-1.14.tar.gz ( 55%)
Downloading libiconv-1.14.tar.gz ( 56%)
Downloading libiconv-1.14.tar.gz ( 57%)
Downloading libiconv-1.14.tar.gz ( 58%)
Downloading libiconv-1.14.tar.gz ( 59%)
Downloading libiconv-1.14.tar.gz ( 60%)
Downloading libiconv-1.14.tar.gz ( 61%)
Downloading libiconv-1.14.tar.gz ( 62%)
Downloading libiconv-1.14.tar.gz ( 63%)
Downloading libiconv-1.14.tar.gz ( 64%)
Downloading libiconv-1.14.tar.gz ( 65%)
Downloading libiconv-1.14.tar.gz ( 66%)
Downloading libiconv-1.14.tar.gz ( 67%)
Downloading libiconv-1.14.tar.gz ( 68%)
Downloading libiconv-1.14.tar.gz ( 69%)
Downloading libiconv-1.14.tar.gz ( 70%)
Downloading libiconv-1.14.tar.gz ( 71%)
Downloading libiconv-1.14.tar.gz ( 72%)
Downloading libiconv-1.14.tar.gz ( 73%)
Downloading libiconv-1.14.tar.gz ( 74%)
Downloading libiconv-1.14.tar.gz ( 75%)
Downloading libiconv-1.14.tar.gz ( 76%)
Downloading libiconv-1.14.tar.gz ( 77%)
Downloading libiconv-1.14.tar.gz ( 78%)
Downloading libiconv-1.14.tar.gz ( 79%)
Downloading libiconv-1.14.tar.gz ( 80%)
Downloading libiconv-1.14.tar.gz ( 81%)
Downloading libiconv-1.14.tar.gz ( 82%)
Downloading libiconv-1.14.tar.gz ( 83%)
Downloading libiconv-1.14.tar.gz ( 84%)
Downloading libiconv-1.14.tar.gz ( 85%)
Downloading libiconv-1.14.tar.gz ( 86%)
Downloading libiconv-1.14.tar.gz ( 87%)
Downloading libiconv-1.14.tar.gz ( 88%)
Downloading libiconv-1.14.tar.gz ( 89%)
Downloading libiconv-1.14.tar.gz ( 90%)
Downloading libiconv-1.14.tar.gz ( 91%)
Downloading libiconv-1.14.tar.gz ( 92%)
Downloading libiconv-1.14.tar.gz ( 93%)
Downloading libiconv-1.14.tar.gz ( 94%)
Downloading libiconv-1.14.tar.gz ( 95%)
Downloading libiconv-1.14.tar.gz ( 96%)
Downloading libiconv-1.14.tar.gz ( 97%)
Downloading libiconv-1.14.tar.gz ( 98%)
Downloading libiconv-1.14.tar.gz ( 99%)
Downloading libiconv-1.14.tar.gz (100%)
Extracting libiconv-1.14.tar.gz into tmp/i686-pc-mingw32/ports/libiconv/1.14...
OK
Running 'configure' for libiconv 1.14... ERROR, review 'C:/Ruby193/lib/ruby/gems
/1.9.1/gems/nokogiri-1.6.6.2/ext/nokogiri/tmp/i686-pc-mingw32/ports/libiconv/1.1
4/configure.log' to see what happened.
*** 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=C:/Ruby193/bin/ruby
        --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
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_portile-0.6.2/lib/mini_portile.rb:279:i
n `block in execute': Failed to complete configure task (RuntimeError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_portile-0.6.2/lib/mini_por
tile.rb:271:in `chdir'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_portile-0.6.2/lib/mini_por
tile.rb:271:in `execute'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_portile-0.6.2/lib/mini_por
tile.rb:66:in `configure'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mini_portile-0.6.2/lib/mini_por
tile.rb:109:in `cook'
        from extconf.rb:278:in `block in process_recipe'
        from extconf.rb:177:in `tap'
        from extconf.rb:177:in `process_recipe'
        from extconf.rb:443:in `<main>'

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

  C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/nokogiri-1.6.6.2/m
kmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-
1.6.6.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/no
kogiri-1.6.6.2/gem_make.out
removing ./siteconf20151113-752-1ppngjf.rb...Exception `Errno::ENOENT' at C:/Rub
y193/lib/ruby/1.9.1/tempfile.rb:282 - No such file or directory - ./siteconf2015
1113-752-1ppngjf.rb
done

So I figured I'd look at the configure.log of libiconv for why it gave an error. The contents of that file are:
configure: error: invalid variable name: `CPPFLAGS\'

Another point of error is given in mkmf.log, but I assume this is caused due to the libiconv error. Still, the contents of that file are:
"gcc -o conftest -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I. -DFD_SETSIZE=2048  -DFD_SETSIZE=2048  -O3 -fno-omit-frame-pointer -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  conftest.c  -L. -LC:/Ruby193/lib -L.      -lmsvcrt-ruby191  -lshell32 -lws2_32 -limagehlp -lshlwapi   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */

"gcc -IC:/Ruby193/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby193/include/ruby-1.9.1/ruby/backward -IC:/Ruby193/include/ruby-1.9.1 -I. -DFD_SETSIZE=2048  -DFD_SETSIZE=2048  -O3 -fno-omit-frame-pointer -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration    -Werror -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main() {return 0;}
/* end */

I have never used Ruby before and this is really confusing for me. Can you help?

Regards,
Gabriel
Message has been deleted

Gabriel Nongsiej

unread,
Nov 13, 2015, 7:36:57 AM11/13/15
to nokogiri-talk
Hi,

I also ran 
gem env

and my RubyGems version is 2.5.0.

Regards,
Gabriel

Lars Kanis

unread,
Nov 13, 2015, 7:47:16 AM11/13/15
to nokogi...@googlegroups.com
Hi Gabriel,

ruby-1.9.3 is somewhat outdated and ruby-2.2 is not yet supported by nokogiri on Windows. So it's best to use ruby-2.1 on Windows for now. That should work.

--
Regards,
Lars

Gabriel Nongsiej

unread,
Nov 16, 2015, 3:13:31 AM11/16/15
to nokogiri-talk
Hi,

I found a fix for this. I don't really know why it works. It appears native gem installation is not possible on Windows using rubygems higher than version 2.4.0. I had to downgrade it to version 2.3.0. But I was able to install nokogiri using the fix given in this link. The background for this error is given in the following link.

Thanks guys.

Mike Dalessio

unread,
Nov 16, 2015, 2:26:45 PM11/16/15
to nokogiri-talk
Hi,

Nokogiri 1.6.6.2 doesn't support native builds on windows. Please use the precompiled gem for your platform.


Gabriel Nongsiej

unread,
Nov 16, 2015, 11:58:52 PM11/16/15
to nokogiri-talk
Hi Mike,

I'm sorry but I don't know what's the difference between the native build and the precompiled gem. I typed 
gem install nokogiri
to get the gem installed. I did not do anything else other than that. And with the fix I listed above regarding the rubygems version, this is possible.

Daniel Billotte

unread,
Dec 12, 2015, 10:49:05 AM12/12/15
to nokogiri-talk
Hi Gabriel,

I was experiencing a similar problem and was able to make it work by downgrading gem to 2.3.0 as you suggested. This took me especially long to get to because some of the forum discussions talk about having to upgrade gem from previous earlier versions to make it work, so I didn't suspect 2.5 of being problematic until I read your post. This was a great way to get Friday started.

Thank you sir!!!
Reply all
Reply to author
Forward
0 new messages