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

Doesn't compile with target i686-linux-android #625

Closed
hlzhang opened this issue May 3, 2017 · 1 comment
Closed

Doesn't compile with target i686-linux-android #625

hlzhang opened this issue May 3, 2017 · 1 comment

Comments

@hlzhang
Copy link

hlzhang commented May 3, 2017

On MacOS 10.12.4
rustup 1.2.0 (70faf07 2017-04-08)
rustc 1.17.0 (56124baa9 2017-04-24)

when cargo build --target=i686-linux-android got error:

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/pkcs12.rs:38:40
   |
38 |                                        pass.as_ptr(),
   |                                        ^^^^^^^^^^^^^ expected i8, found u8
   |
   = note: expected type `*const i8`
              found type `*const u8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/string.rs:52:40
   |
52 |             let slice = CStr::from_ptr(self.as_ptr()).to_bytes();
   |                                        ^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*mut i8`

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/version.rs:57:29
   |
57 |     unsafe { CStr::from_ptr(OpenSSL_version(OPENSSL_VERSION)).to_str().unwrap() }
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/version.rs:63:29
   |
63 |     unsafe { CStr::from_ptr(OpenSSL_version(OPENSSL_CFLAGS)).to_str().unwrap() }
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/version.rs:68:29
   |
68 |     unsafe { CStr::from_ptr(OpenSSL_version(OPENSSL_BUILT_ON)).to_str().unwrap() }
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/version.rs:73:29
   |
73 |     unsafe { CStr::from_ptr(OpenSSL_version(OPENSSL_PLATFORM)).to_str().unwrap() }
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
  --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/version.rs:78:29
   |
78 |     unsafe { CStr::from_ptr(OpenSSL_version(OPENSSL_DIR)).to_str().unwrap() }
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`
   = help: here are some functions which might fulfill your needs:
           - .offset(...)
           - .wrapping_offset(...)

error[E0308]: mismatched types
   --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/x509/mod.rs:729:48
    |
729 |             cvt_p(ffi::SSL_load_client_CA_file(file.as_ptr())).map(|p| Stack::from_ptr(p))
    |                                                ^^^^^^^^^^^^^ expected i8, found u8
    |
    = note: expected type `*const i8`
               found type `*const u8`
    = help: here are some functions which might fulfill your needs:
            - .offset(...)
            - .wrapping_offset(...)

error[E0308]: mismatched types
    --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.11/src/x509/mod.rs:1021:43
     |
1021 |             str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap()
     |                                           ^ expected u8, found i8
     |
     = note: expected type `*const u8`
                found type `*const i8`
     = help: here are some functions which might fulfill your needs:
             - .offset(...)
             - .wrapping_offset(...)

error: aborting due to 9 previous errors

error: Could not compile `openssl`.
@hlzhang
Copy link
Author

hlzhang commented May 24, 2017

As sfackler said "Everything should work fine as is if you use a rustc that includes rust-lang/rust#40317"

@hlzhang hlzhang closed this as completed May 24, 2017
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 a pull request may close this issue.

1 participant