-
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 fails on macOS #1
Comments
I'd be happy to receive build patches for other OSes. I don't have a Mac. :-/ |
rust-lang/cargo#1032 seems relevant. Can you check where your libiconv is, if cmake can find it correctly and if it invokes linking with the right paths ( |
Thanks! I'll check that out. |
The problem seems to be the same. It tries to link with I don't know how to fix it though, since I'm not familiar with cmake. |
Try something like |
That works. Testing fails with this
|
Great. :-) As for testing I didn't put those instructions in the README at the time. If you have cask installed you should be able to do |
Using |
That's very strange. The load-path is tweaked in |
Silly me. I should have remembered this. Shared libs in macOS has |
|
I think we should set up Travis integration for this now, to iterate faster. They support testing on mac OS. Integration is pretty simple, like this: https://github.com/ubolonton/emacs-module-rs/blob/master/.travis.yml |
Yep, agree. I thought Emacs would look for |
https://github.com/TheBB/libegit2/pull/4 Here's a PR for Travis. I fixed some of the OSX build issues in cmake, so it should be easier for you. I suppose you still have to set the prefix path though. Three tests fail on OSX. In each case libgit returns a path starting with |
Looks like |
Tests are passing on OSX and I've added the macports gotcha to the readme. Thanks for helping with this. :-) |
🎉 |
EDIT: Readability 😂 I had this same issue; the problem is with cargo trying to use the macports libiconv (although probably same thing will happen with homebrew) instead of the system one. This can be reproduced, among other things, when a crate adds the package manager tree to the library/include search paths; one common reason it might happen is OpenSSL; because macOS by default ships an old version incompatible with cargo crates. I fixed it by applying several patches on libgit2-sys, libssh2, openssl-sys and openssl-src (I'm not sure whether all of these are actually needed, some are definitely better candidates than others). For my use-case I did it backwards (as I slowly understood the issue) but the first thing I'd try in order to fix this would be to default openssl-sys to the vendored version if on macOS. |
@TheBB for now on mac os build is broken. Instead of |
https://github.com/magit/libegit2/blob/master/src/CMakeLists.txt#L6-L10 That was purposeful. From what I could see based on the Travis tests, Emacs on OSX looked for Has that changed? |
This is not true. Maybe it's not true in emacs 27 only. But I have this issue. |
Could you PR a fix? I don't have an OSX computer so it's difficult for me to test. I assume safest would be to add a cmake directive to copy the generated file so there's both a |
I will try. |
Build fails on macOS 0.13.4 (17E199).
Package manager is MacPorts.
This is the error:
The text was updated successfully, but these errors were encountered: