Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clash with Reanimated - CLANG_CXX_LANGUAGE_STANDARD has different values #405

Closed
MydusApps opened this issue Apr 17, 2022 · 19 comments · Fixed by #504
Closed

Clash with Reanimated - CLANG_CXX_LANGUAGE_STANDARD has different values #405

MydusApps opened this issue Apr 17, 2022 · 19 comments · Fixed by #504

Comments

@MydusApps
Copy link

When installing both RN Reanimated and RN Skia, upon pod install I come across the following error message:

"Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine", "react-native-skia", "Api", "Jsi", "RNSkia", "SkiaHeaders", "Utils"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values"

This has happened across all versions of React from 0.65 to 0.68, as well as earlier versions of RN Reanimated.

Thanks in advance.

Kind regards,
Mani

@leechanghoon3024
Copy link

same issue

@chrfalch
Copy link
Contributor

@schiller-manuel Should we remove our CLANG-version to avoid this, or is there another solution to fix this?

@schiller-manuel
Copy link
Contributor

reanimated explicitly specifies c++14:

https://github.com/software-mansion/react-native-reanimated/blob/main/RNReanimated.podspec#L82

so this collides with our c++17.

So for now, removing CLANG_CXX_LANGUAGE_STANDARD from react-native-skia solves this issue, I guess ideally all RN libs settle for c++17 when RN 0.68 is supported.

@chrfalch
Copy link
Contributor

Will this affect in any way compilation of react-native-skia, or should we just do this to make sure we don't collide with Reanimated?

@schiller-manuel
Copy link
Contributor

We might get some warnings when trying to use C++17 features. Reanimated could also raise its c++ version, a PR there might be worth a try.

@schiller-manuel
Copy link
Contributor

I tried to reproduce this issue but it builds fine for me:

npx react-native init SkiaReanimated
cd SkiaReanimated
yarn add react-native-reanimated
yarn add @shopify/react-native-skia
npx pod-install
yarn ios
"dependencies": {
    "@shopify/react-native-skia": "^0.1.121",
    "react": "17.0.2",
    "react-native": "0.68.1",
    "react-native-reanimated": "^2.7.0"
  },

Can you help me reproduce this issue please? Which combination of the dependencies cause it for you?

@kyonru-nomad
Copy link

How did you guys solve this?

@schiller-manuel
Copy link
Contributor

I could not reproduce this issue. If you have hints on how to reproduce, please let me know.

@FrancoTanzarellaEviivo
Copy link

I'm experiencing this with the below dependencies. We will be updating packages later this week so will update if that changes anything.

dependencies: {
"@shopify/react-native-skia": "^0.1.122",
"react": "17.0.2",
"react-native": "0.66.3",
"react-native-reanimated": "2.8.0",
}

@kyonru-nomad
Copy link

kyonru-nomad commented Apr 26, 2022

I'm experiencing this with the below dependencies.

dependencies: {
"@shopify/react-native-skia": "^0.1.119",
"react": "17.0.2",
"rn-skia-sketch-canvas": "^0.3.1",
"react-native": "0.68.0",
"react-native-reanimated": "2.6.0",
}

@billnbell
Copy link

How did you guys solve this?

yarn add [email protected]

Then patch it

software-mansion/react-native-reanimated#3326

@kockok
Copy link

kockok commented Sep 12, 2022

I am using [email protected] and [email protected]

but still having multiple warnings:

[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

Is this really solved?

@chrfalch
Copy link
Contributor

Hi @kockok, this doesn't seem related to react-native-skia, which should have been in the list of targets (related to ["RNReanimated", "hermes-engine"]). We changed this to use a per-pod based configuration a while ago.

@billnbell
Copy link

Just set the CXX n the podspec.

node_modules/react-native-reanimated/RNReanimated.podspec

Change to:

"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",

@ken0nek
Copy link

ken0nek commented Sep 12, 2022

@billnbell
Copy link

@dankocher
Copy link

dankocher commented Sep 19, 2022

react-native-reanimated version 3 uses c++17

just run yarn add react-native-reanimated@last and select version 3.0.0-rc.2

@billnbell
Copy link

That is a rc.2 and not released properly yet.

@coawazie
Copy link

react-native-reanimated version 3 uses c++17

just run yarn add react-native-reanimated@last and select version 3.0.0-rc.2

It worked. Thanks @dankocher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.