sparklemotion / nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
https://nokogiri.org/
MIT License
6.14k stars 896 forks source link

Installation fails on OSX / rbx-2.2.1: invalid mode -- at (ArgumentError) #1106

Closed dblock closed 10 years ago

dblock commented 10 years ago
/Users/dblock/.rvm/rubies/rbx-2.2.1/bin/rbx extconf.rb
Building nokogiri using packaged libraries.
checking for iconv.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

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

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

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0002-Fix-entities-local-buffers-size-problems.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0003-Fix-an-error-in-previous-commit.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0004-Fix-potential-out-of-bound-access.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0005-Detect-excessive-entities-expansion-upon-replacement.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0006-Do-not-fetch-external-parsed-entities.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0008-Improve-handling-of-xmlStopParser.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0009-Fix-a-couple-of-return-without-value.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0010-Keep-non-significant-blanks-node-in-HTML-parser.patch...
Running 'patch' for libxml2 2.8.0... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0011-Do-not-fetch-external-parameter-entities.patch...
Running 'patch' for libxml2 2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0)...
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

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

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
Extracting libxslt-1.1.28.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0014-Fix-for-bug-436589.patch...
Running 'patch' for libxslt 1.1.28... OK
Running patch with /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch...
Running 'patch' for libxslt 1.1.28... OK
Running 'configure' for libxslt 1.1.28... OK
Running 'compile' for libxslt 1.1.28... OK
Running 'install' for libxslt 1.1.28... OK
Activating libxslt 1.1.28 (from /Users/dblock/.rvm/gems/rbx-2.2.1/gems/nokogiri-1.6.2.1/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.28)...
checking for main() in -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... yes
checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes
checking for exsltFuncRegister() in libexslt/exslt.h... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
An exception occurred running extconf.rb:

    invalid mode -- at (ArgumentError)

Backtrace:

                     IO.parse_mode at kernel/common/io.rb:648
                        IO.sysopen at kernel/common/io.rb:920
                   File#initialize at kernel/common/file.rb:1124
                         Class#new at kernel/alpha.rb:94
                           IO.open at kernel/common/io.rb:603
                 Object#__script__ at extconf.rb:533
  Rubinius::CodeLoader#load_script at kernel/delta/code_loader.rb:66
  Rubinius::CodeLoader.load_script at kernel/delta/code_loader.rb:198
           Rubinius::Loader#script at kernel/loader.rb:649
             Rubinius::Loader#main at kernel/loader.rb:831
dblock commented 10 years ago

It works with a newer Rubinius 2.2.6, closing.