facebook/flipper

Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

owhittlef opened this issue ยท 3 comments

๐Ÿ› Bug Report

When I build my react native projection XCode I get the following error:

/Users/owhittlef/code/Parea/ios/Pods/Headers/Private/RCT-Folly/folly/portability/Time.h:52:17 Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

When I try to run npm run ios I get another error. I believe this one's related with Flipper-Folly but not sure. The error is

The following build commands failed:
	CompileC /Users/owhittlef/Library/Developer/Xcode/DerivedData/Parea-fvqmxpilfyeylsflhumwxfsffatn/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/TimeoutManager.o /Users/owhittlef/code/Parea/ios/Pods/RCT-Folly/folly/io/async/TimeoutManager.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')

To Reproduce

Create a new react native project and try to build. I have included all of my specific packages and configurations in the following section.

Environment

My Podfile:

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, 13.0
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'Parea' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'PareaTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
    # https://stackoverflow.com/a/64802905
    # installer.pods_project.targets.each do |target|
    # target.build_configurations.each do |config|
    #   config.build_settings['ENABLE_BITCODE'] = 'NO'
    #     config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    #   end
    # end
  end
end

My Podfile.lock

PODS:
  - AmplifyRTNCore (1.0.10):
    - React-Core
  - boost (1.76.0)
  - CocoaAsyncSocket (7.6.5)
  - DoubleConversion (1.1.6)
  - FBLazyVector (0.72.11)
  - FBReactNativeSpec (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTRequired (= 0.72.11)
    - RCTTypeSafety (= 0.72.11)
    - React-Core (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - Flipper (0.182.0):
    - Flipper-Folly (~> 2.6)
  - Flipper-Boost-iOSX (1.76.0.1.11)
  - Flipper-DoubleConversion (3.2.0.1)
  - Flipper-Fmt (7.1.7)
  - Flipper-Folly (2.6.10):
    - Flipper-Boost-iOSX
    - Flipper-DoubleConversion
    - Flipper-Fmt (= 7.1.7)
    - Flipper-Glog
    - libevent (~> 2.1.12)
    - OpenSSL-Universal (= 1.1.1100)
  - Flipper-Glog (0.5.0.5)
  - Flipper-PeerTalk (0.0.4)
  - FlipperKit (0.182.0):
    - FlipperKit/Core (= 0.182.0)
  - FlipperKit/Core (0.182.0):
    - Flipper (~> 0.182.0)
    - FlipperKit/CppBridge
    - FlipperKit/FBCxxFollyDynamicConvert
    - FlipperKit/FBDefines
    - FlipperKit/FKPortForwarding
    - SocketRocket (~> 0.6.0)
  - FlipperKit/CppBridge (0.182.0):
    - Flipper (~> 0.182.0)
  - FlipperKit/FBCxxFollyDynamicConvert (0.182.0):
    - Flipper-Folly (~> 2.6)
  - FlipperKit/FBDefines (0.182.0)
  - FlipperKit/FKPortForwarding (0.182.0):
    - CocoaAsyncSocket (~> 7.6)
    - Flipper-PeerTalk (~> 0.0.4)
  - FlipperKit/FlipperKitHighlightOverlay (0.182.0)
  - FlipperKit/FlipperKitLayoutHelpers (0.182.0):
    - FlipperKit/Core
    - FlipperKit/FlipperKitHighlightOverlay
    - FlipperKit/FlipperKitLayoutTextSearchable
  - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0):
    - FlipperKit/Core
    - FlipperKit/FlipperKitHighlightOverlay
    - FlipperKit/FlipperKitLayoutHelpers
    - YogaKit (~> 1.18)
  - FlipperKit/FlipperKitLayoutPlugin (0.182.0):
    - FlipperKit/Core
    - FlipperKit/FlipperKitHighlightOverlay
    - FlipperKit/FlipperKitLayoutHelpers
    - FlipperKit/FlipperKitLayoutIOSDescriptors
    - FlipperKit/FlipperKitLayoutTextSearchable
    - YogaKit (~> 1.18)
  - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0)
  - FlipperKit/FlipperKitNetworkPlugin (0.182.0):
    - FlipperKit/Core
  - FlipperKit/FlipperKitReactPlugin (0.182.0):
    - FlipperKit/Core
  - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0):
    - FlipperKit/Core
  - FlipperKit/SKIOSNetworkPlugin (0.182.0):
    - FlipperKit/Core
    - FlipperKit/FlipperKitNetworkPlugin
  - fmt (6.2.1)
  - glog (0.3.5)
  - hermes-engine (0.72.11):
    - hermes-engine/Pre-built (= 0.72.11)
  - hermes-engine/Pre-built (0.72.11)
  - libevent (2.1.12)
  - OpenSSL-Universal (1.1.1100)
  - RCT-Folly (2021.07.22.00):
    - boost
    - DoubleConversion
    - fmt (~> 6.2.1)
    - glog
    - RCT-Folly/Default (= 2021.07.22.00)
  - RCT-Folly/Default (2021.07.22.00):
    - boost
    - DoubleConversion
    - fmt (~> 6.2.1)
    - glog
  - RCT-Folly/Futures (2021.07.22.00):
    - boost
    - DoubleConversion
    - fmt (~> 6.2.1)
    - glog
    - libevent
  - RCTRequired (0.72.11)
  - RCTTypeSafety (0.72.11):
    - FBLazyVector (= 0.72.11)
    - RCTRequired (= 0.72.11)
    - React-Core (= 0.72.11)
  - React (0.72.11):
    - React-Core (= 0.72.11)
    - React-Core/DevSupport (= 0.72.11)
    - React-Core/RCTWebSocket (= 0.72.11)
    - React-RCTActionSheet (= 0.72.11)
    - React-RCTAnimation (= 0.72.11)
    - React-RCTBlob (= 0.72.11)
    - React-RCTImage (= 0.72.11)
    - React-RCTLinking (= 0.72.11)
    - React-RCTNetwork (= 0.72.11)
    - React-RCTSettings (= 0.72.11)
    - React-RCTText (= 0.72.11)
    - React-RCTVibration (= 0.72.11)
  - React-callinvoker (0.72.11)
  - React-Codegen (0.72.11):
    - DoubleConversion
    - FBReactNativeSpec
    - glog
    - hermes-engine
    - RCT-Folly
    - RCTRequired
    - RCTTypeSafety
    - React-Core
    - React-jsi
    - React-jsiexecutor
    - React-NativeModulesApple
    - React-rncore
    - ReactCommon/turbomodule/bridging
    - ReactCommon/turbomodule/core
  - React-Core (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default (= 0.72.11)
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/CoreModulesHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/Default (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/DevSupport (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default (= 0.72.11)
    - React-Core/RCTWebSocket (= 0.72.11)
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-jsinspector (= 0.72.11)
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTActionSheetHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTAnimationHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTBlobHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTImageHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTLinkingHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTNetworkHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTSettingsHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTTextHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTVibrationHeaders (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-Core/RCTWebSocket (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Core/Default (= 0.72.11)
    - React-cxxreact
    - React-hermes
    - React-jsi
    - React-jsiexecutor
    - React-perflogger
    - React-runtimeexecutor
    - React-utils
    - SocketRocket (= 0.6.1)
    - Yoga
  - React-CoreModules (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTTypeSafety (= 0.72.11)
    - React-Codegen (= 0.72.11)
    - React-Core/CoreModulesHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-RCTBlob
    - React-RCTImage (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
    - SocketRocket (= 0.6.1)
  - React-cxxreact (0.72.11):
    - boost (= 1.76.0)
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-callinvoker (= 0.72.11)
    - React-debug (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-jsinspector (= 0.72.11)
    - React-logger (= 0.72.11)
    - React-perflogger (= 0.72.11)
    - React-runtimeexecutor (= 0.72.11)
  - React-debug (0.72.11)
  - React-hermes (0.72.11):
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - RCT-Folly/Futures (= 2021.07.22.00)
    - React-cxxreact (= 0.72.11)
    - React-jsi
    - React-jsiexecutor (= 0.72.11)
    - React-jsinspector (= 0.72.11)
    - React-perflogger (= 0.72.11)
  - React-jsi (0.72.11):
    - boost (= 1.76.0)
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
  - React-jsiexecutor (0.72.11):
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-cxxreact (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-perflogger (= 0.72.11)
  - React-jsinspector (0.72.11)
  - React-logger (0.72.11):
    - glog
  - react-native-get-random-values (1.10.0):
    - React-Core
  - react-native-netinfo (11.2.1):
    - React-Core
  - react-native-safe-area-context (4.8.2):
    - React-Core
  - React-NativeModulesApple (0.72.11):
    - hermes-engine
    - React-callinvoker
    - React-Core
    - React-cxxreact
    - React-jsi
    - React-runtimeexecutor
    - ReactCommon/turbomodule/bridging
    - ReactCommon/turbomodule/core
  - React-perflogger (0.72.11)
  - React-RCTActionSheet (0.72.11):
    - React-Core/RCTActionSheetHeaders (= 0.72.11)
  - React-RCTAnimation (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTTypeSafety (= 0.72.11)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTAnimationHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTAppDelegate (0.72.11):
    - RCT-Folly
    - RCTRequired
    - RCTTypeSafety
    - React-Core
    - React-CoreModules
    - React-hermes
    - React-NativeModulesApple
    - React-RCTImage
    - React-RCTNetwork
    - React-runtimescheduler
    - ReactCommon/turbomodule/core
  - React-RCTBlob (0.72.11):
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTBlobHeaders (= 0.72.11)
    - React-Core/RCTWebSocket (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-RCTNetwork (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTImage (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTTypeSafety (= 0.72.11)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTImageHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-RCTNetwork (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTLinking (0.72.11):
    - React-Codegen (= 0.72.11)
    - React-Core/RCTLinkingHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTNetwork (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTTypeSafety (= 0.72.11)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTNetworkHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTSettings (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - RCTTypeSafety (= 0.72.11)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTSettingsHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-RCTText (0.72.11):
    - React-Core/RCTTextHeaders (= 0.72.11)
  - React-RCTVibration (0.72.11):
    - RCT-Folly (= 2021.07.22.00)
    - React-Codegen (= 0.72.11)
    - React-Core/RCTVibrationHeaders (= 0.72.11)
    - React-jsi (= 0.72.11)
    - ReactCommon/turbomodule/core (= 0.72.11)
  - React-rncore (0.72.11)
  - React-runtimeexecutor (0.72.11):
    - React-jsi (= 0.72.11)
  - React-runtimescheduler (0.72.11):
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-callinvoker
    - React-debug
    - React-jsi
    - React-runtimeexecutor
  - React-utils (0.72.11):
    - glog
    - RCT-Folly (= 2021.07.22.00)
    - React-debug
  - ReactCommon/turbomodule/bridging (0.72.11):
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-callinvoker (= 0.72.11)
    - React-cxxreact (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-logger (= 0.72.11)
    - React-perflogger (= 0.72.11)
  - ReactCommon/turbomodule/core (0.72.11):
    - DoubleConversion
    - glog
    - hermes-engine
    - RCT-Folly (= 2021.07.22.00)
    - React-callinvoker (= 0.72.11)
    - React-cxxreact (= 0.72.11)
    - React-jsi (= 0.72.11)
    - React-logger (= 0.72.11)
    - React-perflogger (= 0.72.11)
  - RNCAsyncStorage (1.21.0):
    - React-Core
  - RNDateTimePicker (7.6.2):
    - React-Core
  - RNScreens (3.29.0):
    - RCT-Folly (= 2021.07.22.00)
    - React-Core
  - RNSVG (14.1.0):
    - React-Core
  - SocketRocket (0.6.1)
  - Yoga (1.14.0)
  - YogaKit (1.18.1):
    - Yoga (~> 1.14)

My package.json

{
  "name": "parea",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@aws-amplify/react-native": "^1.0.9",
    "@aws-amplify/ui-react-native": "^2.0.7",
    "@react-native-async-storage/async-storage": "^1.21.0",
    "@react-native-community/datetimepicker": "^7.6.2",
    "@react-native-community/netinfo": "^11.2.1",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "@reduxjs/toolkit": "^2.0.1",
    "aws-amplify": "^6.0.9",
    "react": "^18.1.0",
    "react-native": "^0.72.0",
    "react-native-feather": "^1.1.2",
    "react-native-get-random-values": "^1.10.0",
    "react-native-safe-area-context": "^4.8.2",
    "react-native-screens": "^3.29.0",
    "react-native-svg": "^14.1.0",
    "react-redux": "^9.0.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "^0.73.18",
    "@react-native/eslint-config": "^0.73.1",
    "@react-native/metro-config": "^0.73.2",
    "@react-native/typescript-config": "^0.73.1",
    "@types/react": "^18.2.6",
    "@types/react-redux": "^7.1.33",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4",
    "uuid": "^9.0.1"
  },
  "engines": {
    "node": ">=18"
  }
}

Getting same error on RN 0.73.8, XCode 15.3. Did you solve it?