Catalyst + ReactNative: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') error when building for mac target
See original GitHub issueDescription
I’m getting the following errors when building for mac. This is a default application, created via react-native init
.
Error 1: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')
Error 2: ld: in /Users/jh/Documents/projects/VST/Trial3/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '/Users/jh/Documents/projects/VST/Trial3/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture x86_64
React Native version:
MacOS: 10.15.4
Xcode: 11.4
RN: 0.62.0-rc.5
RN Cli: 4.8.0
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
react-native init App
react-native run-ios
- Works fine- Open
App.xcworkspace
, select mac as a target and clean build.
Expected Results
Application working on Mac too.
Snack, code example, screenshot, or link to a repository:
I commented out the following line in Time.h:
//typedef uint8_t clockid_t;
extern "C" int clock_gettime(clockid_t clk_id, struct timespec* ts);
extern "C" int clock_getres(clockid_t clk_id, struct timespec* ts);
#endif
Then tried to build again and the Error 1 disappeared but Error 2 still exists:
Should I do something for migration to build for mac?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5
Just Comment use_flipper!() function inside podfile remove Pods and podfile.lock
again pod install worked for me
I got it working by deleting Facebook Flipper and everything else related to it. Here are the steps to take:
rm -Rf Pods/*
pod cache clean --all
pod install
DEBUG
.