-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the Nokogiri gem #62
Comments
how's this coming along? any progress on nokogiri or openssl? |
@sbehrens I believe this primarily depends on the OpenSSL support issue that appears to be nearly sorted out. As I understood it, since OpenSSL was precursory to this and facilitates Sulong testing / experience, then this would be coming next and probably be a bit quicker to implement. Please definitely correct me if I'm wrong or add details @chrisseaton! I've not had much time lately to follow his progress on these unfortunately. |
Yes nothing new to report here, but |
I'm working on nokogiri at the moment. With some patching it is now partially working, though I'm still going through tests and fixing issues. Mostly these are to do with accessing some properties of document nodes after the document has been parsed and the tree built. We currently need to use a native shared lib version of libxml2 which is quite fragile as libxml2 was not designed with multiple users in mind. It would be better for a release to either run the whole of libxml2 under sulong, have a way to link to a static lib stored in the .su archive, or perform some symbol transformation so nokogiri can use a separate copy from anything else in the system. |
Have you looked at running |
We now support Nokogiri, but only with a shared installation of libxml2. This means you'll need to configure Bundler to build Nokogiri that way with |
What great news @nirvdrum! That means we're pretty darn close to full Rails support, right? Also, where can we find status for Truffle with Ruby managers such as |
I second what @ylluminate said - having |
@ylluminate there was already a discussion about the integration into ruby version managers. SEE: #9 |
Yes @ThomasKoppensteiner thus my mentioning it here and thanks for bringing that thread back up. Note the date on that thread and the need for attention. We most certainly can carry on with this topic over there, but with being where things are presently with Truffle, I can't see any other subject being as important as this at this point. Just getting hands around it (conveniently & reliably since folks are not, en masse, prone to manual building) and getting it out there seem to be paramount as @thbar also seems to allude to in his comment. |
Got this error while running
|
@brauliobo The
https://github.com/oracle/truffleruby/blob/master/doc/user/installing-llvm.md |
@eregon is there a way to bypass the version check? llvm 6.0 might work or cause errors later |
@brauliobo The only way I see (without a different release) would be to tweak the check in - elsif major == 5 && minor == 0
+ elsif major >= 5
extra_cflags = '-Xclang -disable-O0-optnone' Can you try that? |
thank you @eregon, it didn't work :P the error was in the end while linking:
full output at https://pastebin.com/Q8VN5VAG |
moving this discussion to #1340 as it isn't directly related to nokogiri but rather to LLVM 6.0 |
* commit 'b2d83aa61f9430f99c00f46951f9fa37d43b5188': Fix relative links
@brauliobo For reference, the above compilation error is seen on LLVM 3.8 as well: https://gist.github.com/obrie/95cfa2aa1569f935b4cb58b46dbff527 |
I had missed the comment here -- #62 (comment) Compilation works on 3.8 if you run 🎆 |
Hello, can anyone explain how to compile nokogiri with truffleruby? macOS 10.14
|
@rsmything You need to have LLVM on export PATH="/usr/local/opt/llvm@4/bin:$PATH" This is already fixed (no longer necessary) for the next release. |
Sequel specs on Travis fails due to nonsupport of in-tree libxml2. |
Test cacheable Merge-Requested-By: chrisseaton Merge-Queue-Digest: 143d56988867ae5b1fb4598fc2876caee5b8dd662909f06d94a9419766e68fc7
Update: the sharing of libxml2 is now handled transparently, so
# Easy way to get the right version number for nokogiri.
rails --version
brew install libxml2
# Below: replace with paths suggested by brew, and nokogiri version
# reported by the warnings in rails --version.
# (using gem pristine in case you already ran gem install rails)
LDFLAGS="-L/usr/local/opt/libxml2/lib" \
CPPFLAGS="-I/usr/local/opt/libxml2/include" \
PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" \
gem pristine nokogiri --version 1.10.9 Edit: this was due to issues in my rbenv setup (in particular, rbenv does not add |
Nokogiri seems to basically work now (and has been for a while). I ran the Nokogiri tests on TruffleRuby and almost everything passes (GR-25734):
Remaining failures are also tracked in sparklemotion/nokogiri#1882 |
Nice progress! |
We now use the libxml2/libxslt from nokogiri and not from the system, similar to CRuby, since dfc60c6. |
I'm still getting errors trying to install I've tried with But I'm still getting errors about
|
@skunkworker Could you report as a separate issue? |
* TruffleRuby >= 21.1 installs nokogiri with the packaged libxml2/libxslt like on CRuby by default. See oracle/truffleruby#62
* TruffleRuby >= 21.1 installs nokogiri with the packaged libxml2/libxslt like on CRuby by default. See oracle/truffleruby#62
* TruffleRuby >= 21.1 installs nokogiri with the packaged libxml2/libxslt like on CRuby by default. See oracle/truffleruby#62
* TruffleRuby >= 21.1 installs nokogiri with the packaged libxml2/libxslt like on CRuby by default. See oracle/truffleruby#62
We need to support Nokogiri, particular as it's used so much in testing gems. As with
openssl
(#61) we are using Sulong as described in our RubyConf talk Ruby's C Extension Problem and How We're Fixing It.Current status:
It should just work, TruffleRuby passes all Nokogiri tests, and by default TruffleRuby installs nokogiri with the packaged libxml2/libxslt like on CRuby. The only difference is that prebuilt binary gems are not available for TruffleRuby currently. One can also use
--use-system-libraries
if they like, but it's not faster, especially if those system libraries need to be installed.Older status:
We now support Nokogiri, but it always uses a shared installation of libxml2, and so you need the libxml2 headers (and libraries) on the system (e.g.,
apt-get install libxml2-dev libxslt-dev
on Debian-based).On GitHub Actions, that means you need:
If you use
ruby/setup-ruby
withbundler-cache: true
, then that is automatically done by setup-ruby:At some point we hope to be able to support building the in-tree libxml2 library like is done on MRI.
The text was updated successfully, but these errors were encountered: