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

See original GitHub issue

Description

I am currently building a project with React Native 0.67 and and Monterey MacOS, intel Chip.

I have tried about every possible solution, but yet, the problem persists.

The Problem is the following: after carefully following the instructions in react setup page to initialize a new app, when I execute the run-ios command I get the following error on my console, which seems to be related to Flipper:

** BUILD FAILED ** The following build commands failed: CompileC /Users/dr/Library/Developer/Xcode/DerivedData/Test-gxglauoeoglzeobdubkxzgziurmr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/dr/Library/Mobile\ Documents/com~apple~CloudDocs/2.\ Business/2.\ Software\ As\ A\ Service.nosync/socholar-native.nosync/Test/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘RCT-Folly’ from project ‘Pods’) (1 failure)

When I try running it from Xcode I get the following Error in RCT_Folly directory:

RN Typedef redefinition with different types (‘uint8_t’ (aka ‘unsigned char’) vs ‘enum clockid_t’)

Version

0.67

Output of npx react-native info

System: OS: macOS 12.2.1 CPU: (8) x64 Intel® Core™ i7-6920HQ CPU @ 2.90GHz Memory: 48.18 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 7.22.0 - /usr/local/bin/npm Watchman: 2022.02.14.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 28, 29, 30, 32 Build Tools: 28.0.3, 29.0.2, 30.0.2, 32.0.0, 32.1.0 System Images: android-28 | Google APIs Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.3 => 0.67.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Steps To Reproduce

  1. init a new react project with macOS Montery or Big Sur and React Native 0.67
  2. Execute run-ios command
  3. See It Fail

FYI works on Android

Snack, code example, screenshot, or link to a repository

When Runing with npx react-native run-ios

Screen Shot 2022-02-24 at 9 00 30 PM

When running with Xcode in Time.h file

Screen Shot 2022-02-24 at 9 02 23 PM

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18

github_iconTop GitHub Comments

3reactions
HarshMBcommented, Jun 2, 2022

@yodarango in Time.h file you should do below changes at top:-

change this (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < _IPHONE10_0))

to this (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < _IPHONE12_0))

just you have to make 10 to 12 and clean the project, run it.

I hope it will solve your issue.

0reactions
Solace-Studioscommented, Dec 22, 2022

Same thing with react native 0.70.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typedef redefinition with different types ('uint8_t' (aka ... - GitHub
Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') when building latest react-native rc with macOS target #834.
Read more >
React Native Build Error on IOS - typedef redefinition with ...
React Native Build Error on IOS - typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') · Ask Question.
Read more >
RN Typedef redefinition with different types ('uint8_t' (aka ...
RN Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') · Issue · Solution 1 · Solution 2.
Read more >
[Solved]-React Native Build Error on IOS - typedef redefinition ...
Coding example for the question React Native Build Error on IOS - typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum...
Read more >
typedef redefinition with different types ('uint8_t' (aka ...
typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t'). Add Answer | View In TPC Matrix.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found