apotocki / boost-iosx

Builds Boost C++ libraries and packages them as XCFrameworks for iOS (simulator and device), visionOS (simulator and device), macOS, and Mac Catalyst (Intel & Apple Silicon M1).
Boost Software License 1.0
63 stars 17 forks source link

ld: symbol(s) not found for architecture arm64 #5

Closed ghasemikasra39 closed 3 years ago

ghasemikasra39 commented 3 years ago

I am not sure if this is the correct project to file this issue, but after updating to Flipper 0.96.1, a new package called Flipper-Boost-iOSX was added, and that causes this error:

Undefined symbols for architecture arm64:
  "___cxa_increment_exception_refcount", referenced from:
      folly::cxxabi_cxa_exception_sans_reserve() in libFlipper-Folly.a(Exception.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
    Ld /Users/kasra/Library/Developer/Xcode/DerivedData/InflationCalc-fmwbpshgatctktepfxhturrnjevn/Build/Products/Debug-iphoneos/InflationCalc.app/InflationCalc normal
(1 failure)
System:
    OS: macOS 11.4
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 35.37 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.3 - ~/.nvm/versions/node/v14.15.3/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.18.1 - ~/.nvm/versions/node/v14.15.3/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7486908
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_275 - /usr/bin/javac

Flipper  0.96.1
Flipper-Folly 2.6.9
Flipper-RSocket 1.4.3
FlipperKit  0.96.1
OpenSSL-Universal 1.1.1100
ghasemikasra39 commented 3 years ago

Only these versions work, as you can see, the Flipper-Boost-iOSX is removed and then everything start to work:

Screenshot 2021-07-11 at 13 02 56

apotocki commented 3 years ago

It doesn't look like a Boost issue. ___cxa_increment_exception_refcount is likely a part of standard C++ library, not Boost. Anyway, this project just for building Boost, and any issues like this (if they have something to do with Boost) should be addressed to related Boost library developers.

apotocki commented 3 years ago

I think the problem is in Flipper (https://github.com/facebook/flipper) project, or more precisely in https://github.com/facebook/folly/blob/master/folly/lang/Exception.cpp . It uses the function abi::__cxa_increment_exception_refcount that is not defined in the current arm64 ios platform. Or perhaps there is some additional system library that should be included at the link stage.

ghasemikasra39 commented 3 years ago

You are right, I need to file this there. I will close this issue. Thanks a lot.