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

Problem compiling in OS X #68

Closed
franleplant opened this issue Sep 18, 2016 · 3 comments
Closed

Problem compiling in OS X #68

franleplant opened this issue Sep 18, 2016 · 3 comments

Comments

@franleplant
Copy link

Hi!

Im trying to compile a simple example in OS X but I get an error.
These are my specs:

$ rustc --version
rustc 1.8.0 (db2939409 2016-04-11)

$ cargo --version
cargo 0.9.0-nightly (8fc3fd8 2016-02-29)

$  uname -a
Darwin mac-plant 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64

And this is an error

mac-plant ➜  mysqlrust git:(master) ✗ cargo run
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling mysql v7.1.2
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293:26: 293:47 error: failed to resolve. Could not find `net` in `std::os::unix` [E0433]
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293     UnixStream(BufStream<unix::net::UnixStream>),
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293:26: 293:47 help: run `rustc --explain E0433` to see a detailed explanation
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293:26: 293:47 error: type name `unix::net::UnixStream` is undefined or not in scope [E0412]
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293     UnixStream(BufStream<unix::net::UnixStream>),
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293:26: 293:47 help: run `rustc --explain E0412` to see a detailed explanation
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/io.rs:293:26: 293:47 help: no candidates by the name of `UnixStream` found in your project; maybe you misspelled the name or forgot to import an external crate?
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107:19: 1107:49 error: failed to resolve. Could not find `net` in `std::os::unix` [E0433]
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107             match unix::net::UnixStream::connect(unix_addr) {
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107:19: 1107:49 help: run `rustc --explain E0433` to see a detailed explanation
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107:19: 1107:49 error: unresolved name `unix::net::UnixStream::connect` [E0425]
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107             match unix::net::UnixStream::connect(unix_addr) {
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1107:19: 1107:49 help: run `rustc --explain E0425` to see a detailed explanation
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1109:26: 1109:87 error: the type of this value must be known in this context
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1109                     try!(stream.set_read_timeout(self.opts.get_read_timeout().clone()));
                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1109:21: 1109:89 note: in this expansion of try! (defined in <std macros>)
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1117:71: 1117:79 error: the type of this value must be known in this context
/Users/flp/.cargo/registry/src/github.com-88ac128001ac3a9a/mysql-7.1.2/src/conn/mod.rs:1117                     Err(DriverError(CouldNotConnect(Some((addr, desc, e.kind())))))
                                                                                                                                                                  ^~~~~~~~
error: aborting due to 2 previous errors
Could not compile `mysql`.

Thanks a lot!

PS: I'm just playing with it so no hurry or pressure, but I just wanted to do this minimal contribution to the lib.

@franleplant
Copy link
Author

I can confirm that this also happens on linux and I can also confirm that it goes away with rust 1.10.

@blackbeam
Copy link
Owner

Yeah. I tried to find a way to specify minimum required rust version in Cargo.toml, but couldn't.
Looks like it's still impossible (rust-lang/cargo#2751).

@franleplant
Copy link
Author

No problem. Probably a good idea to either document thoa fact or to improve
the title of this issue. For later we could use something like "minimun
rust required version problem"

On Sun, Sep 18, 2016, 14:51 AnatolyI [email protected] wrote:

Yeah. I tried to find a way to specify minimum required rust version in
Cargo.toml, but couldn't.
Looks like it's still impossible (rust-lang/cargo#2751
rust-lang/cargo#2751).


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#68 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABxEJzVRZOrmGhaWbCjeBhuuaRVrIXG7ks5qrXo4gaJpZM4J_7Nt
.

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