Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Build/Run 32bit on Linux

Ralph Hill
  • Ralph Hill
    Ralph Hill

    I am working with AAF 1.1.  I have successfully built it and some apps around it on OS X.  Now I am trying to port to Linux.  I got things to build 32-bit.  Pretty much all the tests fail.  Is this normal?

    My fails early in the AAF loading process.  Maybe someone is familiar with this problem and can help me.

    Pretty much the first thing my app does is this


    to load the com libraries.

    In this case
    localPath = /home/rdh/trees/tools/AAFUtils/inst/fedora-gcc32-dbg/lib/libcom-api.so

    libcom-api.so:   ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped

    so things look right.

    But things die as follows

    Assertion "Unknown (assertion name not supplied by developer)" violated in routine "Unknown (routine name not supplied by developer)".
    The violation occurred at line 106 in file "ImplAAFContext.cpp".
    The condition "NULL != _plugins" was false.
    Symbolic stack trace.
    [0xf7b4c595]/home/rdh/trees/tools/AAFUtils/inst/fedora-gcc32-dbg/lib/libcom-api.so [0xf77eae1d]/lib/ld-linux.so.2
    [0xf7ff0b78]/lib/ld-linux.so.2 [0xf7ff0c76]/lib/ld-linux.so.2 [0xf7ff44c3]/lib/ld-linux.so.2 [0xf7ff07b9]/lib/ld-linux.so.2
    [0xf7ff3d0a]/lib/libdl.so.2 [0xf7faba47]/lib/ld-linux.so.2 [0xf7ff07b9]/lib/libdl.so.2 [0xf7fab400]/lib/libdl.so.2(dlopen+0x48)
    [0xf7f9ec2a]/home/rdh/trees/tools/AAFUtils/inst/fedora-gcc32-dbg/lib(main+0x3b7) [0x804b04f]/lib/libc.so.6(__libc_start_main+0xdc)
    [0xf7d49724]/home/rdh/trees/tools/AAFUtils/inst/fedora-gcc32-dbg/lib(__gxx_personality_v0+0x91) [0x804ac11]
    End of symbolic stack trace.
    terminate called after throwing an instance of 'OMAssertionViolation'

    So I dug around a bit and I see it is failing in here

    void ImplAAFContext::InitPluginManager (void) {
       if(_plugins == NULL)   {
         _plugins = (ImplAAFPluginManager *)CreateImpl(CLSID_AAFPluginManager);
         ASSERTU(NULL != _plugins);
         if (_plugins)

    CreateImpl is returning NULL.

    Inside CreateImpl I see
            IClassFactory *pFactory = NULL;
             hr = DllGetClassObject(classID, IID_IClassFactory, (void **)&pFactory);

    and hr is getting set to an error code

    drilling down a bit I find this in CAAFInProcServer::GetClassObject()

      // Use standard library's binary search routine.
       ppResult = (AAFComObjectInfo_t **)bsearch(&pKey, _ppObjectInfoKey, _objectCount,
                    sizeof(AAFComObjectInfo_t *),
                    (int (*)(const void*, const void*))CompareObjectInfo);

    _ppObjectInfoKey appears to be the thing being searched, it contains one thing, CLSID_AAFBasicInterp.  So it looks like some com initialization (loading this table with all the info on all the classes?) is not happening.

    Any ideas or suggestions?


    • Ralph,

      The plug-in DLLs (libaafpgapi.so, libaafintp.so) need to be in directory called 'aafext', which should be located in the same as libcom-api.so. Make sure that this is the case.

      Then, libcom-api.so needs to either be in the DLL search path or be loaded using relative or absolute path. But I think you're already doing that.

      The failing tests you mention, are they AAF Toolkit's unit tests? If so, which tests do pass? Also, in this case I'd try to fix those first, before moving to the application.

      The stack trace looks a bit strange. Somehow, libaafHelper.so (I assume this is your application) calls AAFLoad in a plug-in DLL (libaafintp.so).  An application is supposed to link against libaaflib.a and use AAFLoad supplied in there. But before we get too deep into that I would like to get the above questions out of the way.



    • Ralph Hill
      Ralph Hill

      Thanks Alexey for  your suggestions.

      >The plug-in DLLs (libaafpgapi.so, libaafintp.so) need to be in directory called 'aafext',
      >which should be located in the same as libcom-api.so. Make sure that this is the case.

      I added copies of these files in the directory containing libcom-api.so.  No change in result.

      > The failing tests you mention, are they AAF Toolkit's unit tests?


      > If so, which tests do pass?

      *  COM Module AAF Test Results: *

        AAFAES3PCMDescriptor          FAILED
        AAFAIFCDescriptor             FAILED
        AAFAuxiliaryDescriptor        FAILED
        AAFBWFImportDescriptor        FAILED
        AAFCDCIDescriptor             FAILED
        AAFCachePageAllocator         FAILED
        AAFClassDef                   FAILED
        AAFCodecDef                   FAILED
        AAFCommentMarker              FAILED
        AAFComponent                  FAILED
        AAFCompositionMob             FAILED
        AAFConstantValue              FAILED
        AAFContainerDef               FAILED
        AAFContentStorage             FAILED
        AAFControlPoint               FAILED
        AAFDataDef                    FAILED
        AAFDataEssenceDescriptor      FAILED
        AAFDefObject                  FAILED
        AAFDescriptiveClip            FAILED
        AAFDescriptiveFramework       FAILED
        AAFDescriptiveMarker          FAILED
        AAFDescriptiveObject          FAILED
        AAFDictionary                 FAILED
        AAFDigitalImageDescriptor     FAILED
        AAFEdgecode                   FAILED
        AAFEssenceAccess              FAILED
        AAFEssenceData                FAILED
        AAFEssenceDescriptor          FAILED
        AAFEssenceFormat              FAILED
        AAFEssenceGroup               FAILED
        AAFEvent                      FAILED
        AAFEventMobSlot               FAILED
        AAFFile                       FAILED
        AAFFileDescriptor             FAILED
        AAFFileEncoding               SUCCEEDED
        AAFFiller                     FAILED
        AAFFilmDescriptor             FAILED
        AAFFindSourceInfo             FAILED
        AAFGPITrigger                 FAILED
        AAFGetFileBits                FAILED
        AAFHeader                     FAILED
        AAFIdentification             FAILED
        AAFImportDescriptor           FAILED
        AAFInterpolationDef           FAILED
        AAFKLVData                    FAILED
        AAFKLVDataDefinition          FAILED
        AAFLocator                    FAILED
        AAFMasterMob                  FAILED
        AAFMetaDefinition             FAILED
        AAFMob                        FAILED
        AAFMobSlot                    FAILED
        AAFMPEGVideoDescriptor        FAILED
        AAFMultipleDescriptor         FAILED
        AAFNestedScope                FAILED
        AAFNetworkLocator             FAILED
        AAFObject                     FAILED
        AAFOperationDef               FAILED
        AAFOperationGroup             FAILED
        AAFPCMDescriptor              FAILED
        AAFParameter                  FAILED
        AAFParameterDef               FAILED
        AAFPhysicalDescriptor         FAILED
        AAFPlainEssenceData           NOT IMPLEMENTED
        AAFPlainStreamData            NOT IMPLEMENTED
        AAFPluginDef                  FAILED
        AAFPluginManager              FAILED
        AAFProperty                   FAILED
        AAFPropertyDef                FAILED
        AAFPropertyValue              FAILED
        AAFPulldown                   FAILED
        AAFRGBADescriptor             FAILED
        AAFRandomFile                 FAILED
        AAFRandomRawStorage           FAILED
        AAFRawStorage                 SUCCEEDED (But one or more methods not implemented in the current SDK)
        AAFRIFFChunk                  FAILED
        AAFRecordingDescriptor        FAILED
        AAFScopeReference             FAILED
        AAFSegment                    FAILED
        AAFSelector                   FAILED
        AAFSequence                   FAILED
        AAFSetFileBits                SUCCEEDED
        AAFSoundDescriptor            FAILED
        AAFSourceClip                 FAILED
        AAFSourceMob                  FAILED
        AAFSourceReference            FAILED
        AAFStaticMobSlot              FAILED
        AAFSubDescriptor              FAILED
        AAFTIFFDescriptor             FAILED
        AAFTaggedValue                FAILED
        AAFTaggedValueDefinition      FAILED
        AAFTapeDescriptor             FAILED
        AAFTextLocator                FAILED
        AAFTimecode                   FAILED
        AAFTimecodeStream             FAILED
        AAFTimecodeStream12M          FAILED
        AAFTimelineMobSlot            FAILED
        AAFTransition                 FAILED
        AAFTypeDef                    FAILED
        AAFTypeDefCharacter           FAILED
        AAFTypeDefEnum                FAILED
        AAFTypeDefExtEnum             FAILED
        AAFTypeDefFixedArray          FAILED
        AAFTypeDefIndirect            FAILED
        AAFTypeDefInt                 FAILED
        AAFTypeDefObjectRef           FAILED
        AAFTypeDefOpaque              FAILED
        AAFTypeDefRecord              FAILED
        AAFTypeDefRename              FAILED
        AAFTypeDefSet                 FAILED
        AAFTypeDefStream              FAILED WITH UNEXPECTED EXCEPTION
        AAFTypeDefString              FAILED
        AAFTypeDefStrongObjRef        FAILED
        AAFTypeDefVariableArray       FAILED
        AAFTypeDefWeakObjRef          FAILED
        AAFVaryingValue               FAILED
        AAFWAVEDescriptor             FAILED
        EnumAAFClassDefs              FAILED
        EnumAAFCodecDefs              FAILED
        EnumAAFCodecFlavours          FAILED
        EnumAAFComponents             FAILED
        EnumAAFContainerDefs          FAILED
        EnumAAFControlPoints          FAILED
        EnumAAFDataDefs               FAILED
        EnumAAFEssenceData            FAILED
        EnumAAFFileDescriptors        FAILED
        EnumAAFFileEncodings          SUCCEEDED
        EnumAAFIdentifications        FAILED
        EnumAAFInterpolationDefs      FAILED
        EnumAAFKLVData                FAILED
        EnumAAFKLVDataDefs            FAILED
        EnumAAFLoadedPlugins          FAILED
        EnumAAFLocators               FAILED
        EnumAAFMobSlots               FAILED
        EnumAAFMobs                   FAILED
        EnumAAFOperationDefs          FAILED
        EnumAAFParameterDefs          FAILED
        EnumAAFParameters             FAILED
        EnumAAFPluginDefs             FAILED
        EnumAAFPluginLocators         FAILED
        EnumAAFProperties             FAILED
        EnumAAFPropertyDefs           FAILED
        EnumAAFPropertyValues         SUCCEEDED (But one or more methods not implemented in the current SDK)
        EnumAAFRIFFChunks             FAILED
        EnumAAFSegments               FAILED
        EnumAAFSubDescriptors         FAILED
        EnumAAFTaggedValueDefs        FAILED
        EnumAAFTaggedValues           FAILED
        EnumAAFTypeDefs               FAILED

        Tests Run:        148
        Passed:           5
        Failed:           141
        Not Implemented:  2
      Wed Oct 22 11:39:51 2008

      ComModTestAAF completed in 0:0:1

      > Also, in this case I'd try to fix those first, before moving to the application.

      Any ideas where to start?  I have been ignoring these tests because the testing processes itself fails on the 4th or 5th test under OS X yet my apps runs fine.

      > The stack trace looks a bit strange. Somehow, libaafHelper.so (I assume this is your
      > application) calls AAFLoad in a plug-in DLL (libaafintp.so). An application is supposed
      > to link against libaaflib.a and use AAFLoad supplied in there.

      Argh!  I  am linking against the wrong things.  I changed the make so my app links against aaflib.a and aafiid.o.  Now it gets further.  My app reads an aaf file and writes it as xml.  It now reports that the input file is not an AAF file (error 8012001D) no matter what I give it for  input.  I wonder if this is related to the failing tests.  Most of them fail with error 0x80120140 AAFRESULT_FILEKIND_NOT_REGISTERED.

      Do you have any hints?


    • Ralph Hill
      Ralph Hill


      I dug around a bit and found that OM_STRUCTURED_STORAGE was not being defined.
      I dug some more an found that there has to be a libSSRW2C.a file in the right place for things to work.
      I dug a whole bunch more and found that the original distribution has it in what appears to me to be a build products directory.  I had not save that directory, AAFi686LinuxSDK, in my source tree, because it seems silly to save build products in the source tree.  You get a clean build without this file in place, but nothing works. 
      I added all variation on this file to my source tree and now things work better--the tests seg fault on the 3rd or 4th test and my app works.

      Wouldn't in be better to put the SSS libraries in the source tree and have a build step to copy them to the build products tree?  It sure would have saved me a lot of time (3 days or so) and would make the source tree cleaner.

      • The build framework is, to put it lightly, imperfect. If you have additional complaints, suggestions, anything else - please post it here. Any input is appreciated.

        Meanwhile, here's a few things that may be helpful. According to the build/README.txt file, you should be able to specify a "build" directory other than the default AAFxxxSDK by setting the AAFBUILDDIR variable in the make command line. Similarly, you should be able to change the "install" directory (by default, it is the same as the "build" directory) by using the AAFSDK variable.


  • lozdog

    Hi Ralph,
    I trying to install on Ubuntu 14.04.1 and I am coming across the same errors you mention above. Could I ask you a favour to detail a little more about how you rectified the errors?
    Thanks in advance