PJSIP as Dynamic library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are using PJSIP in our iOS App. To make it easier to distribute and version manage PJSIP, we have wrapped PJSIP into a Cocoapod: https://github.com/VoIPGRID/Vialer-pjsip-iOS.

Now, I'm not entirely clear on the subject but, At the moment PJSIP is compiled statically which leads to an error "target has transitive dependencies that include static binaries". For more info see: https://github.com/CocoaPods/CocoaPods/issues/3841#issuecomment-123803940

I'd like to compile PJSIP Dynamically which I think should be possible: http://www.pjsip.org/pjlib/docs/html/group__pj__dll__target.htm.

I found a tutorial which explains the steps to create a Dynamic library: https://pewpewthespells.com/blog/convert_static_to_dynamic.html but I'm stuck at the step which uses libtool to create the dynamic library for a specific architecture.

I have managed to extract all "o" files for a specific architecture out of the "fat" pjsip library.
To create the dynamic lib I'm using the following command:
libtool -dynamic *.o -o PJSIP_arm64.dylib -framework Foundation -framework AVFoundation -framework AudioToolBox -framework CFNetwork -lc++ -arch_only arm64 -lSystem

This results in a lot of errors the first couple being:
Undefined symbols for architecture arm64:
  "_AVAudioSessionCategoryPlayAndRecord", referenced from:
      _ca_factory_init in coreaudio_dev.o
  "_AVAudioSessionModeVoiceChat", referenced from:
      _ca_factory_init in coreaudio_dev.o
  "_AudioComponentFindNext", referenced from:
      _ca_factory_init in coreaudio_dev.o
      _ca_stream_set_cap in coreaudio_dev.o
  "_AudioComponentGetDescription", referenced from:
      _ca_stream_get_cap in coreaudio_dev.o
  "_AudioComponentInstanceDispose", referenced from:
      _ca_stream_destroy in coreaudio_dev.o
  "_AudioComponentInstanceNew", referenced from:
      _create_audio_unit in coreaudio_dev.o
  "_AudioConverterDispose", referenced from:
      _ca_stream_destroy in coreaudio_dev.o
      _ilbc_dealloc_codec in ilbc.o

Now, AVAudioSessionCategoryPlayAndRecord is part of AVFoundation which I have told libtool to use as framework but somehow it cannot find it. No error is given about the framework not being found.
I suspect these are indications of a larger issue, I think libtool is not aware that I want to create a library for iPhoneOS with an arm64 architecture.

How would I proceed in creating a dynamic fat library from PJSIP?
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux