Skip to content

Compilation Error: *const i8 cannot be sent between threads safely #18

@scull7

Description

@scull7

I'm getting a compilation failure when pulling in oracle. I've tried using the master branch:

oracle = { git = "https://github.com/kubo/rust-oracle.git", features = ["chrono"] }

And version 0.3.1:

oracle = { version = "0.3.1", features = ["chrono"] }

rustc version:

stable-x86_64-apple-darwin unchanged - rustc 1.39.0 (4560ea788 2019-11-04)
error[E0277]: `*const i8` cannot be sent between threads safely
   --> /Users/nathansculli/.cargo/git/checkouts/rust-oracle-858dd8ce065f6a17/2e61902/src/lib.rs:411:1
    |
411 | / lazy_static! {
412 | |     static ref DPI_CONTEXT: ContextResult = {
413 | |         let mut ctxt = Context {
414 | |             context: ptr::null_mut(),
...   |
449 | |     };
450 | | }
    | |_^ `*const i8` cannot be sent between threads safely
    |
    = help: within `ContextResult`, the trait `std::marker::Send` is not implemented for `*const i8`
    = note: required because it appears within the type `binding::dpiErrorInfo`
    = note: required because it appears within the type `ContextResult`
    = note: required because of the requirements on the impl of `std::marker::Sync` for `spin::once::Once<ContextResult>`
    = note: required because it appears within the type `lazy_static::lazy::Lazy<ContextResult>`
    = note: shared static variables must have a type that implements `Sync`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `oracle`.

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