You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2021/11/11 19:24:00 UTC

[jira] [Commented] (SOLR-15793) ref-guide jrubyPrepare fails due to gems trying to compile native code

    [ https://issues.apache.org/jira/browse/SOLR-15793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442411#comment-17442411 ] 

Chris M. Hostetter commented on SOLR-15793:
-------------------------------------------

Here's the full error...
{noformat}
 > Task :solr:solr-ref-guide:jrubyPrepare
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/hossman/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.9.0/8e44ce7a1417966d89957bd766a148601e28828b/jruby-complete-9.2.9.0.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Successfully installed ffi-1.15.4-java
Successfully installed rb-inotify-0.10.1
Successfully installed rb-fsevent-0.11.0
Successfully installed sass-listen-4.0.0
Successfully installed forwardable-extended-2.6.0
Successfully installed rexml-3.2.5
Successfully installed listen-3.7.0Ruby Sass has reached end-of-life and should no longer be used.* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841Successfully installed sass-3.7.4
Building native extensions. This could take a while...
ERROR:  Error installing /home/hossman/.gradle/caches/modules-2/files-2.1/rubygems/http_parser.rb/0.8.0/8aa1092bbc1f10fd9622224babf2b2a98d4d4b22/http_parser.rb-0.8.0.gem:
        ERROR: Failed to build gem native extension.    current directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
/opt/jdk/11/jdk-11.0.4+11/bin/java -cp :/home/hossman/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.9.0/8e44ce7a1417966d89957bd766a148601e28828b/jruby-complete-9.2.9.0.jar org.jruby.Main -r ./siteconf20211111-25245-1dvbe4a.rb extconf.rb
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/hossman/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.9.0/8e44ce7a1417966d89957bd766a148601e28828b/jruby-complete-9.2.9.0.jar) to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
creating Makefilecurrent directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
make "DESTDIR=" clean
Makefile:225: *** multiple target patterns.  Stop.current directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
make "DESTDIR="
Makefile:225: *** multiple target patterns.  Stop.make failed, exit code 2Gem files will remain installed in /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0 for inspection.
Results logged to /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/extensions/universal-java-11/2.5.0/http_parser.rb-0.8.0/gem_make.out
Successfully installed eventmachine-1.2.7-java
Successfully installed public_suffix-4.0.6
Successfully installed temple-0.8.2
Successfully installed asciidoctor-2.0.16
Successfully installed safe_yaml-1.0.5
Successfully installed rouge-3.26.1
Successfully installed pathutil-0.16.2
Successfully installed mercenary-0.3.6
Successfully installed liquid-4.0.3
Successfully installed kramdown-2.3.1
Successfully installed jekyll-watch-2.2.1
Successfully installed jekyll-sass-converter-1.5.2
Successfully installed em-websocket-0.5.3
Successfully installed colorator-1.1.0
Successfully installed addressable-2.8.0
Successfully installed concurrent-ruby-1.1.9
Successfully installed i18n-0.9.5
Successfully installed tilt-2.0.10
Successfully installed slim-4.1.0
Successfully installed jekyll-3.9.1
Successfully installed jekyll-asciidoc-3.0.0
29 gems installed> Task :solr:solr-ref-guide:jrubyPrepare FAILEDFAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':solr:solr-ref-guide:jrubyPrepare'.
> Process 'command '/opt/jdk/11/jdk-11.0.4+11/bin/java'' finished with non-zero exit value 1* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 33s
{noformat}

...I don't really understand any of jekyll/ruby/jruby/gradle-jruby to have much idea of what to try and do to "fix" this.

I spent a little time trying to figure out if there is a way to force gems to ignore any native extensions and only use the "pure ruby" code ... but im not even clear whether all ruby gems have pure ruby implementations or not, let alone how to specify that in a dependency -- I found some forums suggesting a {{NORUBYEXT}} env variable can help, but based on how JRuby installs gems I don't really see any way to set that.

The safest thing to do would probably be to "lock" all transitive gem dependencies at whatever versions we were picking up a few days ago -- but i don't really understand gems/ruby enough to guess how to go about figuring out what those were?

> ref-guide jrubyPrepare fails due to gems trying to compile native code
> ----------------------------------------------------------------------
>
>                 Key: SOLR-15793
>                 URL: https://issues.apache.org/jira/browse/SOLR-15793
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Chris M. Hostetter
>            Priority: Major
>
> This popped up recently on both my local machine and jenkins...
> (snippet)
> {noformat}
> Building native extensions. This could take a while...
> ERROR:  Error installing /home/hossman/.gradle/caches/modules-2/files-2.1/rubygems/http_parser.rb/0.8.0/8aa1092bbc1f10fd9622224babf2b2a98d4d4b22/http_parser.rb-0.8.0.gem:
>         ERROR: Failed to build gem native extension.
>     current directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
> /opt/jdk/11/jdk-11.0.4+11/bin/java -cp :/home/hossman/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.9.0/8e44ce7a1417966d89957bd766a148601e28828b/jruby-complete-9.2.9.0.jar org.jruby.Main -r ./siteconf20211111-25245-1dvbe4a.rb extconf.rb
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/home/hossman/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.2.9.0/8e44ce7a1417966d89957bd766a148601e28828b/jruby-complete-9.2.9.0.jar) to method sun.nio.ch.NativeThread.signal(long)
> WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> creating Makefile
> current directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
> make "DESTDIR=" clean
> Makefile:225: *** multiple target patterns.  Stop.
> current directory: /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0/ext/ruby_http_parser
> make "DESTDIR="
> Makefile:225: *** multiple target patterns.  Stop.
> make failed, exit code 2
> Gem files will remain installed in /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/gems/http_parser.rb-0.8.0 for inspection.
> Results logged to /home/hossman/lucene/solr/solr/solr-ref-guide/build/.gems/extensions/universal-java-11/2.5.0/http_parser.rb-0.8.0/gem_make.out
> {noformat}
> ...it's very similar to SOLR-15520, but isn't the result of any version changes made to our gem dependencies -- it seems like some transient gem dep changed, and now we're pulling in a gem that has native code which evidently can't compile under JRuby 
> (I _think_ the Makefile error is becuase of "paths" that include the ':' character (because JRuby is trying to point them at {{classpath:}} URIs)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org