Skip to main content
chris.campbell
Community Manager
Community Manager
January 29, 2015
Question

Mac 64-bit development build discussion

  • January 29, 2015
  • 13 replies
  • 11033 views

This thread is for discussion of the 64-bit development build of AIR for OSX.  This feature is currently not available on labs.adobe.com and is distributed privately for those developers that are interested in providing feedback.  If you would like to help us test this upcoming feature (release date not announced), please drop a line to ccampbel@adobe.com.

Because this is on the bleeding edge, we're going to do something slightly different for bug reporting.  For the time being, please post any bugs related to this feature (or these development builds) to this thread or via email (ccampbel@adobe.com).  We're going to keep the bugs off of bugbase.adobe.com for the time being.  We'll make sure to update everyone when this changes (which will probably be when this goes to the official beta on labs.)  If your project/work needs to remain private, please feel free to send me the bug report and attachments in email and I'll make sure they get to the right internal people only.

Thanks and we're excited to hear what you have to say.

This topic has been closed for replies.

13 replies

Known Participant
April 3, 2016

I'm in the process of updating our existing ANEs to 64-bit for Mac OS X. They seem to still have problems (Error #3500) if you include a dependency dylib.

I've managed to reduce the ANE to a very simple test case that succeeds upon calling TestAne_Test_Func if I don't have the dependent library (or calls), and fails when the dylib is included. To test without the dylib, just define USE_DYLIB or make the dylib non-optional in the "Linked frameworks and Libraries" setting. Note: it will fail even if you non-optionally link the dylib but leave the calls to it disabled. It seems like AIR isn't finding the dynamic library included in the framework anymore. Looking in a release export, the dylibs aren't included in the release .app either.

This is a big problem for ANEs that use third-party libraries that are provided as dylibs.

Dylib sources:

TestAneDylibFunctions.hpp:


#ifndef TestAneDylibFunctions_hpp

#define TestAneDylibFunctions_hpp

#include <stdio.h>

class TestAneDylibFunctions

{

public:

  TestAneDylibFunctions();

  ~TestAneDylibFunctions();

void TestFunction(const char * msg);

};

#endif /* TestAneDylibFunctions_hpp */

TestAneDylibFunctions.cpp:

#include "TestAneDylibFunctions.hpp"

TestAneDylibFunctions::TestAneDylibFunctions()

{

}

TestAneDylibFunctions::~TestAneDylibFunctions()

{

}

void TestAneDylibFunctions::TestFunction(const char * msg)

{

  printf("Test function: %s", msg);

}

ANE native code:

TestAne.h:

#ifndef TESTANE_H_

#define TESTANE_H_

#include "FlashRuntimeExtensions.h"

extern "C" {

// Symbols tagged with EXPORT are externally visible.

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64)

#define EXPORT __declespec(dllexport)

#elif defined(__MACH__) || defined(__ANDROID__) || defined(__linux__)

// Must use the -fvisibility=hidden gcc option.

#define EXPORT __attribute__((visibility("default")))

#else

#error "Platform not supported"

#endif

// Framework entry point

EXPORT void testAneInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet, FREContextFinalizer* ctxFinalizerToSet);

// Framework entry point

EXPORT void testAneFinalizer(void* extData);

}

#endif /* TESTANE_H_ */

TestAne.cpp:

#include "TestAne.h"

#include <vector>

#include <string>

#include "TestAneDylibFunctions.hpp"

static std::vector<FRENamedFunction> named_functions;

namespace AneHelperFuncs {

  FREObject getFREUint32(uint32_t const value) {

    FREObject returnValue;

    FREResult const freResult = FRENewObjectFromUint32(value, &returnValue);

    if (FRE_OK != freResult) {

      fprintf(stderr, "FRENewObjectFromUint32 - failed to create return value");

      return NULL;

    }

    return returnValue;

  }

}

static void addFunction(char const * const name, void * data, FREFunction func) {

  FRENamedFunction nf = { (uint8_t const * const ) name, data, func };

  named_functions.push_back(nf);

}

////////////////////////////////////////////////////////////////////////////////////////

static uint32_t VERSION = 23;

extern "C" FREObject TestAne_Test_Func(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]) {

  puts("TestAne_Test_Func");

#if defined(USE_DYLIB)

  TestAneDylibFunctions * funcs = new TestAneDylibFunctions();

  funcs->TestFunction("abcd");

  delete funcs;

#endif

  return AneHelperFuncs::getFREUint32(VERSION);

}

////////////////////////////////////////////////////////////////////////////////////////

extern "C" void testaneContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctions, const FRENamedFunction** functions) {

  puts("TestAne testaneContextInitializer");

  addFunction("TestAne_Test_Func", NULL, &TestAne_Test_Func);

  *numFunctions = (uint32_t)(named_functions.size());

  *functions = &named_functions.at(0);

}

extern "C" void testaneContextFinalizer(FREContext ctx) {

  puts("TestAne testaneContextFinalizer");

  return;

}

extern "C" void testAneInitializer(void** extData, FREContextInitializer* ctxInitializer, FREContextFinalizer* ctxFinalizer) {

  puts("testAneInitializer");

  *ctxInitializer = &testaneContextInitializer;

  *ctxFinalizer = &testaneContextFinalizer;

}

extern "C" void testAneFinalizer(void* extData) {

  puts("testAneFinalizer");

  return;

}

daisuke nakagawa
Participating Frequently
January 13, 2016

Hello,

I also, it to the Mac project that contains the ANE that worked is, after updating to AIR20, now # 3500 error.

I have the procedures in this blog as a reference, but there are some questions.

http://blogs.adobe.com/flashplayer/2015/12/air-64-bit-on-mac-osx.html

Q1:

Native extension descriptor for 64bit, the three tags (nativeLibrary, initializer, finalizer) is outside of applicationDeployment tag.

When I created the ANE file, in this description, it became in the following error.

error 103: extension.platforms.platform.nativeLibrary is an unexpected element / attribute

the contents of the blog is correct?

Q2:

In AIR20, the extension.xml, I wonder if you need to specify both the MacOS-x86-64 and MacOS-x86?

Or, what's good at MacOS-x86-64 only?

If both it is necessary, or native code to be placed in the MacOS-x86 wonder may be a build of 32bit version?

Q3:

Although it is not mentioned Blog, 64bit version of native code extensions, if you do not want to change the architecture on XCode, result in an error.

The designation of the modified architecture, or no problem at Standard Architecture (64-bit Intel) (x86_64)?

Q4:

I have tried the contents of the answers to Warty, it did not work.

You have answered "To obtain the com.adobe.extension folder unzip the .ane file.".

However, unzip my ANE file, the four files and folders (META-INF folder, category.xml, library.swf, mimetype) appears.

Previously it had been operating in this configuration, I wonder 64bit version ANE not be created correctly?

thx.

Adobe Employee
January 15, 2016

HI daisuke nakagawa,

Please find the answers to your queries :-

  1. The  3 tags the three tags (nativeLibrary, initializer, finalizer)  should be inside the applicationDeployment tag .We will be correcting the blog soon .
  2. In AIR20, the extension.xml, you need to provide platform as "MacOS-x86-64" only.
  3. Can you please let me know the value of architecture you have set in Xcode and the error you are getting .
  4. When you will unzip the .ane you will get all the mentioned files and folder.
daisuke nakagawa
Participating Frequently
January 18, 2016

Thanks for your reply, Nitanwar.

In my project, I was not specify up to AIR19 32-bit intel (i386).

In AIR20, if I have to add the adobe AIR_64 to the project, a number of link errors occur in the above configuration.

Ex) Undefined symbols for architecture i386: "_FREAcquireByteArray"

This error can be eliminated and by changing the architecture.

In other words, "Standard Architectures (64bit-intel) (x86_64)" or, "Universal (32/64-bit intel) (x86_64, i386)" or, in the build machine native "64-bit intel (x86_64)".

Please tell me the correct whether it is to set the how.

---

In my project, I have been able to ANE debugging in Flash Builder 4.7 to AIR19.

I specified extendedDesktop option in debugging environment, and -extDir option of unzipped ANE file path.

However, even in the debug run, even in the execution of installing the release build, # 3500 error occurs in the method invocation of native code.

Please tell me What is this can be solved if.

I went the following operations in the transition from AIR19 to AIR20.

In the Flash Builder 4.7:

・AIR20SDK by unzip and was overwritten flexSDK4.6.0 folder where you unzip in the same way.

・In sdk folder of Flash Builder 4.7, it was placed flexSDK folder above.

・The "Installed Flex SDK" property of Flash Builder 4.7 it was changed to the above folder.

・The properties of the "Installed AIR SDK" of Flash Builder 4.7, it switched to AIR20 SDK with compiler.

・And, I have to build the ANE interface library(swc).

In the native project on XCode7.1.1:

・Add adobe AIR_64 framework to the project.

・The architecture on XCode was build a .framework file by changing to Standard Architectures (64bit-intel) (x86_64).

・The "MacOS-x86" platform of extension.xml, it was changed to "MacOS-x86-64".

・The xmlns of extension tag of extension.xml, to change to "http://ns.adobe.com/air/extension/20.0".

・And, I have created a .ane file in adt command.

In the Flash Builder 4.7 again:

・The xmlns of app.xml of AIR application, to change to "http://ns.adobe.com/air/application/20.0".

・In replacing a .ane file and place the folder where you unzip for debugging.

・And, I have to build the AIR application.

thx.

Participating Frequently
January 12, 2016

Sorry, the forum won't let me update the previous thread... here is the full message :

Hello,

i've been developping native Extensions for Windows and Mac for several years now, and what's happening with this AIR 20 update is not acceptable. All my work for the last 3 years has just become unusable because of this update, and there has been no 32/64 bit cross compatibility version, i don't think it would be much effort to keep the 32 bit ANE working while we are updating them to support 64 bit.

That said, it would not be that dramatic if it was actually possible to build 64 bit ANE without invoking god. I just recompiled my ANEs (lots of them, and even created a new dummy one for testing on a clean setup) and none of them work anymore, as i get the famous "Extension context does not have method with name [...]"

And from what i saw online, nobody has actually made a working 64 bit ANE.

As i don't want to just write an angry letter, here's my research on the subject :

I downloaded dependency walker for osx to check if there could be dependency related issues that could break the initialization of the native code (i know this error can be caused by a missing library).

The dependency walker picks up several dependencies when opening the framework file compiled with XCode, all the dependencies seem to be there except one : libAdobeAIR32Bridge.dylib which should be located in /usr/local/lib

I looked there, as well as in /usr/lib and also in the SDK package and i can't find this file anywhere, and google doesn't know it as well.

So chris, do you have any idea about that or should i just switch to a programming language that won't destroy half of my work as a christmas present ?

Thanks and have a nice day,

Ben

Adobe Employee
January 12, 2016

HI Warty,

We are sorry for the inconvenience caused .

For Mac 64 bit issue ,Flash Builder and Flash Pro CC is giving the "Error #3500 Extension context does not have method with name xxx" when  debugging/running the air  project after linking the ANE .

This is because Flash Builder/ Pro CC is unable to locate or use the ANE .


We are aware of this issue and our Flash Pro team is working on it .


As a workaround you can follow below mentioned steps :-

  1. In the <AIR-project-name>/bin-debug folder create the following directory path :-META-INF/AIR/extensions/ and copy the directory "com.adobe.extension" in it .(To obtain the com.adobe.extension folder unzip the .ane file.The contents of this folder includes catalog.xml,library.swf and META-INF folder  )
  2. In the terminal run the command /Applications/AdobeFlashBuilder4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/bin/adl -runtime /Applications/AdobeFlashBuilder4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/runtimes/air/mac <path of app.xml>app.xml .You will be able to launch the app successfully .
  3. Also, if you proceed with the native app creation( Using Export release build/Publish option ) using Flash builder /Pro CC you will be able to successfully create the app.


Please let me know if you face any issue.

Participating Frequently
January 12, 2016

Hello,

thanks for the quick reply.

I'm actually using IntelliJ to compile and it seems that there is no such problem as the one you describe for Flash CC/Flex, but still i can't use the ANE. I will try to do a similar method for IntelliJ.

Also, when i'm exporting a .dmg, it doesn't work either.

Participating Frequently
January 12, 2016

Hello,

i've been developping native Extensions for Windows and Mac for several years now, and what's happening with this AIR 20 update is

Adobe Employee
January 12, 2016

HI Warty ,

Can you please explain your issue ?

seasonw
Participating Frequently
September 19, 2015

First of all, thanks Chris for the private SDK.

I have tested the private SDK to build mac 64bit ANE, I used “Adobe AIR.framework” in this SDK, and compiled my static library in Xcode with x86_64 only (cannot universal (x86_64, i386) because “Adobe AIR.framework” only support x86_64. It compiled successfully.

Then I tried to build ANE with adt, I have error message:-

Error: Apple App Store allows only universal applications. “libABC.a” is not a universal binary. Please change build settings in Xcode project to "Standard Architecture" to create universal library/framework.

But the problem is I cannot build static library in Xcode in universal architectures, because the "Adobe AIR.framework" only support x86_64. Anyone facing same error here, any solution? Thanks!

chris.campbell
Community Manager
Community Manager
September 19, 2015

Thanks for the heads up!  I've asked our QA team to take a look ASAP.

seasonw
Participating Frequently
September 19, 2015

Thanks Chris

Inspiring
September 18, 2015

Here all AIR for Windows and Mac with captive runtime.

Participant
September 18, 2015

‌good news! when can we do some tests with a WIN 64 bits compiler? Thanks and greetings !

z_abdulgalimov
Inspiring
March 5, 2015

I tried build SWC library with 1 class:


package {

   public class Test {

   public function Test() {

  }

  }

}

in IntelliJ IDEA 14 for OSX.

The library is not created:


Error:[FPHockeyApp]: java.net.SocketTimeoutException: Accept timed out

Error:[FPHockeyApp]: Exception in thread "main"

Error:[FPHockeyApp]: java.lang.NoClassDefFoundError: flex2/tools/VersionInfo

    at com.intellij.flex.compiler.FlexCompiler.<clinit>(FlexCompiler.java:19)

Caused by: java.lang.ClassNotFoundException: flex2.tools.VersionInfo

    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    ... 1 more

chris.campbell
Community Manager
Community Manager
March 9, 2015

@z.abdulgalimov

Could you help us understand what you're working on?  Does your project work using the standard AIR SDK?  Your initial post looked to be targeted to iOS development.  This thread is about the 64-bit developer preview for OSX, not iOS.


Thanks,

Chris

z_abdulgalimov
Inspiring
March 11, 2015

I build ANE library:

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

    <id>ru.flashpress.FPHockeyApp</id>

    <versionNumber>1</versionNumber>

    <platforms>

        <platform name="MacOS-x86-64">

            <applicationDeployment>

                <nativeLibrary>FPhaOSX.framework</nativeLibrary>

                <initializer>FPHockeyAppExtInitializerOSX</initializer>

                <finalizer>FPHockeyAppExtFinalizerOSX</finalizer>

            </applicationDeployment>

        </platform>

        <platform name="default">

            <applicationDeployment/>

        </platform>

    </platforms>

</extension>

"~/AIRSDK_18"/bin/adt \

    -package -target ane "FPHockeyApp.ane" \

    extension.xml -swc "$swcFileName" \

    -platform default library.swf \

    -platform "MacOS-x86-64" FPhaOSX.framework libCrashReporter-MacOSX-Static.a library.swf

And get an error:

Unsupported platform: '-platform MacOS-x86-64'. Must be one of [default, Android-ARM, Android-x86, iPhone-ARM, iPhone-x86, MacOS-x86, Windows-x86]

z_abdulgalimov
Inspiring
February 27, 2015

Build ANE for OSX. Error:

Unsupported platform: '-platform MacOS-x86-64'. Must be one of [default, Android-ARM, Android-x86, iPhone-ARM, iPhone-x86, MacOS-x86, Windows-x86]

z_abdulgalimov
Inspiring
February 27, 2015

Build ANE for iOS with air sdk 18:

Error: Apple App Store allows only universal applications. "libFPhaIOS.a" is not a universal binary. Please change build settings in Xcode project to "Standard Architecture" to create universal library/framework.