Skip to content
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

Unable to build on Mac with MacPorts libgit2 #42

Closed
rpgoldman opened this issue Mar 1, 2015 · 3 comments
Closed

Unable to build on Mac with MacPorts libgit2 #42

rpgoldman opened this issue Mar 1, 2015 · 3 comments

Comments

@rpgoldman
Copy link

I pulled exa, installed rust, cmake, and libgit2 (the last two from MacPorts). But the "cargo build" failed with the following errors:

   Compiling libssh2-sys v0.1.8
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:109:36: 109:64 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
 expected struct `std::old_path::posix::Path`,
    found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:109                                   .chain(Some(val).into_iter())).unwrap();
                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
 expected struct `std::old_path::posix::Path`,
    found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108     let val = env::join_paths(env::split_paths(&prefix)
                                                                                                         ^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 note: required by `std::env::join_paths`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108     let val = env::join_paths(env::split_paths(&prefix)
                                                                                                         ^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 error: type mismatch resolving `<core::option::IntoIter<std::old_path::posix::Path> as core::iter::Iterator>::Item == std::path::PathBuf`:
 expected struct `std::old_path::posix::Path`,
    found struct `std::path::PathBuf` [E0271]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108     let val = env::join_paths(env::split_paths(&prefix)
                                                                                                         ^~~~~~~~~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108:15: 108:30 note: required by `std::env::join_paths`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.1.14/build.rs:108     let val = env::join_paths(env::split_paths(&prefix)
                                                                                                         ^~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
Build failed, waiting for other jobs to finish...
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:19: 130:27 error: type `&std::path::PathBuf` does not implement any method in scope named `exists`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130     }).find(|p| p.exists())
                                                                                                            ^~~~~~~~
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:27: 130:27 help: methods from traits can only be called if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130:27: 130:27 help: candidate #1: use `std::fs::PathExt`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:128:5: 130:28 error: mismatched types:
 expected `core::option::Option<std::old_path::posix::Path>`,
    found `core::option::Option<std::path::PathBuf>`
(expected struct `std::old_path::posix::Path`,
    found struct `std::path::PathBuf`) [E0308]
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:128     env::split_paths(&env::var("PATH").unwrap()).map(|p| {
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:129         p.join(&cmd)
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.1.8/build.rs:130     }).find(|p| p.exists())
error: aborting due to 2 previous errors
@rpgoldman
Copy link
Author

Also fails with no-default-features:

   Compiling regex_macros v0.1.8
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/regex_macros-0.1.8/src/lib.rs:29:45: 29:52 error: unresolved import `syntax::ext::base::MacExpr`. There is no `MacExpr` in `syntax::ext::base`
/Users/rpg/.cargo/registry/src/github.com-1ecc6299db9ec823/regex_macros-0.1.8/src/lib.rs:29 use syntax::ext::base::{ExtCtxt, MacResult, MacExpr, DummyResult};
                                                                                                                                        ^~~~~~~
error: aborting due to previous error
Could not compile `regex_macros`.

@ogham
Copy link
Owner

ogham commented Mar 2, 2015

I made exa use the latest version of libgit2-rs, which should fix the problems you encounter. Could you please try again?

@rpgoldman
Copy link
Author

Thanks. That worked. BTW, I still had a bit of trouble installing with the makefile because exa was built in target/exa, not target/release/exa. But other than that, all was well (actually, there's an odd interaction between sudo make install and cargo, but I can report that separately).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants