• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Building ANE on iOS including third-party .framework

Participant ,
Sep 15, 2015 Sep 15, 2015

Copy link to clipboard

Copied

Hi devs,

we are trying to build an ANE on iOS which is based on a third-party .framework This is not our first time to build ANEs from third-party .frameworks but this one is giving us a hard time. Here I will explain what the problem we are facing is and I would really appreciate if anyone could give us a hint. I am also willing to pay cash for the help as we have been trying and trying over this for almost two weeks now!

This is the error messages we see when trying to compile the .ipa from our extension. (Same errors on mac and windows)

Undefined symbols for architecture arm64:

  "_dgels_", referenced from:

      __ZN5ceres8internal6LAPACK21EstimateWorkSizeForQREii in ThirdPartyFramework(lapack.cc.o)

      __ZN5ceres8internal6LAPACK19SolveInPlaceUsingQREiiPKdiPdS4_PNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

  "_dpotrf_", referenced from:

Undefined symbols for architecture armv7:

  "_dgels_", referenced from:

      __ZN5ceres8internal6LAPACK25SolveInPlaceUsingCholeskyEiPKdPdPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

      __ZN5ceres8internal6LAPACK21EstimateWorkSizeForQREii in ThirdPartyFramework(lapack.cc.o)

      __ZN5ceres8internal6LAPACK19SolveInPlaceUsingQREiiPKdiPdS4_PNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

  "_dpotrs_", referenced from:

      __ZN5ceres8internal6LAPACK25SolveInPlaceUsingCholeskyEiPKdPdPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

  "_dpotrf_", referenced from:

      __ZN5ceres8internal6LAPACK25SolveInPlaceUsingCholeskyEiPKdPdPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

  "_dsyrk_", referenced from:

      __ZN5ceres8internal4BLAS20SymmetricRankKUpdateEiiPKdbddPd in ThirdPartyFramework(blas.cc.o)

  "_dpotrs_", referenced from:

      __ZN5ceres8internal6LAPACK25SolveInPlaceUsingCholeskyEiPKdPdPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE in ThirdPartyFramework(lapack.cc.o)

  "_dgesvd_", referenced from:

      __ZN4TooN3SVDILi3ELi3EdE10do_computeEv in ThirdPartyFramework(StereoInitializer.o)

      __ZN4TooN3SVDILin1ELin1EdE10do_computeEv in ThirdPartyFramework(StereoInitializer.o)

      __ZN4TooN3SVDILi4ELi4EdE10do_computeEv in ThirdPartyFramework(MapMaker.o)

  "_dsyrk_", referenced from:

      __ZN5ceres8internal4BLAS20SymmetricRankKUpdateEiiPKdbddPd in ThirdPartyFramework(blas.cc.o)

  "_dgesvd_", referenced from:

      __ZN4TooN3SVDILi3ELi3EdE10do_computeEv in ThirdPartyFramework(StereoInitializer.o)

      __ZN4TooN3SVDILin1ELin1EdE10do_computeEv in ThirdPartyFramework(StereoInitializer.o)

      __ZN4TooN3SVDILi4ELi4EdE10do_computeEv in ThirdPartyFramework(MapMaker.o)

We created the .a in Xcode 6.4

We are compiling with Air SDK 18 built 199

I know that those error messages mean that the Accelerate.framework is missing in the linker options but we have added it already. here is our ios_platform.xml file:

<platform xmlns="http://ns.adobe.com/air/extension/18.0">

    <sdkVersion>7.0</sdkVersion>

   

    <linkerOptions>

        <option>-ios_version_min 7.0</option>

        <option>-framework Accelerate</option>

        <option>-framework UIKit</option>

        <option>-framework Security</option>

        <option>-framework SystemConfiguration</option>

        <option>-framework QuartzCore</option>

        <option>-framework OpenGLES</option>

        <option>-framework MediaPlayer</option>

        <option>-framework Foundation</option>

        <option>-framework JavaScriptCore</option>

        <option>-framework CoreVideo</option>

        <option>-framework CoreMotion</option>

        <option>-framework CoreLocation</option>

        <option>-framework CFNetwork</option>

        <option>-framework CoreGraphics</option>

        <option>-framework AVFoundation</option>

        <option>-framework AssetsLibrary</option>

        <option>-framework CoreImage</option>

        <option>-framework CoreMedia</option>

        <option>-framework AudioToolbox</option>

        <option>-framework EventKit</option>

        <option>-framework GLKit</option>

        <option>-framework EventKitUI</option>

        <option>-framework WebKit</option>

       

        <!-- This is the third-party framework which we have copied to "\lib\aot\stub" folder in Air SDK -->

        <option>-framework ThirdPartyFramework</option>

       

        <option>-ObjC</option>

        <option>-lz</option>

        <option>-lc++</option>

       

        <option>-w</option>

    </linkerOptions>

   

</platform>

and this is the adt command we are calling to compile .ipa

adt -package -target ipa-debug-interpreter -connect 192.168.0.103 -hideAneLibSymbols yes -storetype pkcs12 -keystore cert/certificate_dev.p12 -storepass pass -provisioning-profile cert/ex.mobileprovision dist/app.ipa application.xml -C bin . -C icons/ios . -extdir lib/

What we are sure of, is that the third-party framework requires Accelerate.framework like many other frameworks that it requires but for some reason, it can't find it! I even tried to clean my own extension .h .m files from any method calling the framework classes to make sure there is no relation between my code and the framework but still when I compile .ipa it throws these errors. If I remove the framework from the ios-platform.xml file

<option>-framework ThirdPartyFramework</option>

it will compile and run fine!

I even tried to build a test extension using Accelerate.framework to make sure it's not a bug on the adobe's side and the result was that it did work just fine. but you'll be surprised to know that I even removed the Accelerate.framework from ios-platform.xml and it worked gine again! WTF! As I learned from docs, Adobe has not included Accelerate.framework by default and we need to add it manually. then why did it work even if it's not added?

Anyway, if Accelerate.framework is available, then why my third-party framework is not able to find those methods from it?!!!

I am totally confused and I have no idea what to try next. Please help me. I'm loosing all my hair

TOPICS
Performance issues

Views

504

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

LATEST

Hey,

Did you find any solution for this problem? I am having the same kind of issues.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines