rollbar / rollbar-ios

Objective-C library for crash reporting and logging with Rollbar.

Home Page:https://docs.rollbar.com/docs/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demangle.cpp failing to build

Janglinator opened this issue · comments

After installing rollbar using Cocoapods (pod 'Rollbar', '1.14.3'), I'm getting errors similar to the one below:

...
bool readUntil(char c, std::string &result) {

    llvm::Optional<char> c2;      <------Implicit instantiation of undefined template 'llvm::Optional<char>'

    while (!isEmpty() && (c2 = peek()).getValue() != c) {
      result.push_back(c2.getValue());
      advanceOffset(1);
    }
    return c2.hasValue() && c2.getValue() == c;
  }
...

I'm not sure where to start with this issue. Our other projects work fine with Rollbar.

Xcode 11.3.1

This issue is similar to rollbar/rollbar-react-native#102, however I'm seeing this issue in the iOS project

@Janglinator , yes does look like an issue coming from our KSCrash dependency. However, we are able to build our SDK (including KSCrash) successfully using Xcode 11.3.1. Taking into account your comment about the fact that your other apps that are also using our SDK do compile fine, I would recommend taking a closer look at your "misbehaving" project's compiler/llvm related settings (maybe simply by comparing them with the good/working projects' settings).
Possibly, another (at least temporary) alternative is to use Rollbar-iOS as a prebuilt referenced framework instead of integration via CocoaPods.

Thanks for the response! Unfortunately I'll probably have to take the pre-compiled route. I've dug through quite a few settings, and nothing seem off. Unless someone else closes it, I'll leave this issue open for now and report back.

Update: No luck. Decided to just manually install and stop wasting time. Feel free to close this ticket if you didn't want to look into it further 😄

@Janglinator would you be able to share the other Podfile dependencies you had in your project when you encountered the build issue?

It's similar to an issue we've been tracking which seemed related to the gRPC library somehow, so just curious for any further leads.

With pleasure!

  - BetterKit (0.5.3)
  - BoringSSL-GRPC (0.0.3):
    - BoringSSL-GRPC/Implementation (= 0.0.3)
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Implementation (0.0.3):
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Interface (0.0.3)
  - CellDataCoupler (3.0.1)
  - Charts (3.3.0):
    - Charts/Core (= 3.3.0)
  - Charts/Core (3.3.0)
  - CocoaAsyncSocket (7.6.3)
  - CodableFirebase (0.2.1)
  - Firebase/Auth (6.8.1):
    - Firebase/CoreOnly
    - FirebaseAuth (~> 6.2.3)
  - Firebase/Core (6.8.1):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.1.1)
  - Firebase/CoreOnly (6.8.1):
    - FirebaseCore (= 6.2.3)
  - Firebase/Database (6.8.1):
    - Firebase/CoreOnly
    - FirebaseDatabase (~> 6.1.0)
  - Firebase/DynamicLinks (6.8.1):
    - Firebase/CoreOnly
    - FirebaseDynamicLinks (~> 4.0.5)
  - Firebase/Firestore (6.8.1):
    - Firebase/CoreOnly
    - FirebaseFirestore (~> 1.5.0)
  - FirebaseAnalytics (6.1.1):
    - FirebaseCore (~> 6.2)
    - FirebaseInstanceID (~> 4.2)
    - GoogleAppMeasurement (= 6.1.1)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (~> 0.3)
  - FirebaseAnalyticsInterop (1.5.0)
  - FirebaseAuth (6.2.3):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.2)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.2)
    - GoogleUtilities/Environment (~> 6.2)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseAuthInterop (1.0.0)
  - FirebaseCore (6.2.3):
    - FirebaseCoreDiagnostics (~> 1.0)
    - FirebaseCoreDiagnosticsInterop (~> 1.0)
    - GoogleUtilities/Environment (~> 6.2)
    - GoogleUtilities/Logger (~> 6.2)
  - FirebaseCoreDiagnostics (1.2.0):
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleDataTransportCCTSupport (~> 1.3)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
    - nanopb (~> 0.3.901)
  - FirebaseCoreDiagnosticsInterop (1.2.0)
  - FirebaseDatabase (6.1.4):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - leveldb-library (~> 1.22)
  - FirebaseDynamicLinks (4.0.6):
    - FirebaseAnalyticsInterop (~> 1.3)
    - FirebaseCore (~> 6.2)
  - FirebaseFirestore (1.5.1):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.2)
    - FirebaseFirestore/abseil-cpp (= 1.5.1)
    - "gRPC-C++ (= 0.0.9)"
    - leveldb-library (~> 1.22)
    - nanopb (~> 0.3.901)
    - Protobuf (~> 3.1)
  - FirebaseFirestore/abseil-cpp (1.5.1):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.2)
    - "gRPC-C++ (= 0.0.9)"
    - leveldb-library (~> 1.22)
    - nanopb (~> 0.3.901)
    - Protobuf (~> 3.1)
  - FirebaseInstanceID (4.2.7):
    - FirebaseCore (~> 6.0)
    - GoogleUtilities/Environment (~> 6.0)
    - GoogleUtilities/UserDefaults (~> 6.0)
  - FPSCounter (4.0.0)
  - FRHyperLabel (1.0.4)
  - GoogleAppMeasurement (6.1.1):
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (~> 0.3)
  - GoogleDataTransport (3.3.1)
  - GoogleDataTransportCCTSupport (1.3.1):
    - GoogleDataTransport (~> 3.3)
    - nanopb (~> 0.3.901)
  - GoogleUtilities/AppDelegateSwizzler (6.5.1):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (6.5.1)
  - GoogleUtilities/Logger (6.5.1):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (6.5.1):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (6.5.1):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (6.5.1)"
  - GoogleUtilities/Reachability (6.5.1):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (6.5.1):
    - GoogleUtilities/Logger
  - "gRPC-C++ (0.0.9)":
    - "gRPC-C++/Implementation (= 0.0.9)"
    - "gRPC-C++/Interface (= 0.0.9)"
  - "gRPC-C++/Implementation (0.0.9)":
    - "gRPC-C++/Interface (= 0.0.9)"
    - gRPC-Core (= 1.21.0)
    - nanopb (~> 0.3)
  - "gRPC-C++/Interface (0.0.9)"
  - gRPC-Core (1.21.0):
    - gRPC-Core/Implementation (= 1.21.0)
    - gRPC-Core/Interface (= 1.21.0)
  - gRPC-Core/Implementation (1.21.0):
    - BoringSSL-GRPC (= 0.0.3)
    - gRPC-Core/Interface (= 1.21.0)
    - nanopb (~> 0.3)
  - gRPC-Core/Interface (1.21.0)
  - GTMSessionFetcher/Core (1.3.1)
  - IQKeyboardManagerSwift (6.4.2)
  - Keychain (0.3.1)
  - leveldb-library (1.22)
  - lottie-ios (3.1.3)
  - Mapbox-iOS-SDK (4.11.2)
  - MJPEGStreamLib (0.2.1)
  - nanopb (0.3.9011):
    - nanopb/decode (= 0.3.9011)
    - nanopb/encode (= 0.3.9011)
  - nanopb/decode (0.3.9011)
  - nanopb/encode (0.3.9011)
  - NmeaParser (0.1.0)
  - OktaOidc (3.5.1)
  - ONVIFCamera (2.0.0)
  - PinCodeTextField (0.1.0)
  - PlainPing (0.5)
  - Protobuf (3.11.2)
  - Pulley (2.7.0)
  - Subbus (0.1.3)
  - SwiftLint (0.35.0)
  - SwiftSoup (2.2.1)

I'm suspicious of FirebaseFirestore gRPC-C++ dependency. We don't have any other projects with Firestore in it. But I have no idea where to even start with debugging the issue.

Worth noting: Adding the pre-compiled Framework manually (and referencing libc++.tbd) seems to have worked fine, even with Firestore still in the pods project

@Janglinator thanks :) Yes, Firestore's gRPC dependency was how we first encountered this too. Good to know that the pre-compiled framework works fine.

Root cause KSCrash issue: kstenerud/KSCrash#352