Skip to content

Catalyst + ReactNative: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') error when building for mac target #28810

Closed
@0xmtn

Description

@0xmtn

Description

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.

  1. react-native init App
  2. react-native run-ios - Works fine
  3. 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:

image

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:
image

Should I do something for migration to build for mac?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions