-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
fix nokogumbo linking on windows #2202
Conversation
Related to #2167 Related to rubys/nokogumbo#163
Related to #2167 Related to rubys/nokogumbo#163
to allow downstream gems like nokogumbo to build correctly simply by requiring nokogiri in the extconf and running: append_cflags(Nokogiri::VERSION_INFO["nokogiri"]["cppflags"]) append_ldflags(Nokogiri::VERSION_INFO["nokogiri"]["ldflags"]) this is needed because unresolved symbols aren't allowed on windows. Related to #2167
2ea48e8
to
3cff820
Compare
Code Climate has analyzed commit 3cff820 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 33.3% (80% is the threshold). This pull request will bring the total coverage in the repository to 94.0% (-0.2% change). View more on Code Climate. |
@flavorjones I'm sad, I wasn't able to help you, but I'm glad, you could solve this issue! I like the idea of passing Unfortunately I'm still suffered by pandemic restrictions. Schools are closed since months and working as a substitute teacher while having a lot of work on the daily job is exhausting. I have to take my holiday to do any serious OSS development. |
@larskanis I don't think it ever worked on Windows ... previous versions of Nokogiri didn't package the header files as expected/promised, and so Nokogumbo will gracefully "fall back" to using Nokogiri's Ruby API (rather than libxml2's C API). |
What problem is this PR intended to solve?
Closes #2167 which relates to an issue building Nokogumbo on Windows against the precompiled libraries.
This PR does the following:
LDFLAGS
inNokogiri::VERSION_INFO
to allow the windows linker to resolve all symbolsHave you included adequate test coverage?
There's pretty good test coverage of this test case in the Nokogumbo CI suite; and I've added some light tests here in
scripts/test-gem-installation
though I'll note that we're not testing gem installation on Windows in the Nokogiri CI suite at the moment (though, see #2153).Does this change affect the behavior of either the C or the Java implementations?
This should only impact downstream gems like Nokogumbo who are trying to link against the precompiled Nokogiri libraries.