-
Notifications
You must be signed in to change notification settings - Fork 40
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
Build failing on MacOS X #88
Comments
This issue is now resolved. The steps taken were as follows: I downloaded, built and installed the libxml2-2.9.12 tarball, using --prefix=/usr/local Set environment variable LIBXML2=/usr/local/lib/pkgconfig/libxml-2.0.pc; export LIBXML2 cargo build was then successful. I would suggest adding these steps to the README. |
Thanks for troubleshooting that installation @ballsteve ! I am surprised, I would've expected Mac OS to be successful via the pkg-config route. I am not a Mac user myself, but pkg-config seems widely available on the various package managers. The resolution path you've taken was meant for embedded devices that can't add extra dependencies, so while I'm happy you got things working, it's also too manual to be satisfied... |
Further to the above resolution, I also had to create a symbolic link for /usr/local/lib/libxml-2.0.dylib to libxml2.2.dylib. So that's even more manual intervention required! |
Thanks to @ballsteve, here are the steps it took me to compile this crate on macOS:
Adding these steps, along with the windows compilation instruction to the README would be really nice 🙂 |
When I try using the libxml crate on a Mac OS X laptop, I get the following build error:
thread 'main' panicked at 'Could not find libxml2.', /Users/balls/.cargo/registry/src/esyshub.st101.workers.dev-1ecc6299db9ec823/libxml-0.3.0/build.rs:25:5
This appears to be similar to other issues (#81, #72), but they were on Windows so I don't think the answer/resolution will be the same.
Is the crate looking for an existing installation of libxml2? If so then how can I point the build to it?
The text was updated successfully, but these errors were encountered: