Skip to content

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

Closed
@hlzhang

Description

@hlzhang

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`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions