-
-
Notifications
You must be signed in to change notification settings - Fork 942
Description
Clean source and mvn build reports:
NotImplementedError: unlink unsupported or native support failed to load
unlink at org/jruby/RubyFile.java:1112
remove_file at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:1464
platform_support at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:1469
remove_file at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:1463
remove_file at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:801
rm at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:578
each at org/jruby/RubyArray.java:1549
rm at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:577
rm_f at C:/Users/nathan/code/jruby/lib/../lib/ruby/2.1/fileutils.rb:600
eval_pom at (eval):184
call at org/jruby/RubyProc.java:276
Which is not surprising, as windows doesn't do unlink. Windows build was working before, but it looks like it was changed a month or two ago (most likely when @headius added unlink to jnr-posix, I'm guessing). I couldn't find anything that indicated that JRuby wasn't going to support windows build, but maybe I missed it.
I got the build working by replacing lib/pom.rb:183:
FileUtils.rm_f( File.join( ruby_dir, 'shared', 'jruby-openssl.rb' ) )
with a straight call to File#delete. This worked the first time, but subsequent runs required me to add an if exist? check before deleting the file, which is I guess what unlink was there to accomplish.
Is there a (good) way to patch this in jnr-posix? Making the underlying posix library compatible across the board sounds like a way to avoid the problem in the future.