-
-
Notifications
You must be signed in to change notification settings - Fork 915
Allow overriding env var with --use-system-libraries=false and default to --disable-static on TruffleRuby #2193
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
Allow overriding env var with --use-system-libraries=false and default to --disable-static on TruffleRuby #2193
Conversation
@flavorjones Could you review and integrate this? It'd be awesome to have a release with it, as then it will be possible to install nokogiri with or without bitcode on TruffleRuby (#2191 (comment)). |
@eregon Absolutely, sorry for not ACKing earlier, it's been a busy week. Will absolutely look and try to have this merged for a patch release in v1.11.x. |
493d751
to
bf56b45
Compare
Code Climate has analyzed commit 4a3836e and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 94.0% (0.0% change). View more on Code Climate. |
@eregon I've finally got some time to take a look, and I rewrote this a bit to clean up the So now this works OK for me when I have "static" linking on ( You can reproduce what I'm seeing using the Here's what I'm running and what I see:
When I look in the directory
I'm wondering if we could omit the commit to disable-static from this PR for now, and treat it as a separate concern? Otherwise this seems good to go. |
The issue happens when compiling with So far I tested by installing the I'll try to figure out why |
@eregon Hmm, OK, well since we can't reproduce with a gem, then I'm going to include this in v1.11.2 which should go out today. |
Actually, installing from a It seems due to the fact recently TruffleRuby prepends the toolchain to PATH and libxml2's configure/Makefile not liking it, and in fact disabling that works (as it used to):
So it seems best to hold off on this a bit longer until we figure out what's going on, or we decide to go for |
@eregon Thanks for finding the root cause. I'm going to remove the "static" default commit from this PR but pull in the "system libraries" flags to unblock the Shopify folks. |
And I'll create a new PR with that commit on it! |
@flavorjones Agreed, that sounds safe, useful and lets us try all ways to install nokogiri. |
bf56b45
to
1a921b2
Compare
This will be used to override NOKOGIRI_USE_SYSTEM_LIBRARIES and the --use-system-libraries option (which should eventually be deprecated). This will allow TruffleRuby users to override the TR default which is hacked into mkmf.rb. Co-authored-by: Benoit Daloze <eregontp@gmail.com>
One small step towards a Config object that we can extract.
1a921b2
to
98bf3a0
Compare
I figured it out, the issue was that @flavorjones So I believe it's fine to include the commit to |
oracle/truffleruby@2e22010 merged so now |
* Shared libraries are more flexible and compile faster, see sparklemotion#2191 (comment) * Static libraries can still be chosen (e.g., for testing) with: gem install nokogiri -- --use-system-libraries=false --enable-static Co-authored-by: Benoit Daloze <eregontp@gmail.com>
@flavorjones I've cherry-picked the commit having |
@eregon Sweet! Thank you! I'm planning to ship Nokogiri today, and will merge this as soon as I get a few hours. |
Just kicked CI, it was stuck. |
See #2191