flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

build error `Implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99` #348

Open michaelknoch opened 2 years ago

michaelknoch commented 2 years ago

Current behavior

build error Implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99 when building for apple silicon mac. It works when building for Intel mac via rosetta.

Expected behavior

builds for apple silicon macs

Steps to reproduce

  1. build sample mac app for apple silicon

Screenshots

Screenshot 2021-11-29 at 10 51 32

Environment

ephemer commented 2 years ago

Yep, saw this too. I think we'll need to update SDL to fix it but for now the workaround is to build for rosetta (esp. because building our UIKit for Mac doesn't make a lot of sense since it's possible to build real UIKit apps for Apple Silicon macs)