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

Build failure on OpenBSD-current. #1125

Closed
vext01 opened this issue Sep 17, 2019 · 8 comments · Fixed by #1168
Closed

Build failure on OpenBSD-current. #1125

vext01 opened this issue Sep 17, 2019 · 8 comments · Fixed by #1168

Comments

@vext01
Copy link

vext01 commented Sep 17, 2019

   Compiling nix v0.15.0 (/home/edd/source/nix)
error[E0308]: mismatched types
   --> src/sys/statfs.rs:111:9
    |
110 |     pub fn optimal_transfer_size(&self) -> i32 {
    |                                            --- expected `i32` because of return type
111 |         self.0.f_iosize
    |         ^^^^^^^^^^^^^^^ expected i32, found u32
help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
    |
111 |         self.0.f_iosize.try_into().unwrap()
    |

error[E0308]: mismatched types
   --> src/sys/statfs.rs:392:9
    |
391 |     pub fn files_free(&self) -> i64 {
    |                                 --- expected `i64` because of return type
392 |         self.0.f_ffree
    |         ^^^^^^^^^^^^^^ expected i64, found u64
help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit
    |
392 |         self.0.f_ffree.try_into().unwrap()
    |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: Could not compile `nix`.

This is using the master branch, but the failure also exists on 0.15.0, but not on 0.14.1.

Thanks

@asomers
Copy link
Member

asomers commented Sep 17, 2019

This failure was probably introduced by PR #928 . It's hard to keep the build working on OpenBSD because we don't have any CI for it. Could you please submit a PR to fix it?

@vext01
Copy link
Author

vext01 commented Sep 17, 2019

I can have a go.

BTW, sr.ht does OpenBSD CI and can be integrated with github.

@0x4d6165
Copy link

I'm having this issue as well still :(

@eau-u4f
Copy link

eau-u4f commented Dec 22, 2019

same here.

asomers added a commit to asomers/nix that referenced this issue Dec 23, 2019
We were assuming the wrong types for f_iosize and f_ffree in struct
statfs on OpenBSD.

Fixes nix-rust#1125
bors bot added a commit that referenced this issue Dec 23, 2019
1168: Fix the build on OpenBSD. r=asomers a=asomers

We were assuming the wrong types for f_iosize and f_ffree in struct
statfs on OpenBSD.

Fixes #1125

Co-authored-by: Alan Somers <asomers@gmail.com>
@kpcyrd
Copy link
Contributor

kpcyrd commented Dec 23, 2019

I've asked in #cmpwn on freenode and a member of the org can add OpenBSD to the nix CI here: https://dispatch.sr.ht/

@bors bors bot closed this as completed in 7a1e861 Dec 23, 2019
@bors bors bot closed this as completed in #1168 Dec 23, 2019
@asomers
Copy link
Member

asomers commented Dec 23, 2019

A better option would be if somebody could build an official OpenBSD image on GCE. Then it could be added to Cirrus-CI.

@kpcyrd
Copy link
Contributor

kpcyrd commented Dec 23, 2019

Sure, but getting an official image into GCE sounds like a more long-term project, using sr.ht in the meantime sounds more pragmatic instead of going without CI.

@asomers
Copy link
Member

asomers commented Dec 24, 2019

Just released 0.16.1, which includes the fix for this issue.

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