Comments (8)
Hmm, not sure. I've never seen this and running rake rdoc I can't reproduce it.
from libxml-ruby.
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.
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.
Cool. Can you determine which file is causing it? Maybe just run rake just run rake rdoc
?
from libxml-ruby.
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.
Strange that it is fine on Windows and Linux. Seems to only happen on MacOS?
from libxml-ruby.
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.
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)
- Uncaught exception: cannot load such file -- libxml_ruby even if it's installed. HOT 7
- Memory leak in `path` method HOT 5
- Memory leak HOT 2
- Repository website URL (xml4r.github.com) is broken HOT 2
- xmlGetFeaturesList is deprecated HOT 7
- Validating an XML file is well-formed HOT 1
- How close `LibXML::XML::Writer.file`? HOT 2
- Cannot compile gem on Ruby 2.5 HOT 1
- Failed to build gem native extension. HOT 2
- New release, pretty please HOT 2
- Can't build with libxml 2.10.3 HOT 3
- Cannot install 3.2.3 due to missing xlink headers HOT 3
- Spurious warning when running with Ruby 3.2: "undefining the allocator of T_DATA class LibXML::XML::Writer" HOT 10
- Can't build with libxml 2.10.4 on Intel Mac HOT 1
- Error compiling ruby_xml_error.c with libxml 2.10.4 on Intel Mac HOT 1
- Error compiling native extension on Intel Mac HOT 2
- New version broke XML::Document.io HOT 8
- Version 5.0.0 breaks in .io method HOT 3
- `bundle exec rake compile` gets `error: incompatible function pointer types HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libxml-ruby.