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

Libc 024 #219

Closed
wants to merge 5 commits into from
Closed

Libc 024 #219

wants to merge 5 commits into from

Conversation

j16r
Copy link
Contributor

@j16r j16r commented Dec 23, 2015

This is an attempt to get nix-rust compiling on FreeBSD. It' built on top of marjakm's fork which upgraded libc to 0.2.2.

@j16r
Copy link
Contributor Author

j16r commented Dec 23, 2015

Unfortunately none of the Travis builds are on FreeBSD and I definitely have sys::test_socket::test_scm_rights failing locally. Any tips on how I might add that builder?

@arthurprs
Copy link
Contributor

Thank you for that. I'll use your fork meanwhile.

EDIT:

here's what I get

/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:208:44: 208:69 error: unresolved name `libc::IPV6_ADD_MEMBERSHIP` [E0425]
/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:208     pub const IPV6_ADD_MEMBERSHIP: c_int = libc::IPV6_ADD_MEMBERSHIP;
                                                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:208:44: 208:69 help: run `rustc --explain E0425` to see a detailed explanation
/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:210:45: 210:71 error: unresolved name `libc::IPV6_DROP_MEMBERSHIP` [E0425]
/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:210     pub const IPV6_DROP_MEMBERSHIP: c_int = libc::IPV6_DROP_MEMBERSHIP;
                                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cargo/git/checkouts/nix-rust-bf0f6980b5e5fa55/master/src/sys/socket/consts.rs:210:45: 210:71 help: run `rustc --explain E0425` to see a detailed explanation
   Compiling regex v0.1.44
/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.3.9/src/unistd.rs:129:9: 129:22 error: unused import, #[deny(unused_imports)] on by default
/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.3.9/src/unistd.rs:129     use errno::EINVAL;
                                                                                          ^~~~~~~~~~~~~
error: aborting due to previous error

@j16r
Copy link
Contributor Author

j16r commented Dec 23, 2015

What platform are you on @arthurprs ?

@arthurprs
Copy link
Contributor

@j16r freebsd 10.2 amd64

@j16r
Copy link
Contributor Author

j16r commented Dec 23, 2015

Weird, I explicitly disabled that line for freebsd in commit 5df11f4. Are you cross compiling? Can you confirm you're building with target_os = freebsd? I'm building on the same platform and not getting your error, weird.

@arthurprs
Copy link
Contributor

It looks like cargo was using an old commit, I added an explicit commit and it now fails with

root@:~/Desktop/floki # cargo test
    Updating git repository `https://github.com/j16r/nix-rust.git`
   Compiling nix v0.3.9
   Compiling nix v0.5.0-pre (https://github.com/j16r/nix-rust.git?rev=84d2c24d428a885e8d7500852b8b08714ab48598#84d2c24d)
   Compiling env_logger v0.3.2
   Compiling uuid v0.1.18
   Compiling twox-hash v0.1.1
/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.3.9/src/unistd.rs:129:9: 129:22 error: unused import, #[deny(unused_imports)] on by default
/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/nix-0.3.9/src/unistd.rs:129     use errno::EINVAL;
                                                                                          ^~~~~~~~~~~~~
error: aborting due to previous error

@j16r
Copy link
Contributor Author

j16r commented Dec 23, 2015

Looks like you have two references to nix, one of them is pulling 0.3.9.

@arthurprs
Copy link
Contributor

Oh, I see. It's mio, but I can't find a way to override that.

@arthurprs
Copy link
Contributor

Ok I went around it using .cargo/config and it looks like your PR is fine :)

mio will need some adjustments before compiling on it though

@arthurprs
Copy link
Contributor

@j16r I sent a PR to your fork in order to get mio working properly.

@j16r
Copy link
Contributor Author

j16r commented Dec 29, 2015

@arthurprs legend! I've merged it in.

@carllerche
Copy link
Contributor

Thanks! Going to look at this now. Sorry for the delay.

@carllerche
Copy link
Contributor

I'm trying to validate Mio working with this before merging.

@carllerche
Copy link
Contributor

I am unsure how CI is passing given that it won't compile on my box... libc::IPV6_ADD_MEMBERSHIP doesn't seem to exist anymore for OS X (renamed).

@carllerche
Copy link
Contributor

Oops, never mind. I was half way through a rebase

@carllerche
Copy link
Contributor

Ok, let's see if Mio CI will pass with this: tokio-rs/mio#343

@carllerche carllerche mentioned this pull request Jan 19, 2016
@arthurprs
Copy link
Contributor

I guess we can close this now since pr343 is in

@carllerche
Copy link
Contributor

Ah yes. Thanks

@carllerche carllerche closed this Jan 22, 2016
@j16r
Copy link
Contributor Author

j16r commented Jan 22, 2016

Hmm, I'm confused. pr343 is on mio. With this closed I'm still unable to use nix-rust on FreeBSD?

@kamalmarhubi
Copy link
Member

@j16r this was merged in. I'm not sure what incantation @carllerche uses, but it results in him having to close PRs even when they are merged in. You can see the commits on this PR in the github history: https://github.com/carllerche/nix-rust/commits/master

@j16r
Copy link
Contributor Author

j16r commented Jan 22, 2016

Oh, I missed that, thanks.

@j16r j16r deleted the libc_024 branch January 22, 2016 20:59
@kamalmarhubi kamalmarhubi mentioned this pull request Mar 2, 2016
This pull request was closed.
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

Successfully merging this pull request may close these issues.

5 participants