question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fatal error: Unsupported: typedef changes linkage of anonymous type in TPSStripe

See original GitHub issue

Issue

When I add in a pod that has a dependency on the gRPC pod, there are fatal build errors:

./ios/Pods/gRPC-Core/include/grpc/impl/codegen/gpr_types.h:43:3: Unsupported: typedef changes linkage of anonymous type, but linkage was already computed

It seems that adding pod 'Firebase/Firestore' brings with it several additional dependencies like gRPC that cause conflicts with tipsi-stripe.

Removing react-native unlink tipsi-stripe will allow me to compile with pod 'Firebase/Firestore'.

You can replicate this issue in a fresh install easily:

  • react-native init TestProject
  • cd TestProject
  • npm install
  • npm install --save tipsi-stripe
  • react-native link tipsi-stripe

Edit your Podfile to look like:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'TestProject' do
  pod 'Stripe', '~> 10.1.0'
  inherit! :search_paths

  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
end

Run pod update:

screen shot 2017-10-08 at 9 56 56 am

Compile Errors: screen shot 2017-10-07 at 7 07 17 am

Environment

  1. Application Target Platform: iOS 11
  2. Development Operating System: macOS Sierra 10.12.6 (16G29)
  3. Build Tools: Xcode 9.0
  4. React Native version: 0.49.2
  5. tipsi-stripe Version: 3.7.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
brianhisscommented, Oct 9, 2017

I was able to find the conflict.

It seems that you’re allowing all the headers inside the Pods directory, ${SRCROOT}/../../../ios/Pods/Headers/Public/**.

This can potentially create conflicts in the global space. I was able to fix that by only looking in the Stripe pod, ${SRCROOT}/../../../ios/Pods/Headers/Public/Stripe/**.

This did create issues in finding <Stripe/Stripe.h> (https://github.com/tipsi/tipsi-stripe/issues/116), but I was able to edit ios/TPSStripe/TPSStripeManager.h and ios/TPSStripe/TPSCardField.h to "Stripe.h". https://github.com/brianhiss/tipsi-stripe/commit/aa23d67cafbda1878b9500950c8e67297c1bfcf9

I can create a pull request if you want to bring in these changes.

screen shot 2017-10-09 at 8 37 51 am

screen shot 2017-10-09 at 9 10 48 am

0reactions
isnifercommented, Nov 6, 2017

Fixed in #141

Read more comments on GitHub >

github_iconTop Results From Across the Web

clang error: unsupported: anonymous type given name for ...
c:2:19: error: unsupported: anonymous type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name ...
Read more >
diagnose giving non-C-compatible classes a typedef name for ...
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ... {{unsupported: typedef changes linkage of anonymous type, but linkage was ...
Read more >
Fix non-c-typedef-for-linkage warning in SocketStreamHandle
Source\WebCore\platform\network\SocketStreamHandle.h(42,15): warning: anonymous non-C-compatible type given name for linkage purposes by ...
Read more >
[tao-users] Error: anonymous types are deprecated by OMG ...
I was able to download and successfully build 6.0.3. I tried a few of the "TAO/examples" pgms that have been built and they...
Read more >
Bug #1039: Compiler warnings with clang 11.0 - Audacious
xmms-sid.h:39:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here ...
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