silicon icon indicating copy to clipboard operation
silicon copied to clipboard

Latest update is failing to compile

Open augustocdias opened this issue 4 years ago • 16 comments

Installing through cargo install.

   Compiling pasteboard v0.1.2
error[E0308]: mismatched types
  --> /Users/augusto/.cargo/registry/src/github.com-1ecc6299db9ec823/pasteboard-0.1.2/src/lib.rs:75:12
   |
75 |         if ok {
   |            ^^ expected `bool`, found `i8`

error[E0308]: mismatched types
  --> /Users/augusto/.cargo/registry/src/github.com-1ecc6299db9ec823/pasteboard-0.1.2/src/lib.rs:82:59
   |
82 |             NSData::writeToFile_atomically_(object, path, false);
   |                                                           ^^^^^ expected `i8`, found `bool`

error: aborting due to 2 previous errors

augustocdias avatar Mar 03 '21 08:03 augustocdias

Are you using Big Sur?

Aloxaf avatar Mar 03 '21 10:03 Aloxaf

Yes I am @Aloxaf

augustocdias avatar Mar 04 '21 08:03 augustocdias

Which version of big sur are you running?

segeljakt avatar Mar 04 '21 09:03 segeljakt

11.2.2

augustocdias avatar Mar 04 '21 09:03 augustocdias

@segeljakt It seems that not all Big Sur run on arm device.

Replacing custom big_sur_update with target_arch = "aarch64" may be a better choice?

ref. https://github.com/SSheldon/rust-objc/blob/master/src/runtime.rs#L27-L28

Aloxaf avatar Mar 04 '21 13:03 Aloxaf

Ok, interesting, I can upload a patch later today

segeljakt avatar Mar 04 '21 14:03 segeljakt

Any update on this?

augustocdias avatar Mar 26 '21 08:03 augustocdias

Any update on this (as it does impact on the silicon 0.4.1 build)?

chenrui333 avatar Apr 25 '21 02:04 chenrui333

@chenrui333 I dropped the clipboard support on macOS arm. Please check if it could be built on macOS Big Sur now.

Aloxaf avatar Apr 26 '21 10:04 Aloxaf

I see this same issue.

$ rustc --version
rustc 1.52.1 (9bc8c42bb 2021-05-09)

$ sw_vers
ProductName:	macOS
ProductVersion:	11.3.1
BuildVersion:	20E241
error[E0308]: mismatched types
  --> /Users/mjm/.cargo/registry/src/github.com-1ecc6299db9ec823/pasteboard-0.1.2/src/lib.rs:75:12
   |
75 |         if ok {
   |            ^^ expected `bool`, found `i8`

error[E0308]: mismatched types
  --> /Users/mjm/.cargo/registry/src/github.com-1ecc6299db9ec823/pasteboard-0.1.2/src/lib.rs:82:59
   |
82 |             NSData::writeToFile_atomically_(object, path, false);
   |                                                           ^^^^^ expected `i8`, found `bool`

error: aborting due to 2 previous errors

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

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

mikemadden42 avatar May 14 '21 00:05 mikemadden42

@mikemadden42 Can git version be compiled?

Aloxaf avatar May 14 '21 14:05 Aloxaf

Big apologies for the long wait. I pushed an update to pasteboard (now pasteboard = 0.1.3) which should hopefully fix this issue. If not then please report back. It works for me now on macOS 11.4.0.

segeljakt avatar May 14 '21 19:05 segeljakt

Thanks @segeljakt . Updating to pasteboard v0.1.3 fixed the build issue I was seeing on macOS Big Sur.

mikemadden42 avatar May 14 '21 20:05 mikemadden42

@segeljakt @Aloxaf Do you think we should update this version of pasteboard in master so this builds cleanly on macOS Big Sur?

https://github.com/Aloxaf/silicon/blob/master/Cargo.toml#L25

mikemadden42 avatar May 23 '21 19:05 mikemadden42

@segeljakt Thanks!

@mikemadden42 Done!

Aloxaf avatar May 24 '21 13:05 Aloxaf

I can confirm this commit fixed the build issue, and we have made the upgrade in the homebrew-core side

chenrui333 avatar May 24 '21 16:05 chenrui333