Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

mac os build error #1

Closed
4meta5 opened this issue Apr 19, 2020 · 2 comments
Closed

mac os build error #1

4meta5 opened this issue Apr 19, 2020 · 2 comments

Comments

@4meta5
Copy link
Contributor

4meta5 commented Apr 19, 2020

I think the build is failing on mac OS because it can't compile the ffi-helpers crate

   Compiling keystore-ffi v0.1.0 (/Users/4meta5/flutter-bin/sunshine-flutter/keystore/keystore-ffi)
error[E0080]: it is undefined behavior to use this value
  --> /Users/4meta5/.cargo/registry/src/github.com-1ecc6299db9ec823/ffi_helpers-0.1.0/src/nullable.rs:20:13
   |
20 |             const NULL: Self = 0 as $type;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized raw pointer
...
38 | impl_nullable!(*const T, <T>);
   | ------------------------------ in this macro invocation
   |
   = 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.
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
  --> /Users/4meta5/.cargo/registry/src/github.com-1ecc6299db9ec823/ffi_helpers-0.1.0/src/nullable.rs:20:13
   |
20 |             const NULL: Self = 0 as $type;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized raw pointer
...
39 | impl_nullable!(*mut T, <T>);
   | ---------------------------- in this macro invocation
   |
   = 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.
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

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.
warning: build failed, waiting for other jobs to finish...
error: build failed

so I bumped the version from 0.1.0 to 0.2.0 and now I get this error

Compiling keystore-ffi v0.1.0 (/Users/4meta5/flutter-bin/sunshine-flutter/keystore/keystore-ffi)
error[E0080]: it is undefined behavior to use this value
  --> /Users/4meta5/.cargo/registry/src/github.com-1ecc6299db9ec823/ffi_helpers-0.2.0/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
  --> /Users/4meta5/.cargo/registry/src/github.com-1ecc6299db9ec823/ffi_helpers-0.2.0/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.
warning: build failed, waiting for other jobs to finish...
error: build failed

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.

LOL, idk about that

@dvc94ch
Copy link
Collaborator

dvc94ch commented Apr 20, 2020

What rust version are you using? Stable should work, you don't need nightly

@4meta5
Copy link
Contributor Author

4meta5 commented Apr 20, 2020

Yup, it seems to be a mistake with a nightly change rust-lang/rust#71353

it does compile with stable

@4meta5 4meta5 closed this as completed Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants