Skip to content

Build Error on MacOS #2

Closed
Closed
@4meta5

Description

@4meta5

Hi, thanks for making this! I'm getting these compiler errors and am unsure how to fix them. I'm just running cargo build in the root of the directory.

   Compiling ffi_helpers v0.2.1-alpha.0 (/Users/4meta5/ffi_helpers)
error[E0080]: it is undefined behavior to use this value
  --> src/nullable.rs:29:5
   |
29 |     const NULL: Self = std::ptr::null();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized raw pointer
   |
   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.

error[E0080]: it is undefined behavior to use this value
  --> src/nullable.rs:36:5
   |
36 |     const NULL: Self = std::ptr::null_mut();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized raw pointer
   |
   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.

error: aborting due to 2 previous errors

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

To learn more, run the command again with --verbose.

I found this while trying to compile a repo that uses an older version as a dependency and getting a similar error sunshine-protocol/sunscreen#1

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