Skip to content

[0.50.0] PrivateDatabase.{cpp,h} not included in Podspec #16663

Closed

Description

@notjosh

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes.

Environment

$ ./node_modules/.bin/react-native info
Scanning folders for symlinks in /Users/joshua/dev/native-navigation/node_modules (9ms)

Environment:
  OS:  macOS High Sierra 10.13.1
  Node:  8.9.0
  Yarn:  1.3.2
  npm:  5.5.1
  Watchman:  4.9.0
  Xcode:  Xcode 9.1 Build version 9B55
  Android Studio:  3.0 AI-171.4408382

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: 0.50.0 => 0.50.0

Steps to Reproduce

  1. upgrade npm/yarn to RN 0.50.0
  2. re-run (bundle exec) pod install to link everything back together with 0.50.0
  3. (if necessary, resolve any additional header-related build issues: [RN 0.49-rc.5] Fishhook error #16039, [iOS][cocoapods] 'RCTAnimation/RCTValueAnimatedNode.h' file not found #13198)
  4. build project in Xcode (9.1, fwiw)

My Podfile uses these pods, in case it matters:

  ROOT = '../..'.freeze
  REACT_NATIVE = File.join(ROOT, 'node_modules/react-native').freeze
  THIRD_PARTY = File.join(REACT_NATIVE, 'third-party-podspecs').freeze

  pod 'native-navigation', :path => ROOT
  pod 'yoga', :path => File.join(REACT_NATIVE, 'ReactCommon/yoga').freeze

  pod 'DoubleConversion', :podspec => File.join(THIRD_PARTY, 'DoubleConversion.podspec').freeze
  pod 'Folly', :podspec => File.join(THIRD_PARTY, 'Folly.podspec').freeze
  pod 'GLog', :podspec => File.join(THIRD_PARTY, 'GLog.podspec').freeze

  pod 'React', :path => REACT_NATIVE, :subspecs => %w(
    Core
    CxxBridge
    DevSupport
    RCTAnimation
    RCTImage
    RCTNetwork
    RCTText
    RCTWebSocket
  )

Expected Behavior

Build should work

Actual Behavior

Build failure, with error:

Undefined symbols for architecture x86_64:
  "typeinfo for facebook::react::PrivateDataBase", referenced from:
      std::__1::enable_if<std::is_base_of<facebook::react::PrivateDataBase, facebook::react::JSCExecutor>::value, facebook::react::JSCExecutor>::type* facebook::react::PrivateDataBase::tryCast<facebook::react::JSCExecutor>(void*) in JSCExecutor.o
      typeinfo for facebook::react::JSCExecutor in JSCExecutor.o
      std::__1::enable_if<std::is_base_of<facebook::react::PrivateDataBase, facebook::react::(anonymous namespace)::JSFunctionPrivateData>::value, facebook::react::(anonymous namespace)::JSFunctionPrivateData>::type* facebook::react::PrivateDataBase::tryCast<facebook::react::(anonymous namespace)::JSFunctionPrivateData>(void*) in JSCHelpers.o
      typeinfo for facebook::react::(anonymous namespace)::JSFunctionPrivateData in JSCHelpers.o
  "vtable for facebook::react::PrivateDataBase", referenced from:
      facebook::react::PrivateDataBase::PrivateDataBase() in JSCExecutor.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "facebook::react::PrivateDataBase::~PrivateDataBase()", referenced from:
      facebook::react::JSCExecutor::JSCExecutor(std::__1::shared_ptr<facebook::react::ExecutorDelegate>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, folly::dynamic const&) in JSCExecutor.o
      facebook::react::JSCExecutor::~JSCExecutor() in JSCExecutor.o
      facebook::react::(anonymous namespace)::JSFunctionPrivateData::~JSFunctionPrivateData() in JSCHelpers.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution

I was able to resolve the issue by adding another section to the React.podspec:

s.subspec "PrivateDatabase" do |ss|
  ss.source_files         = "ReactCommon/privatedata/*.{cpp,h}"
  ss.private_header_files = "ReactCommon/privatedata/*.h"
end

and then adding that to my Podfile.

I'll create a PR with a fix: I think adding PrivateDatabase as a dependency for jschelpers should solve the issue implicitly. But would like to use this issue to track it, in case there are any other issues as a result.

Activity

  1. changed the title [-]PrivateDatabase.{cpp,h} not included in Podspec[/-] [+][0.50.0] PrivateDatabase.{cpp,h} not included in Podspec[/+] on Nov 3, 2017
  2. added 2 commits that reference this issue on Nov 4, 2017
    e33688e
    6817f05
  3. locked as resolved and limited conversation to collaborators on Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions