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

Solaris PTHREAD_PROCESS_PRIVATE type #1303

Closed
dhardy opened this issue Mar 13, 2019 · 4 comments
Closed

Solaris PTHREAD_PROCESS_PRIVATE type #1303

dhardy opened this issue Mar 13, 2019 · 4 comments

Comments

@dhardy
Copy link

dhardy commented Mar 13, 2019

Our CI runner found an error on Solaris:

error[E0308]: mismatched types
    --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.27/src/unix/solaris/mod.rs:1072:27
     |
1072 |     __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE,
     |                           ^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found i32
error[E0308]: mismatched types
    --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.27/src/unix/solaris/mod.rs:1079:26
     |
1079 |     __pthread_cond_type: PTHREAD_PROCESS_PRIVATE,
     |                          ^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found i32
error[E0308]: mismatched types
    --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.27/src/unix/solaris/mod.rs:1085:28
     |
1085 |     __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE,
     |                            ^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found i32
@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 13, 2019

Why is that using libc version 0.2.27 ? It is quite old. I'm not sure what level of support libc had for solaris back then.

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 13, 2019

In fact, the build of the master branch uses libc 0.2.50 and it passes your CI: https://travis-ci.org/rust-random/getrandom/jobs/498638620#L474

@dhardy
Copy link
Author

dhardy commented Mar 13, 2019

Because of this.

I'm not personally convinced this type of testing is useful. If it merely wastes developer time then it's probably better to remove it.

(Sorry; I didn't realise this was a minimal-version issue before now hence didn't check old reports.)

@gnzlbg
Copy link
Contributor

gnzlbg commented Mar 13, 2019

So I'm closing this, this issue is already fixed in newer libc versions and I don't think there is anything we can do about it here.

If that crate wants to support solaris, it needs to use a libc versions that's new enough. BurntSushi is mentioning in that issue the libc = 0.2 bound states that the library works with all 0.2 libc versions, but that appears to not be the case, so the crate should probably just be using libc = "^0.2.x" where x is high enough.

I'm not personally convinced this type of testing is useful. If it merely wastes developer time then it's probably better to remove it.

No idea. If the intent is for the crate to support solaris, then these tests caught a regression where there was a change to use a libc version that was too old. The fix is however to just use a newer version (for all targets, or only for solaris, that's up to you).

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