Open oojikoo opened 4 years ago
I can confirm that it's not building with cyclic dependency errors with following environments:
Xcode: 11.3 (10.15.2 Catalina) / 11.2.1 (10.15 Catalina)
react: '16.8.6',
react-native: '0.60.4',
react-native-sip: '2.9.0'
v2.8.7 builds only for release if bitcode is enabled.
@buraktt I solved this by deleting the command line tool. after trying all kind of things. this worked on me.
but just in case, do these first. if this doesn't work.
$ rm -rf /Library/Developer/CommandLineTools
and you get to install xcode command line tool again.
$ xcode-select --install
@oojikoo I tried your suggestions and ended up with same errors. Even creating a new project with only dependency as react-native-sip yielded same results. I think I'll stick to 2.8.7 for now. Thanks anyway.
Chiming in to say that I experience the cyclic dependency issue as well. On 2.9.0 I experience it when building to both physical devices and the Simulator. On 2.8.7 I can get it to build to the Simulator, however physical devices fail with "please specify target machine". If I apply patching manually to specify a target, I also get the cyclic dependency issue on 2.9.0. I'm going to keep digging around to see if I can fix it, but since my experience with both PJSIP, iOS, and React Native is all fairly limited I won't make any promises.
a while After one successful build, I happened to clean the ios build and had the same error( "cyclic dependency issue", "please specify target machine" issue) over again.
and.... I figured out this. It worked multiple times on me whenever the errors happened.
// yes to all
$ npx react-native-clean-project --remove-iOS-build --remove-iOS-pods
$ defaults delete com.apple.dt.Xcode
react-native run-ios
please let me know if this works on you guys.
tried and still not working
Suddenly my 2.8.7 build also started to give cyclic dependency errors. I had made a folder backup when it was building ok. Tried to build and had success, after doing pod install it started to give cyclic dependency errors again. (I realized pod install changes Podfile.lock too)
Compared the pod files; difference was cocoapods version (current 1.9.0, old was 1.8.4) & react-native-device-info was installed later.
After downgrading cocoapods to 1.8.4 & removing react-native-device-info
pod install --deployment --no-repo-update
and changing the build config as follows:
Project:
Enable bitcode: Yes
Target:
Enable bitcode: No
Pods Project:
Enable bitcode: No
add PJ_AUTOCONF=1
to preprocessor macros (build & release)
react-native-sip:
Enable bitcode: Yes
the build was successful, I'll try with 2.9.0 when i have time (same path should work) Still not sure if the problem was react-native-device-info or cocoapods though :)
@buraktt Hi. Can you share the work project with installed react-native-sip?
I'm having the same issue... any advance or reliable solution?
Howdy. I've been struggling with this for the last few days and I think I've found a solution.
After some detective work and looking into the error stack trace, I noticed some stand out references in the iOS code that appeared to have conflicts leading to this error. After researching, I found some info about Header Leaks.
Cocoapods has a thing where it maps all the pod headers into one location, and this could cause conflicts. My hunch was that our code was leaking some headers that were affecting the compiling of the other frameworks (Foundation, Darwin, etc).
I found a xconfig setting that allows disabling the mapping of the headers of this module. After applying that to RTCPjSip.xcodeproj and the react-native-sip.podspec file, I was able to make this error go away and successfully build on the simulator and a real device.
I will link to my fork of the repo so you can see the changes I made and where exactly they go. Hopefully this is able to help.
I'll add a note about my fork in case you might want to use it. That latest 2.9.0 version of this repo was causing troubles and also the addition of building the PJSIP libraries with Docker was breaking our CI builds because we don't have docker on there. It also uses our fork of PJSIP-Builder that is running PJSIP 2.8.
Hi David,
Appreciate your effort in making this possible at your side. It is still throwing errors for me.
Bitcode is set to No for react-native-sip Node version : 10.19.0 Xcode Version 10.2.1
Showing All Errors Only Undefined symbol: vtable for cxxabiv1::vmi_class_type_info
Undefined symbol: ___cxa_guard_release
Undefined symbol: operator new(unsigned long)
Undefined symbol: ___cxa_begin_catch
Undefined symbol: std::terminate()
Undefined symbol: ___cxa_pure_virtual
Undefined symbol: vtable for cxxabiv1::si_class_type_info
Undefined symbol: ___cxa_guard_abort
Undefined symbol: vtable for cxxabiv1::class_type_info
Undefined symbol: ___gxx_personality_v0
Undefined symbol: ___cxa_guard_acquire
Undefined symbol: operator delete(void*)
Then I tried with your github project by updating my package.json
"react-native-sip": "https://github.com/FastPBX/react-native-sip.git"
Still it is showing the same issue. Am I missing something here?
Thanks for your contribution @David-Melo Started a new project with this package but getting the same error.
I added USE_HEADERMAP = NO;
to project.pbxproj
'USE_HEADERMAP' => 'NO'
to the react-native-sip.prospec file.
It builds perfectly on Simulator, but breaks whenever I try to run on a device or just run a build, I get this error (1 of 21 errors):
fatal error: cyclic dependency in module 'Foundation': Foundation -> CoreFoundation -> Darwin -> OpenGLES -> Foundation
@David-Melo
Ignore my ignorance.
I simply needed to run
> pod install
And your fix worked perfectly. Thank you!!
I already mentioned adn discussed on #3 . I think it's not fixed yet.
building on simulator was ok with the previous version 2.8.7 but ios build against physical devices
so I updated to 2.9.0 which fixed the issue. but still it fails.
this is the error message I'm getting.
Environment