-
-
Notifications
You must be signed in to change notification settings - Fork 932
Add support for cross compiling x64-mingw32 fat binary gem and add support for native builds on Windows. #989
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
Conversation
|
👍 awesome work!! |
|
Sorry I do I get the fix ? |
|
@luislavena Hope you could take the time for this... I would be able to test the build, but don't have a 64bit Windows environment at hand to test a resulted binary. @larskanis Thanks for the work. In the meantime, could you rebase this on the current master again? |
|
@knu I merged with master instead of rebase to better show the changes. My patch for libxslt now integrates with the patching done on master and is version independent therefore, now. |
|
👍 please merge |
|
@johnnyshields did you test it? It would be great, if a windows user could give some feedback 😄 Testing the native build on Windows should be as simple as: This should work for all current RubyInstaller versions, when the corresponding DevKit is installed. It then downloads and builds zlib, libiconv, libxml and libxslt, so You should also be able to do a full nokogiri test suite run like this: Building a fat binary gem per cross build is somewhat more complicated, so I uploaded the binries here for testing. @luislavena If you find some minutes, it would be great, if you could leave a comment to this PR. One thing is that I updated the cross ruby patch levels here, but I think this is obsolete now. In particular since I added a check of the binary dll files (about correct platform, dll entry point and imported system dlls). @knu I did another rebase and removed some patches in b57294c. Do you agree with this? |
|
@larskanis will take a detailed look soon, am in the middle of a product launch this week. Very much looking forward to this, thanks! |
|
@larskanis I've tested these binaries that you've provided in my project and everything seems to be working. Thanks! |
|
I did another rebase targeting the master branch. Now the fat binary gems tell about the libraries they are build with, while gem install. The loud messages while source package install are not printed on Windows. but it's quite common to bundle all libraries within a product on Windows, anyway. Moreover the fat binary gem will certainly still keep the most used version. Updated gems are here for download. Sill looking forward to receive any reports 😄 |
|
Thanks! |
|
I was also able to download and install nokogiri-1.6.1.beta.1.mingw.1-x64-mingw32.gem on Windows 7, Ruby 2.0. |
|
I was also able to download and install nokogiri-1.6.1.beta.1.mingw.1-x64-mingw32.gem on Windows 7 (64), Ruby 2.0. Thank you! |
|
@larskanis I need to look at the strip issue you're mentioning. It didn't happen with other projects I tested, so I think this is limited to ffi. Will have some time over the holiday/new year break to look at it. Thank you. |
|
@luislavena nokogiri suffers from the same strip-issue because zlib makes The issue only happens in the VirtualBox and only when started on it's |
|
I was able to install your replacement nokogiri git src (v1.6.1.beta.1) in Windows 8.1 on top of ruby 2.0.0-p353 x64. Thank you! |
|
I'm also able to install Thank you! |
|
I was also able to install nokogiri-1.6.1.beta.1-x64-mingw32.gem in Windows 7 Professional 64bit on top of ruby 2.0.0p353 (2013-11-22) [x64-mingw32]. Thank you! |
|
@larskanis @luislavena Is there any way to help with this pull request other than reporting that it seems to work, or is it at the point where the only ones who can help are the repository owners? I'd love to be able to use something that's been merged into the main repository, if only to have access to other improvements made to Nokogiri since @larskanis forked. But if that's not feasible right now, that's understandable! |
|
Apart from the third-party issues mentioned, I think we should merge this to move forward. I also want to know what is left to be done after merging this, namely the third-party issues. |
…-mingw32) fat binary gem and support for native builds on Windows. This moves all MiniPortile recipes into extconf.rb. This enables native build on Windows and ensures that all depending libraries are build with the same compiler version as the C-ext when cross compiling.
Modifications to configure.in trigger a re-run of autotools, which adds additional dependencies to nokogiri. This breaks the build of libxslt when there is a version mismatch between the one used to release the libxslt tar file and the installed one. The removed patches itself are IMHO not necessary for nokogiri.
is really used for the packaged fat binary gems. Avoid adding dependency.yml twice - once per Manifest.txt and once per add_file_to_gem.
It was called as prerequisites and is called as part of 'rake cross native gem'
|
@knu: You should be able to do a clean merge now. The still open third party issues I encountered are:
Apart from these, all other third party issues were resolved in the meanwhile. Some more internal things should be mentioned:
|
|
Issue 2 in the list above is now finally solved. So the rake-compiler-dev-box is now suitable to cross build nokogiri. |
|
Done. Thanks for all the work @larskanis, and the testers! |
|
Don't hesitate to contact me in case of questions/issues regarding the merged code. |
|
The gem provided 4 months ago installs perfectly! |
|
The developers of Nokogiri are starting to work as a team again, so please be patient just a bit more for us to be able to release an official gem. |
|
We're getting close to a release. Thanks to everyone for their patience, On Wed, Mar 26, 2014 at 5:38 AM, Akinori MUSHA [email protected]:
|
This PR fixes #864 and obsoletes #976.
The PR moves all MiniPortile recipes into extconf.rb. That enables native builds on Windows and ensures that all depending libraries are build with the same compiler version as the C-ext when cross compiling.
Probably the most easy way to cross build the mingw gems is by using the rake-compiler-dev-box: https://github.com/tjschuck/rake-compiler-dev-box
There are currently some outstanding external issues:
bundle execin combination with rake-compiler's faking mechanism, that can be worked around by this patch: Pre-load resolver library before faking. rake-compiler/rake-compiler#83I've successfully tested the extension by running all unit tests on Windows-7 64-Bit with Ruby-x64 2.0.0-p0 and Ruby-x86 1.9.3-p392. Both with cross compiled fat binary gem and with natively compiled source gem. They currently don't pass completely ( https://gist.github.com/larskanis/7186885 ), but they also don't pass with plain nokogiri-1.6.0 gem. I'll look at these failures later.
Update: Since #993 is merged to master, all tests pass on all above versions.