React-native: [0.62.0-rc.3] Catalyst macOS build issue typedef redefinition with different types

Created on 23 Jan 2020  路  4Comments  路  Source: facebook/react-native

React Native version:

System:
    OS: macOS 10.15.2
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 52.18 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.7.0 - /var/folders/2d/y3l4yzcj0pz9r62r554t2nqr0000gn/T/yarn--1579780584922-0.8762400095093377/node
    Yarn: 1.21.1 - /var/folders/2d/y3l4yzcj0pz9r62r554t2nqr0000gn/T/yarn--1579780584922-0.8762400095093377/yarn
    npm: 6.13.6 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.3
      System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.0-rc.1 => 0.62.0-rc.1

Steps To Reproduce

  1. Create a new project npx react-native init SandboxProject_62 --version 0.62.0-rc.1
  2. Enable macOS target in xcode
  3. Build

Describe what you expected to happen:

Successful build for macOS target

Errors

[...]/SandboxProject_62/ios/Pods/Headers/Private/Flipper-Folly/folly/portability/Time.h:51:17:
Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

If I comment out this line, Flipper-Folly build does seem to pass but I end up with an OpenSSL linking error:

ld: in [...]/SandboxProject_62/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '[...]/SandboxProject_62/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture x86_64

Would be really awesome to have a working macOS target for the 0.62 release as everything seems to be pretty ready.

Bug

Most helpful comment

Hi @mgcrea,

Have you had any success since posting this? I'm having the same problem and got stuck at libcrypto.a error.

All 4 comments

FYI this bug still exists in the latest 0.62.0-rc.2 release

FYI this bug still exists in the latest 0.62.0-rc.3 release.
I've opened an issue in Flipper: https://github.com/facebook/flipper/issues/834

Hi @mgcrea,

Have you had any success since posting this? I'm having the same problem and got stuck at libcrypto.a error.

@0xmtn @mgcrea I fixed this with updating my iOS Deployment Target Build setting in my app to be 9.0 and my platform :ios '10.0' to be platform :ios '9.0' in my ios/Podfile :

Change this:

ios/Podfile

platform :ios '10.0'

to this:

ios/Podfile

platform :ios, '9.0'

Don't forget to npx pod-install from the root of your project afterwards.

I guess this means flipper-folly doesn't like iOS version 10 as a deployment target...

Was this page helpful?
0 / 5 - 0 ratings