You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using libxml as a dependency for one of my projects but it fails to build on windows. Any pointers to resolve this issue?
error: failed to run custom build command for `libxml v0.2.14`
Caused by:
process didn't exit successfully: `C:\Users\xyz\work\rust\bombardier\target\release\build\libxml-77d8a84e5c34f954\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Could not find libxml2 using pkg-config', C:\Users\xyz\.cargo\registry\src\github.com-1ecc6299db9ec823\libxml-0.2.14\build.rs:5:5
Short answer is that the crate has never been used under windows, so it is expected behavior for it to fail on a first try. I haven't actually even used rust itself under windows, so I wouldn't be able to offer any patches on a short notice. Happy to merge in any PRs that offer upgrades in this direction however, always welcome!
Thanks, I have no clue why it fails so unfortunately cannot submit any PR. This is the only lib which I found to be working well in case of XML and HTML xpath parsing.
Only thing I tried is downloading libxml2 for windows and adding it to path with no luck
Somehow got it built on windows using MSYS2 and mingw64 , is it possible to statically link libxml2 so that on windows I do not need the libxml2 and its dependecies?
Good to hear @coding-yogi . And I wouldn't bundle in libxlm2 directly no, definitely not a fan of carrying it around. I am instead waiting on the complete rust transpilation of libxml2 by c2rust. We've had some discussions with them that they may either publish that as a standalone crate or bundle it with this wrapper, when they feel ready, so that may be a roundabout way of getting simpler windows builds.
Hi @simoin , any reason pkg_config wasn't sufficient for you? I am not familiar wit the vcpkg ecosystem at all, so unsure if we should have it always supported, or if this is an equivalent alternative?
That verbatim change mentioned in the first comment may be a bit heavy, since it means we'll have both pkg_config and vcpkg as simultaneous dependencies. But I will be happy to merge a PR that uses a feature guard in Cargo.toml, as libsqlite3-sys does, to choose one or the other. And I can quickly make a new crate release afterwards.
I can also do the work myself, but no promises as to when just yet...
@dginev I haven't had any luck at all getting pkg_config to work on Windows, so I think this would be a big help.
I'm not at all familiar with C++ and generating bindings, but I'll try to take a stab the feature guard and see if I can get my project to compile on my windows box. If I can make it work, I'll submit a PR. Should I use this issue or make a new one?
Feel free to use this one, and thanks for giving it a shot! I'll look into setting up CI for a windows build for the repo, should help maintain both builds operational.
I worked on it tonight, I have the feature flag working, but a question and an issue:
do you want pkg-config to be default or should the package manager always be explicit?
libxml2 is found, but several tests are failing.
C:\Users\nitschkej\Documents\GitHub\rust-libxml>cargo test --features vcpkg
Compiling libxml v0.2.14 (C:\Users\nitschkej\Documents\GitHub\rust-libxml)
Finished test [unoptimized + debuginfo] target(s) in 6.62s
Running target\debug\deps\libxml-8c5fb79f5bba5ac9.exe
running 96 tests
test bindings::bindgen_test_layout_UConverterFromUnicodeArgs ... ok
test bindings::bindgen_test_layout_UConverterToUnicodeArgs ... ok
test bindings::bindgen_test_layout__G_fpos_t ... FAILED
test bindings::bindgen_test_layout__G_fpos64_t ... FAILED
test bindings::bindgen_test_layout__IO_FILE ... FAILED
test bindings::bindgen_test_layout__IO_marker ... ok
test bindings::bindgen_test_layout___fsid_t ... ok
test bindings::bindgen_test_layout___mbstate_t ... ok
test bindings::bindgen_test_layout___mbstate_t__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_cond_s ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_internal_list ... ok
test bindings::bindgen_test_layout___pthread_mutex_s ... ok
test bindings::bindgen_test_layout___pthread_rwlock_arch_t ... FAILED
test bindings::bindgen_test_layout___sigset_t ... FAILED
test bindings::bindgen_test_layout___va_list_tag ... ok
test bindings::bindgen_test_layout__htmlElemDesc ... ok
test bindings::bindgen_test_layout__htmlEntityDesc ... ok
test bindings::bindgen_test_layout__uconv_t ... ok
test bindings::bindgen_test_layout__xlinkHandler ... ok
test bindings::bindgen_test_layout__xmlAttr ... ok
test bindings::bindgen_test_layout__xmlAttribute ... ok
test bindings::bindgen_test_layout__xmlBuffer ... ok
test bindings::bindgen_test_layout__xmlChLRange ... ok
test bindings::bindgen_test_layout__xmlChRangeGroup ... ok
test bindings::bindgen_test_layout__xmlChSRange ... ok
test bindings::bindgen_test_layout__xmlCharEncodingHandler ... ok
test bindings::bindgen_test_layout__xmlDOMWrapCtxt ... ok
test bindings::bindgen_test_layout__xmlDoc ... ok
test bindings::bindgen_test_layout__xmlDtd ... ok
test bindings::bindgen_test_layout__xmlElement ... ok
test bindings::bindgen_test_layout__xmlElementContent ... ok
test bindings::bindgen_test_layout__xmlEntity ... ok
test bindings::bindgen_test_layout__xmlEnumeration ... ok
test bindings::bindgen_test_layout__xmlError ... ok
test bindings::bindgen_test_layout__xmlGlobalState ... ok
test bindings::bindgen_test_layout__xmlID ... ok
test bindings::bindgen_test_layout__xmlLocationSet ... ok
test bindings::bindgen_test_layout__xmlNode ... ok
test bindings::bindgen_test_layout__xmlNodeSet ... ok
test bindings::bindgen_test_layout__xmlNotation ... ok
test bindings::bindgen_test_layout__xmlNs ... ok
test bindings::bindgen_test_layout__xmlOutputBuffer ... ok
test bindings::bindgen_test_layout__xmlParserCtxt ... FAILED
test bindings::bindgen_test_layout__xmlParserInput ... FAILED
test bindings::bindgen_test_layout__xmlParserInputBuffer ... ok
test bindings::bindgen_test_layout__xmlParserNodeInfo ... FAILED
test bindings::bindgen_test_layout__xmlParserNodeInfoSeq ... FAILED
test bindings::bindgen_test_layout__xmlRef ... ok
test bindings::bindgen_test_layout__xmlSAXHandler ... ok
test bindings::bindgen_test_layout__xmlSAXHandlerV1 ... ok
test bindings::bindgen_test_layout__xmlSAXLocator ... ok
test bindings::bindgen_test_layout__xmlSchema ... ok
test bindings::bindgen_test_layout__xmlSchemaAnnot ... ok
test bindings::bindgen_test_layout__xmlSchemaAttribute ... ok
test bindings::bindgen_test_layout__xmlSchemaAttributeGroup ... ok
test bindings::bindgen_test_layout__xmlSchemaAttributeLink ... ok
test bindings::bindgen_test_layout__xmlSchemaElement ... ok
test bindings::bindgen_test_layout__xmlSchemaFacet ... ok
test bindings::bindgen_test_layout__xmlSchemaFacetLink ... ok
test bindings::bindgen_test_layout__xmlSchemaNotation ... ok
test bindings::bindgen_test_layout__xmlSchemaType ... ok
test bindings::bindgen_test_layout__xmlSchemaTypeLink ... ok
test bindings::bindgen_test_layout__xmlSchemaWildcard ... ok
test bindings::bindgen_test_layout__xmlSchemaWildcardNs ... ok
test bindings::bindgen_test_layout__xmlShellCtxt ... ok
test bindings::bindgen_test_layout__xmlURI ... ok
test bindings::bindgen_test_layout__xmlValidCtxt ... ok
test bindings::bindgen_test_layout__xmlXPathAxis ... ok
test bindings::bindgen_test_layout__xmlXPathContext ... ok
test bindings::bindgen_test_layout__xmlXPathFunct ... ok
test bindings::bindgen_test_layout__xmlXPathObject ... ok
test bindings::bindgen_test_layout__xmlXPathParserContext ... ok
test bindings::bindgen_test_layout__xmlXPathType ... ok
test bindings::bindgen_test_layout__xmlXPathVariable ... ok
test bindings::bindgen_test_layout_div_t ... ok
test bindings::bindgen_test_layout_drand48_data ... ok
test bindings::bindgen_test_layout_fd_set ... FAILED
test bindings::bindgen_test_layout_ldiv_t ... FAILED
test bindings::bindgen_test_layout_lldiv_t ... ok
test bindings::bindgen_test_layout_max_align_t ... ok
test bindings::bindgen_test_layout_pthread_attr_t ... ok
test bindings::bindgen_test_layout_pthread_barrier_t ... ok
test bindings::bindgen_test_layout_pthread_barrierattr_t ... ok
test bindings::bindgen_test_layout_pthread_cond_t ... ok
test bindings::bindgen_test_layout_pthread_condattr_t ... ok
test bindings::bindgen_test_layout_pthread_mutex_t ... ok
test bindings::bindgen_test_layout_pthread_mutexattr_t ... ok
test bindings::bindgen_test_layout_pthread_rwlock_t ... ok
test bindings::bindgen_test_layout_pthread_rwlockattr_t ... ok
test bindings::bindgen_test_layout_random_data ... ok
test bindings::bindgen_test_layout_timespec ... FAILED
test bindings::bindgen_test_layout_timeval ... FAILED
failures:
---- bindings::bindgen_test_layout__G_fpos_t stdout ----
thread 'bindings::bindgen_test_layout__G_fpos_t' panicked at 'assertion failed: `(left == right)`
left: `12`,
right: `16`: Size of: _G_fpos_t', src\bindings.rs:744:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- bindings::bindgen_test_layout__G_fpos64_t stdout ----
thread 'bindings::bindgen_test_layout__G_fpos64_t' panicked at 'assertion failed: `(left == right)`
left: `12`,
right: `16`: Size of: _G_fpos64_t', src\bindings.rs:783:3
---- bindings::bindgen_test_layout__IO_FILE stdout ----
thread 'bindings::bindgen_test_layout__IO_FILE' panicked at 'assertion failed: `(left == right)`
left: `208`,
right: `216`: Size of: _IO_FILE', src\bindings.rs:910:3
---- bindings::bindgen_test_layout___pthread_rwlock_arch_t stdout ----
thread 'bindings::bindgen_test_layout___pthread_rwlock_arch_t' panicked at 'assertion failed: `(left == right)`
left: `48`,
right: `56`: Size of: __pthread_rwlock_arch_t', src\bindings.rs:11721:3
---- bindings::bindgen_test_layout___sigset_t stdout ----
thread 'bindings::bindgen_test_layout___sigset_t' panicked at 'assertion failed: `(left == right)`
left: `64`,
right: `128`: Size of: __sigset_t', src\bindings.rs:11537:3
---- bindings::bindgen_test_layout__xmlParserCtxt stdout ----
thread 'bindings::bindgen_test_layout__xmlParserCtxt' panicked at 'assertion failed: `(left == right)`
left: `720`,
right: `752`: Size of: _xmlParserCtxt', src\bindings.rs:7749:3
---- bindings::bindgen_test_layout__xmlParserInput stdout ----
thread 'bindings::bindgen_test_layout__xmlParserInput' panicked at 'assertion failed: `(left == right)`
left: `96`,
right: `104`: Size of: _xmlParserInput', src\bindings.rs:7319:3
---- bindings::bindgen_test_layout__xmlParserNodeInfo stdout ----
thread 'bindings::bindgen_test_layout__xmlParserNodeInfo' panicked at 'assertion failed: `(left == right)`
left: `24`,
right: `40`: Size of: _xmlParserNodeInfo', src\bindings.rs:7498:3
---- bindings::bindgen_test_layout__xmlParserNodeInfoSeq stdout ----
thread 'bindings::bindgen_test_layout__xmlParserNodeInfoSeq' panicked at 'assertion failed: `(left == right)`
left: `16`,
right: `24`: Size of: _xmlParserNodeInfoSeq', src\bindings.rs:7570:3
---- bindings::bindgen_test_layout_fd_set stdout ----
thread 'bindings::bindgen_test_layout_fd_set' panicked at 'assertion failed: `(left == right)`
left: `64`,
right: `128`: Size of: fd_set', src\bindings.rs:11646:3
---- bindings::bindgen_test_layout_ldiv_t stdout ----
thread 'bindings::bindgen_test_layout_ldiv_t' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `16`: Size of: ldiv_t', src\bindings.rs:11348:3
---- bindings::bindgen_test_layout_timespec stdout ----
thread 'bindings::bindgen_test_layout_timespec' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `16`: Size of: timespec', src\bindings.rs:11606:3
---- bindings::bindgen_test_layout_timeval stdout ----
thread 'bindings::bindgen_test_layout_timeval' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `16`: Size of: timeval', src\bindings.rs:11567:3
failures:
bindings::bindgen_test_layout__G_fpos64_t
bindings::bindgen_test_layout__G_fpos_t
bindings::bindgen_test_layout__IO_FILE
bindings::bindgen_test_layout___pthread_rwlock_arch_t
bindings::bindgen_test_layout___sigset_t
bindings::bindgen_test_layout__xmlParserCtxt
bindings::bindgen_test_layout__xmlParserInput
bindings::bindgen_test_layout__xmlParserNodeInfo
bindings::bindgen_test_layout__xmlParserNodeInfoSeq
bindings::bindgen_test_layout_fd_set
bindings::bindgen_test_layout_ldiv_t
bindings::bindgen_test_layout_timespec
bindings::bindgen_test_layout_timeval
test result: FAILED. 83 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--lib'
I also tried it on debian WSL, where those tests pass, but some others fail due to windows line endings...
cargo test --features pkg-config
running 96 tests
test bindings::bindgen_test_layout_UConverterFromUnicodeArgs ... ok
test bindings::bindgen_test_layout_UConverterToUnicodeArgs ... ok
test bindings::bindgen_test_layout__G_fpos64_t ... ok
test bindings::bindgen_test_layout__G_fpos_t ... ok
test bindings::bindgen_test_layout__IO_FILE ... ok
test bindings::bindgen_test_layout___fsid_t ... ok
test bindings::bindgen_test_layout__IO_marker ... ok
test bindings::bindgen_test_layout___mbstate_t__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___mbstate_t ... ok
test bindings::bindgen_test_layout___pthread_cond_s ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2 ... ok
test bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___pthread_internal_list ... ok
test bindings::bindgen_test_layout___pthread_mutex_s ... ok
test bindings::bindgen_test_layout___pthread_rwlock_arch_t ... ok
test bindings::bindgen_test_layout___sigset_t ... ok
test bindings::bindgen_test_layout___va_list_tag ... ok
test bindings::bindgen_test_layout__htmlElemDesc ... ok
test bindings::bindgen_test_layout__htmlEntityDesc ... ok
test bindings::bindgen_test_layout__uconv_t ... ok
test bindings::bindgen_test_layout__xlinkHandler ... ok
test bindings::bindgen_test_layout__xmlChRangeGroup ... ok
test bindings::bindgen_test_layout__xmlBuffer ... ok
test bindings::bindgen_test_layout__xmlAttr ... ok
test bindings::bindgen_test_layout__xmlAttribute ... ok
test bindings::bindgen_test_layout__xmlChLRange ... ok
test bindings::bindgen_test_layout__xmlChSRange ... ok
test bindings::bindgen_test_layout__xmlCharEncodingHandler ... ok
test bindings::bindgen_test_layout__xmlDOMWrapCtxt ... ok
test bindings::bindgen_test_layout__xmlDoc ... ok
test bindings::bindgen_test_layout__xmlDtd ... ok
test bindings::bindgen_test_layout__xmlElement ... ok
test bindings::bindgen_test_layout__xmlElementContent ... ok
test bindings::bindgen_test_layout__xmlEntity ... ok
test bindings::bindgen_test_layout__xmlEnumeration ... ok
test bindings::bindgen_test_layout__xmlError ... ok
test bindings::bindgen_test_layout__xmlGlobalState ... ok
test bindings::bindgen_test_layout__xmlID ... ok
test bindings::bindgen_test_layout__xmlLocationSet ... ok
test bindings::bindgen_test_layout__xmlNode ... ok
test bindings::bindgen_test_layout__xmlNodeSet ... ok
test bindings::bindgen_test_layout__xmlNotation ... ok
test bindings::bindgen_test_layout__xmlNs ... ok
test bindings::bindgen_test_layout__xmlOutputBuffer ... ok
test bindings::bindgen_test_layout__xmlParserCtxt ... ok
test bindings::bindgen_test_layout__xmlParserInput ... ok
test bindings::bindgen_test_layout__xmlParserInputBuffer ... ok
test bindings::bindgen_test_layout__xmlParserNodeInfo ... ok
test bindings::bindgen_test_layout__xmlParserNodeInfoSeq ... ok
test bindings::bindgen_test_layout__xmlRef ... ok
test bindings::bindgen_test_layout__xmlSAXHandler ... ok
test bindings::bindgen_test_layout__xmlSAXHandlerV1 ... ok
test bindings::bindgen_test_layout__xmlSAXLocator ... ok
test bindings::bindgen_test_layout__xmlSchema ... ok
test bindings::bindgen_test_layout__xmlSchemaAnnot ... ok
test bindings::bindgen_test_layout__xmlSchemaAttribute ... ok
test bindings::bindgen_test_layout__xmlSchemaAttributeGroup ... ok
test bindings::bindgen_test_layout__xmlSchemaAttributeLink ... ok
test bindings::bindgen_test_layout__xmlSchemaElement ... ok
test bindings::bindgen_test_layout__xmlSchemaFacet ... ok
test bindings::bindgen_test_layout__xmlSchemaFacetLink ... ok
test bindings::bindgen_test_layout__xmlSchemaNotation ... ok
test bindings::bindgen_test_layout__xmlSchemaType ... ok
test bindings::bindgen_test_layout__xmlSchemaTypeLink ... ok
test bindings::bindgen_test_layout__xmlSchemaWildcard ... ok
test bindings::bindgen_test_layout__xmlSchemaWildcardNs ... ok
test bindings::bindgen_test_layout__xmlShellCtxt ... ok
test bindings::bindgen_test_layout__xmlURI ... ok
test bindings::bindgen_test_layout__xmlValidCtxt ... ok
test bindings::bindgen_test_layout__xmlXPathAxis ... ok
test bindings::bindgen_test_layout__xmlXPathContext ... ok
test bindings::bindgen_test_layout__xmlXPathFunct ... ok
test bindings::bindgen_test_layout__xmlXPathObject ... ok
test bindings::bindgen_test_layout__xmlXPathParserContext ... ok
test bindings::bindgen_test_layout__xmlXPathType ... ok
test bindings::bindgen_test_layout__xmlXPathVariable ... ok
test bindings::bindgen_test_layout_div_t ... ok
test bindings::bindgen_test_layout_drand48_data ... ok
test bindings::bindgen_test_layout_fd_set ... ok
test bindings::bindgen_test_layout_ldiv_t ... ok
test bindings::bindgen_test_layout_lldiv_t ... ok
test bindings::bindgen_test_layout_max_align_t ... ok
test bindings::bindgen_test_layout_pthread_attr_t ... ok
test bindings::bindgen_test_layout_pthread_barrier_t ... ok
test bindings::bindgen_test_layout_pthread_barrierattr_t ... ok
test bindings::bindgen_test_layout_pthread_cond_t ... ok
test bindings::bindgen_test_layout_pthread_condattr_t ... ok
test bindings::bindgen_test_layout_pthread_mutex_t ... ok
test bindings::bindgen_test_layout_pthread_mutexattr_t ... ok
test bindings::bindgen_test_layout_pthread_rwlock_t ... ok
test bindings::bindgen_test_layout_pthread_rwlockattr_t ... ok
test bindings::bindgen_test_layout_random_data ... ok
test bindings::bindgen_test_layout_timespec ... ok
test bindings::bindgen_test_layout_timeval ... ok
test result: ok. 96 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/base_tests-dbd55dfa3851e3b8
running 13 tests
test create_pi ... ok
test can_parse_xml_string ... ok
test can_load_html_file ... ok
test document_formatted_serialization ... ok
test document_can_import_node ... ok
test well_formed_html ... ok
test hello_builder ... ok
test duplicate_file ... ok
test simple_serialization_unformatted ... ok
test serialization_no_empty ... FAILED
test serialization_as_html ... FAILED
test simple_serialization_test01 ... FAILED
test simple_serialization_namespaces ... FAILED
failures:
---- serialization_no_empty stdout ----
thread 'serialization_no_empty' panicked at 'assertion failed: `(left == right)`
left: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?>\r<root>\r<child></child>\r<child></child>\r</root>\r"`,
right: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?><root><child></child><child></child></root>"`', tests/base_tests.rs:225:3
---- serialization_as_html stdout ----
thread 'serialization_as_html' panicked at 'assertion failed: `(left == right)`
left: `"<html>\r<head><metahttp-equiv=\"Content-Type\"content=\"text/html;charset=UTF-8\">\r<title>PageTitle</title>\r</head>\r<body>\r\r<h1>ThisisaHeading</h1>\r<p>Thisisaparagraph.</p>\r\r</body>\r</html>\r"`,
right: `"<html><head><metahttp-equiv=\"Content-Type\"content=\"text/html;charset=UTF-8\"><title>PageTitle</title></head><body><h1>ThisisaHeading</h1><p>Thisisaparagraph.</p></body></html>"`', tests/base_tests.rs:250:3
---- simple_serialization_test01 stdout ----
thread 'simple_serialization_test01' panicked at 'assertion failed: `(left == right)`
left: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?>\r<root>\r<childattribute=\"value\">sometext</child>\r<childattribute=\"empty\">moretext</child>\r</root>\r"`,
right: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?><root><childattribute=\"value\">sometext</child><childattribute=\"empty\">moretext</child></root>"`', tests/base_tests.rs:181:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- simple_serialization_namespaces stdout ----
thread 'simple_serialization_namespaces' panicked at 'assertion failed: `(left == right)`
left: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?>\r<r:rootxmlns:h=\"http://example.com/ns/hello\"xmlns:f=\"http://example.com/ns/farewell\"\rxmlns:r=\"http://example.com/ns/root\">\r\r<h:table>\r<h:tr>\r<h:td>col1</h:td>\r<h:td>col2</h:td>\r</h:tr>\r</h:table>\r\r<f:mock>\r<f:doublemock/>\r</f:mock>\r\r<f:footer>\r<h:table>\r<h:tr>\r<h:td>col3</h:td>\r<f:footer>nestedf</f:footer>\r</h:tr>\r</h:table>\r</f:footer>\r</r:root>\r"`,
right: `"<?xmlversion=\"1.0\"encoding=\"UTF-8\"?><r:rootxmlns:h=\"http://example.com/ns/hello\"xmlns:f=\"http://example.com/ns/farewell\"xmlns:r=\"http://example.com/ns/root\"><h:table><h:tr><h:td>col1</h:td><h:td>col2</h:td></h:tr></h:table><f:mock><f:doublemock/></f:mock><f:footer><h:table><h:tr><h:td>col3</h:td><f:footer>nestedf</f:footer></h:tr></h:table></f:footer></r:root>"`', tests/base_tests.rs:181:3
failures:
serialization_as_html
serialization_no_empty
simple_serialization_namespaces
simple_serialization_test01
test result: FAILED. 9 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--test base_tests'
Alright, thanks to @JoshuaNitschke we now have a working vcpkg build with OS detection, and I have added an Appveyor build to keep that tested and operational. Thanks to everyone here for pushing for Windows support, it feels great to simply be a facilitator 👍
I've shipped a version 0.2.15 to crates.io, so I'm happy to close here and await further reports as you start using the crate on Windows machines. Enjoy!
Activity
dginev commentedon Apr 19, 2020
Short answer is that the crate has never been used under windows, so it is expected behavior for it to fail on a first try. I haven't actually even used rust itself under windows, so I wouldn't be able to offer any patches on a short notice. Happy to merge in any PRs that offer upgrades in this direction however, always welcome!
coding-yogi commentedon Apr 19, 2020
Thanks, I have no clue why it fails so unfortunately cannot submit any PR. This is the only lib which I found to be working well in case of XML and HTML xpath parsing.
Only thing I tried is downloading libxml2 for windows and adding it to path with no luck
coding-yogi commentedon Apr 26, 2020
Somehow got it built on windows using MSYS2 and mingw64 , is it possible to statically link libxml2 so that on windows I do not need the libxml2 and its dependecies?
dginev commentedon Apr 27, 2020
Good to hear @coding-yogi . And I wouldn't bundle in libxlm2 directly no, definitely not a fan of carrying it around. I am instead waiting on the complete rust transpilation of libxml2 by c2rust. We've had some discussions with them that they may either publish that as a standalone crate or bundle it with this wrapper, when they feel ready, so that may be a roundabout way of getting simpler windows builds.
coding-yogi commentedon Apr 27, 2020
Good to know, will close this issue for now
dginev commentedon Sep 11, 2020
Hi @simoin , any reason
pkg_configwasn't sufficient for you? I am not familiar wit the vcpkg ecosystem at all, so unsure if we should have it always supported, or if this is an equivalent alternative?Thanks for sharing!
JoshuaNitschke commentedon Sep 23, 2020
This issue is closed, if @simoin were to make a pull request with his change to support Vcpkg, would it be merged @dginev ?
dginev commentedon Sep 23, 2020
That verbatim change mentioned in the first comment may be a bit heavy, since it means we'll have both
pkg_configandvcpkgas simultaneous dependencies. But I will be happy to merge a PR that uses a feature guard in Cargo.toml, as libsqlite3-sys does, to choose one or the other. And I can quickly make a new crate release afterwards.I can also do the work myself, but no promises as to when just yet...
JoshuaNitschke commentedon Sep 23, 2020
@dginev I haven't had any luck at all getting pkg_config to work on Windows, so I think this would be a big help.
I'm not at all familiar with C++ and generating bindings, but I'll try to take a stab the feature guard and see if I can get my project to compile on my windows box. If I can make it work, I'll submit a PR. Should I use this issue or make a new one?
dginev commentedon Sep 23, 2020
Feel free to use this one, and thanks for giving it a shot! I'll look into setting up CI for a windows build for the repo, should help maintain both builds operational.
JoshuaNitschke commentedon Sep 24, 2020
I worked on it tonight, I have the feature flag working, but a question and an issue:
I also tried it on debian WSL, where those tests pass, but some others fail due to windows line endings...
#72-add-vcpkg-optional-dependency
JoshuaNitschke commentedon Sep 29, 2020
@dginev looks like merging didn't close this issue since I failed to tag it properly.
dginev commentedon Sep 29, 2020
No worries, will close here as soon as I get the release out 👍
dginev commentedon Sep 29, 2020
Alright, thanks to @JoshuaNitschke we now have a working vcpkg build with OS detection, and I have added an Appveyor build to keep that tested and operational. Thanks to everyone here for pushing for Windows support, it feels great to simply be a facilitator 👍
I've shipped a version
0.2.15to crates.io, so I'm happy to close here and await further reports as you start using the crate on Windows machines. Enjoy!