Git Product home page Git Product logo

Comments (8)

cfis avatar cfis commented on August 31, 2024

Hmm, not sure. I've never seen this and running rake rdoc I can't reproduce it.

from libxml-ruby.

PierceLBrooks avatar PierceLBrooks commented on August 31, 2024

I have been able to reproduce this on an Intel iMac with a Homebrew-installed LibXML package ( version 2.11.4 ):

Pierces-iMac:Development piercebrooks$ brew list --versions | grep libxml
libxml2 2.11.4
Pierces-iMac:Development piercebrooks$ sudo gem install libxml-ruby -- --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Fetching libxml-ruby-4.1.1.gem
Building native extensions with: '--with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config'
This could take a while...
Successfully installed libxml-ruby-4.1.1
Parsing documentation for libxml-ruby-4.1.1
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -c ext/libxml/extconf.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(NoMethodError) undefined method `[]' for nil:NilClass

ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]' for nil:NilClass
Pierces-iMac:Development piercebrooks$ ruby --version
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin21]
Pierces-iMac:Development piercebrooks$ gem --version
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
3.0.3.1
Pierces-iMac:Development piercebrooks$ rdoc --version
6.1.2.1

from libxml-ruby.

PierceLBrooks avatar PierceLBrooks commented on August 31, 2024

I have been able to reproduce this on an Intel iMac with a Homebrew-installed LibXML package ( version 2.11.4 ):

This also occurs with my ARM M1 Macbook Pro that has pretty much identical versions of everything involved here.

from libxml-ruby.

cfis avatar cfis commented on August 31, 2024

Cool. Can you determine which file is causing it? Maybe just run rake just run rake rdoc ?

from libxml-ruby.

PierceLBrooks avatar PierceLBrooks commented on August 31, 2024

A simple rake command did not suffice, as it ended up being confused about some unit test require statements referring to libxml_ruby instead of libxml-ruby. I instead tried the bundle exec rake compile command from ~/libxml-ruby/.github/workflows/mri.yml, which caused the build to succeed. Afterwards, rake rdoc was able to execute successfully with no indication of which file is responsible for this issue. However the culprit is ultimately almost certainly ~/libxml-ruby/ext/libxml/extconf.rb. Perhaps an even better solution than my pull request would be to add another search path for external library & header inclusion according to a couple superdirectories above whichever directory is specified by the package installation user with --with-xml2-config.

from libxml-ruby.

cfis avatar cfis commented on August 31, 2024

Strange that it is fine on Windows and Linux. Seems to only happen on MacOS?

from libxml-ruby.

nieder avatar nieder commented on August 31, 2024

Seems to be a ruby26 issue, because I get the same error installing the gem against ruby26, but it works with ruby27 and ruby32 using otherwise identical gem install commands and all 3rd party rubymods removed to avoid pollution.

/sw/bin/gem2.6 install \
	--local \
	--force \
	--verbose \
	--vendor \
	--platform=x86_64-apple-darwin \
	--build-root /sw/build.build/root-libxml2-rb26-4.1.1-1 \
	--document rdoc \
	--ignore-dependencies \
	libxml-ruby-4.1.1.gem \
	-- --with-xml2-config=/sw/bin/xml2-config

ruby26: 2.6.10p210
rdoc: 6.1.2.1
ruby27: 2.7.8p225
rdoc: 6.2.1.1
libxml2: v2.9.14

I'm also on macOS, but using Fink provided libraries and ruby.

ETA: libxml-ruby-4.1.1 also builds successfully with ruby2.5.

from libxml-ruby.

cfis avatar cfis commented on August 31, 2024

Since Ruby 2.6 is no longer supported (although I know MacOS ships with it), going to close this.

from libxml-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.