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

Nix 0.8.0 fails to build on FreeBSD 10.3 #567

Closed
alexreg opened this issue Apr 2, 2017 · 23 comments
Closed

Nix 0.8.0 fails to build on FreeBSD 10.3 #567

alexreg opened this issue Apr 2, 2017 · 23 comments

Comments

@alexreg
Copy link

alexreg commented Apr 2, 2017

Here's the error log.

   Compiling nix v0.8.0
error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:173:21
    |
173 |                     B0 => BaudRate::B0,
    |                     ^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:174:21
    |
174 |                     B50 => BaudRate::B50,
    |                     ^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:175:21
    |
175 |                     B75 => BaudRate::B75,
    |                     ^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:176:21
    |
176 |                     B110 => BaudRate::B110,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:177:21
    |
177 |                     B134 => BaudRate::B134,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:178:21
    |
178 |                     B150 => BaudRate::B150,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:179:21
    |
179 |                     B200 => BaudRate::B200,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:180:21
    |
180 |                     B300 => BaudRate::B300,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:181:21
    |
181 |                     B600 => BaudRate::B600,
    |                     ^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:182:21
    |
182 |                     B1200 => BaudRate::B1200,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:183:21
    |
183 |                     B1800 => BaudRate::B1800,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:184:21
    |
184 |                     B2400 => BaudRate::B2400,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:185:21
    |
185 |                     B4800 => BaudRate::B4800,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:186:21
    |
186 |                     B9600 => BaudRate::B9600,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:187:21
    |
187 |                     B19200 => BaudRate::B19200,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:188:21
    |
188 |                     B38400 => BaudRate::B38400,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:189:21
    |
189 |                     B7200 => BaudRate::B7200,
    |                     ^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:190:21
    |
190 |                     B14400 => BaudRate::B14400,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:191:21
    |
191 |                     B28800 => BaudRate::B28800,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:192:21
    |
192 |                     B57600 => BaudRate::B57600,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:193:21
    |
193 |                     B76800 => BaudRate::B76800,
    |                     ^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:194:21
    |
194 |                     B115200 => BaudRate::B115200,
    |                     ^^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:195:21
    |
195 |                     B230400 => BaudRate::B230400,
    |                     ^^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:197:21
    |
197 |                     B460800 => BaudRate::B460800,
    |                     ^^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error[E0308]: mismatched types
   --> /home/alexuk/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.0/src/sys/termios.rs:199:21
    |
199 |                     B921600 => BaudRate::B921600,
    |                     ^^^^^^^ expected u64, found u32
    |
    = note: expected type `u64`
               found type `u32`

error: aborting due to 25 previous errors

error: Could not compile `nix`.
@alexreg alexreg changed the title Nix 0.8.0 does not build on FreeBSD 10.3 Nix 0.8.0 fails to build on FreeBSD 10.3 Apr 2, 2017
@berkowski
Copy link
Contributor

Compile errors should be fixed by #553, though the PR appears stalled.

@alexreg
Copy link
Author

alexreg commented Apr 4, 2017

Okay, great. Mind pinging me a new release is made, then I can test?

@kamalmarhubi
Copy link
Member

This seems bad. I'm going to try and make a point release to include the build fix this weekend. Will ping when done.

@Susurrus
Copy link
Contributor

Susurrus commented Apr 7, 2017

Note that a lot of this termios stuff is fixed in my stalled PR #527. There is a lot of stuff now in libc that we should rely on instead of reimplementing things. @kamalmarhubi You may find it useful to pick out the upstreamed stuff from that instead of just changing the nix definitions of all these constants.

Also, with the work ongoing in #536 we should try to add FreeBSD in there if we don't want to repeat these issues.

@Susurrus
Copy link
Contributor

Susurrus commented Apr 8, 2017

Also, according to the changes in #536 all this work is already done in the new-ci branch. (see build results here: https://travis-ci.org/nix-rust/nix/builds/219888273). Maybe we should push on getting that merged instead of doing any extra work?

@mmokhi
Copy link

mmokhi commented Apr 15, 2017

Sorry for ping on this,
Any release (at least because of this fix 😄) is planned in near future? (or even merging this in current 0.8.0 release)

@asomers
Copy link
Member

asomers commented Apr 15, 2017

It's fixed in the new-ci/master branch. Finishing that branch and merging it is our highest priority ATM. But in the meantime, you can use it. The last known bug only concerns musl.

@mmokhi
Copy link

mmokhi commented Apr 15, 2017

I'm not using it directly.
I'm building another project (on FreeBSD) that uses Cargo, and it's downloading the 0.8.0 as far as I understood.
Anyway to modify that behavior of cargo?

@asomers
Copy link
Member

asomers commented Apr 15, 2017

I haven't found a good way to do it. What I do is clone the project locally and modify its Cargo.toml file to point to the branch I want. Then I modify my project's Cargo.toml file to point to my local clone of the intermediate project using a path directive, like mio = { path = "/home/somers/src/rust/mio" }

@mmokhi
Copy link

mmokhi commented Apr 15, 2017

Good hint.
I'll try it, thanks 😉

@kamalmarhubi
Copy link
Member

I'm sorry I failed to get to this last week. Is this fixed in nix/master?

@asomers
Copy link
Member

asomers commented Apr 15, 2017

@kamalmarhubi do you mean new-ci/master? Yes, it is.

@Susurrus
Copy link
Contributor

My plan is to finalize new-ci/master today and leave all failing architectures (which are new architectures to testing) as allow_failures. Then we can release a new version. Though since there was an API break, we should do a 0.9.0 release.

@kamalmarhubi
Copy link
Member

@asomers

@kamalmarhubi do you mean new-ci/master? Yes, it is.

Actually I meant the build failure on FreeBSD. If it's fixed, does anyone know which PR fixed it?

@Susurrus
Copy link
Contributor

#531

@Susurrus
Copy link
Contributor

Susurrus commented Apr 15, 2017

Sorry, its #536. I've added it to the CHANGELOG in #581

kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Apr 15, 2017
Cherry-pick:
- a859ee3 Switched bsd speed_t def. to libc::speed_t

Fixes nix-rust#567
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Apr 15, 2017
Cherry-pick:
- a859ee3 Switched bsd speed_t def. to libc::speed_t

Fixes nix-rust#567
@kamalmarhubi
Copy link
Member

@Alexrg @mmokhi could you try with this in your Cargo.toml:

nix = { git = "https://github.com/kamalmarhubi/nix-rust.git", branch = "fix-bsd-0.8.1" }

If it works, I'll release 0.8.1.

@Susurrus
Copy link
Contributor

@kamalmarhubi We have a breaking API change since 0.8.0, I'd recommend going to 0.9.0.

@kamalmarhubi
Copy link
Member

@Susurrus that branch has just the fix in a859ee3 cherry-picked. :-)

@mmokhi
Copy link

mmokhi commented Apr 16, 2017

@Alexrg @mmokhi could you try with this in your Cargo.toml:

nix = { git = "https://github.com/kamalmarhubi/nix-rust.git", branch = "fix-bsd-0.8.1" }

If it works, I'll release 0.8.1.

@kamalmarhubi , yeah it seems work on my system.
Any other things I can do/test?

@kamalmarhubi
Copy link
Member

kamalmarhubi commented Apr 16, 2017

@mmokhi if it fixes the FreeBSD issues, I'll just make a release.

@nix-rust/nix-maintainers can I get a 👍 on releasing https://github.com/kamalmarhubi/nix-rust/tree/fix-bsd-0.8.1 as v0.8.1? The diff vs v0.8.0 is here: v0.8.0...kamalmarhubi:fix-bsd-0.8.1

@kamalmarhubi
Copy link
Member

@mmokhi @alexreg I just release 0.8.1 with this fix. I hope that sorts this out for you. Please reopen if it doesn't!

kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Apr 17, 2017
v0.8.1 was released to fix the broken build on FreeBSD. It is v0.8.0
with a859ee3 by cherry-picked.

refs nix-rust#567
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Apr 17, 2017
v0.8.1 was released to fix the broken build on FreeBSD. It is v0.8.0
with a859ee3 cherry-picked.

refs nix-rust#567
@alexreg
Copy link
Author

alexreg commented Apr 17, 2017

@kamalmarhubi All good for me, thanks! Sorry I couldn't reply earlier; was away.

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

6 participants