Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
jruby-lib build fails in windows #1698
Clean source and mvn build reports:
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:
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.
first I have to say that the build should work on windows as well even if it gets less attention.
the problem with the unlink sounds more a general problem for windows - the FileUtils.rm_f should work on windows as well.
not sure what to do with lib/pom.rb ! could work around it as you did with File.delete + File.exists? for the time until the FileUtils.rm_f is fixed ?
Glad to hear it! JRuby is the only dynamic language that I know of that is:
Once I got past that section, mvn -Pbootstrap failed, although I haven't had a chance to dig into it to figure out what the issue is. I'll have a look at it later.
FileUtils.rm_f just delegates to jnr-posix unlink method. I wasn't very clear about that in my late-night ramblings.
So - I figured out to use mvn -Pbootstrap-no-launcher
However, that didn't solve the problem. The call stack I get:
Useful, isn't it?
It's a failed require (of course), and I managed to track down the chain, although I'm not sure what it means...
It looks like there's no Fiddle::Pointer implementation for win32?
I'm guessing that for builds that are working, another DL implementation is being injected into the environment before you get to fiddle.
In my environment, Fiddle triggers a load of DL, which defines fiddle?, which causes
in struct.rb to try and inherit from Fiddle::Pointer, which does not exist. (it isn't defined in Fiddle, and furthermore Fiddle isn't finished loading...?)
I can't get find any history for struct.rb - it appears to have sprung fully formed from the head of Zeus. I'm not sure why it was changed to be the way it is... Honestly, I'm having trouble coming up with a scenario where that code would work at all.
I replaced the ternary check with just CPtr, which gets me to:
Le sigh. Something to figure out tomorrow. On the plus side, I feel that I am learning a lot about JRuby. :)