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

Problem with iOS ANE and third party library

New Here ,
Jul 02, 2013 Jul 02, 2013

Copy link to clipboard

Copied

Hello everyone, we are trying to generate an ANE that includes a third party library for visualizing pdf documents. The library works fine without ANE integration, and also the ANE itself works without the library.

The problem seems to occur while linking:

[java] # Generating executable...

     [java] /Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/bin/ld64/ld64 -ObjC -dead_strip -Z -arch armv7 -syslibroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" -L/usr/lib -F"/System/Library/Frameworks" -L"/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib" -o "../aot6539214514669007088.tmp" -exported_symbol _main "extensionglue.o" -non_global_symbols_no_strip_list "/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib/local_nostrip.arm-air.txt" -ios_version_min 4.3 "/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib/libRuntimeInterpreter.arm-air.a" -lgcc_s.1 -lSystem.B -lstdc++.6 -lcrt1.o -lz -lobjc -framework CoreFoundation -framework UIKit -framework MobileCoreServices -framework CoreGraphics -framework Foundation -framework SystemConfiguration -framework AudioToolbox -framework CFNetwork -framework QuartzCore -framework OpenGLES -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework AVFoundation -framework Security -ios_version_min 5.1 -framework CFNetwork -framework CoreText -framework QuartzCore -framework Security -framework CoreGraphics -framework Foundation -framework UIKit -lcom.mobbeel.example.pdfane.ExamplePDFANE -L/var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/728b1415-e666-4c32-864e-5b923c4a7d30 -F/var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/728b1415-e666-4c32-864e-5b923c4a7d30 -exported_symbol _ExtInitializer -exported_symbol _ExtFinalizer -force_load "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/../../../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a"

     [java] ld: in /var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/728b1415-e666-4c32-864e-5b923c4a7d30/libcom.mobbeel.example.pdfane.ExamplePDFANE.a(SWIGTYPE_p_void.o), archive member 'SWIGTYPE_p_void.o' with length 3440 is not mach-o or llvm bitcode for architecture armv7

     [java] com.adobe.air.ipa.ProcessError: Unable to generate executable

     [java]           at com.adobe.air.ipa.AOTCompiler.launchProcess(AOTCompiler.java:311)

     [java]           at com.adobe.air.ipa.AOTCompiler.linkMachO(AOTCompiler.java:1764)

     [java]           at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1914)

     [java]           at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:431)

     [java]           at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:825)

     [java]           at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:91)

     [java]           at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:257)

     [java]           at com.adobe.air.ADT.parseArgsAndGo(ADT.java:588)

     [java]           at com.adobe.air.ADT.run(ADT.java:435)

     [java]           at com.adobe.air.ADT.main(ADT.java:485)

     [java] Compilation failed while executing : ld64

     [java] Java Result: 12

Anyone can give any clue of what can be happening or what type of problem could have the third party library that triggers the problem?

Thank you very much for your help.

Regards.

TOPICS
Development

Views

3.1K

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
New Here ,
Jul 02, 2013 Jul 02, 2013

Copy link to clipboard

Copied

I have added

<packagedDependencies>

                              <packagedDependency>libPDFNet.a</packagedDependency>

                    </packagedDependencies>

to the platform.xml file, but now i'm getting this error:

ld: file is universal (3 slices) but does not contain a(n) armv7 slice: ../../temp/ios/libPDFNet.a for architecture armv7

The .a file does have both armv7 and i386 slices, here's the result of doing a file command on it:

file libPDFNet.a

libPDFNet.a: Mach-O universal binary with 3 architectures

libPDFNet.a (for architecture armv7):          current ar archive random library

libPDFNet.a (for architecture i386):          current ar archive random library

libPDFNet.a (for architecture cputype (12) cpusubtype (11)):          current ar archive random library

Any ideas?

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
Guest
Jul 02, 2013 Jul 02, 2013

Copy link to clipboard

Copied

I hope that after adding the .a as a packaged Dependency, you have removed the linking step to this from the linker options?

Can you share the entire contents of your platform.xml and the commands you are using to package ANE as well as IPA?

Thanks,

Neha

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
New Here ,
Jul 03, 2013 Jul 03, 2013

Copy link to clipboard

Copied

Hello Neha, and thanks for your answer. That's my plaftorm.xml right now:

<?xml version="1.0" encoding="utf-8" ?>

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

    <sdkVersion>6.1</sdkVersion>

   

    <linkerOptions>

        <option>-ios_version_min 5.1</option>

        <option>-framework CFNetwork</option>

                    <option>-framework CoreText</option>       

                    <option>-framework QuartzCore</option>   

        <option>-framework Security</option>

                    <option>-framework CoreGraphics</option>   

    </linkerOptions>

   

    <packagedDependencies>

                              <packagedDependency>libPDFNet.a</packagedDependency>

          </packagedDependencies>

</platform>

It looks like "adt -package -target ane..." works fine, but when I try "adt -package -target ipa-debug-interpreter...", it gives me the error. This is the ant script I'm using for this step:

<target name="test-ios-package" description="Create the debug application .ipa package">

                    <copy file="../src/${name}-app.xml" todir="../bin" overwrite="true"/>

                    <java jar="${sdk.home}/lib/adt.jar" failonerror="true" dir="../bin" fork="true">

                              <jvmarg line="-Xms1024m -Xmx4096m -XX:MaxPermSize=512m"/>

                              <arg value="-package"/>

                              <arg value="-Xverbose"/>

                              <arg value="-target"/>

                              <arg value="ipa-debug-interpreter"/>

                              <arg value="-provisioning-profile"/>

                              <arg value="${ios.provisioning.profile}"/>

                              <arg value="-storetype"/>

                              <arg value="pkcs12"/>

                              <arg value="-keystore"/>

                              <arg value="${ios.keystore.file}"/>

                              <arg value="-storepass"/>

                              <arg value="${ios.keystore.password}"/>

                              <arg value="${name}.ipa"/>

                              <arg value="${name}-app.xml"/>

                              <arg value="${name}.swf"/>

                              <arg line="-extdir ../../bin/"/>

                              <arg line="-platformsdk"/>

                              <arg line="${ios.sdk}"/>

 

                    </java>

          </target>

And this is the error log:

test-ios-package:

     [copy] Copying 1 file to /Users/rsanchez/Downloads/ExamplePDF-ANE 2/test/bin

     [java] # Generating extensions glue...

     [java] # Generating asm... /Users/rsanchez/Downloads/ExamplePDF-ANE 2/test/bin/AOTBuildOutput3420494750717797001.tmp/extensionglue.asm

     [java] SSC optimization is false

     [java] # -- function 0/10...

     [java] # -- function 1/10...

     [java] # -- function 2/10...

     [java] # -- function 3/10...

     [java] # -- function 4/10...

     [java] # -- function 5/10...

     [java] # -- function 6/10...

     [java] # -- function 7/10...

     [java] # -- function 8/10...

     [java] # -- function 9/10...

     [java] # llc took 0.015s

     [java] # non-abcMethod functions took 0.0010s

     [java] # 0.0010s (6.666666666666667%) for ExtInitializer

     [java] # 0.0s (0.0%) for llvm.eh.sjlj.callsite

     [java] # 0.0s (0.0%) for llvm.eh.exception

     [java] # 0.0s (0.0%) for llvm.eh.selector

     [java] # 0.0s (0.0%) for llvm.eh.sjlj.lsda

     [java] # 0.0s (0.0%) for llvm.eh.sjlj.setjmp

     [java] # 0.0s (0.0%) for llvm.frameaddress

     [java] # 0.0s (0.0%) for _Unwind_SjLj_Unregister

     [java] # 0.0s (0.0%) for _Unwind_SjLj_Register

     [java] # 0.0s (0.0%) for ExtFinalizer

     [java] /Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/bin/as/as-arm -arch armv7 -o extensionglue.o extensionglue.asm

     [java] # Generating executable...

     [java] /Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/bin/ld64/ld64 -ObjC -dead_strip -Z -arch armv7 -syslibroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" -L/usr/lib -F"/System/Library/Frameworks" -L"/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib" -o "../aot5845441215976477087.tmp" -exported_symbol _main "extensionglue.o" -non_global_symbols_no_strip_list "/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib/local_nostrip.arm-air.txt" -ios_version_min 4.3 "/Users/rsanchez/Dev/flex_sdk_4.6/lib/aot/lib/libRuntimeInterpreter.arm-air.a" -lgcc_s.1 -lSystem.B -lstdc++.6 -lcrt1.o -lz -lobjc -framework CoreFoundation -framework UIKit -framework MobileCoreServices -framework CoreGraphics -framework Foundation -framework SystemConfiguration -framework AudioToolbox -framework CFNetwork -framework QuartzCore -framework OpenGLES -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework AVFoundation -framework Security -ios_version_min 4.0 -framework CFNetwork -framework CoreText -framework QuartzCore -framework Security -framework CoreGraphics -lcom.mobbeel.example.pdfane.ExamplePDFANE -L/var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/f41b5f50-db2b-4e71-aab9-ea46601e402e -F/var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/f41b5f50-db2b-4e71-aab9-ea46601e402e "-L/var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/f41b5f50-db2b-4e71-aab9-ea46601e402e" "-lPDFNet" -exported_symbol _ExtInitializer -exported_symbol _ExtFinalizer -force_load "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/../../../../../../Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a"

     [java] ld: file is universal (3 slices) but does not contain a(n) armv7 slice: /var/folders/vr/z65d15r17cl0n9cy3_7r66tc0000gn/T/f41b5f50-db2b-4e71-aab9-ea46601e402e/libPDFNet.a for architecture armv7

     [java] com.adobe.air.ipa.ProcessError: Unable to generate executable

     [java]           at com.adobe.air.ipa.AOTCompiler.launchProcess(AOTCompiler.java:311)

     [java]           at com.adobe.air.ipa.AOTCompiler.linkMachO(AOTCompiler.java:1764)

     [java]           at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1914)

     [java]           at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:431)

     [java]           at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:825)

     [java]           at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:91)

     [java]           at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:257)

     [java]           at com.adobe.air.ADT.parseArgsAndGo(ADT.java:588)

     [java]           at com.adobe.air.ADT.run(ADT.java:435)

     [java]           at com.adobe.air.ADT.main(ADT.java:485)

     [java] Compilation failed while executing : ld64

BUILD FAILED

/Users/rsanchez/Downloads/ExamplePDF-ANE 2/test/build/build.xml:30: Java returned: 12

Any help would be really helpful. Thank you in advance.

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
Guest
Jul 03, 2013 Jul 03, 2013

Copy link to clipboard

Copied

Hi,

I see a discrepancy in your platform.xml and your Xverbose output. You have specified ios_version_min as 5.1 in your platform.xml, however, the Xverbose output says -ios_version_min 4.3 or -ios_version_min 4.0.

I'm guessing some earlier version of ANE is being used.

Please try recompiling the ANE again, making sure that the correct platform.xml and libPDFNet.a, which contains architecture armv7 is being used.

(You can try unzipping the ANE and then, checking its contents, platform.xml and the architectures present in libPDFNet.a using the file command)

Then, remove the earlier ANE from your extensions directory, ../../bin/ ,

copy the new one there and try packaging the IPA again.

If this doesn't work out, please raise a bug at, https://bugbase.adobe.com, attaching your ANE and other resources to the bug.

Please also share the bug number on this thread.

Thanks,

Neha

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
New Here ,
Jul 04, 2013 Jul 04, 2013

Copy link to clipboard

Copied

Hi Neha, I still had the 4.3 version in the platform.xml file (haven't saved the file after the change). But after changing it to 5.1 it keeps failing. The ANE is being re-build each time, and the libPDFNet.a in it contains armv7.

I will post a bug and share with you the bug number.

Thank you very much.

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
New Here ,
Jul 04, 2013 Jul 04, 2013

Copy link to clipboard

Copied

I have already report the bug: Bug 3589952

Regards.

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
New Here ,
Jul 04, 2013 Jul 04, 2013

Copy link to clipboard

Copied

Hello again, Neha, it seems i have been be able to generate and deploy the IPA by changing the "ld" command that uses adobe sdk, with the one downloaded using macports (port -v -k install ld64 +llvm-3.2), so it seems the problem is in "ld" command distributed with your sdk. I don't know if that makes any sense for you or not.

Regards.

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
Guest
Jul 04, 2013 Jul 04, 2013

Copy link to clipboard

Copied

Thanks for reporting the bug.

Yes, there could possibly be some issue with the ld tool we ship. I will look into it and ask you for more information, if required.

Regards,

Neha

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
New Here ,
Apr 26, 2016 Apr 26, 2016

Copy link to clipboard

Copied

LATEST

I'm currently experiencing the same issue described in this thread. Can anyone tell me the ld64 version that they have used to successfully compile the IPA?

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