Compilation issue on Mac OSX 10.6 ?

  • David Bouchard

    David Bouchard - 2009-10-19

    Has anyone been able to compile LightBlue on Snow Leopard?  I'm fairly new to Mac OS so I could be doing something wrong.  I managed to get LightBlueAqua to compile by changing the XCode build settings so that it uses the 10.4a sdk + GCC 4.0.  The compile + install works fine, however when I try to import lightblue, I get a "Bundle could not be loaded error".  The problem seems to be traced back to LightAquaBlue not matching my architecture:

    Error loading /Library/Frameworks/LightAquaBlue.framework/LightAquaBlue:  dlopen(/Library/Frameworks/LightAquaBlue.framework/LightAquaBlue, 265): no suitable image found.  Did find:
    /Library/Frameworks/LightAquaBlue.framework/LightAquaBlue: mach-o, but wrong architecture
    /Library/Frameworks/LightAquaBlue.framework/LightAquaBlue: mach-o, but wrong architecture
    ERROR: An unexpected error occurred while tokenizing input

    I also tried to compile using GCC 4.2 and the 10.6 SDK, same thing.  Tried selecting different architectures in the build settings (Intel 64-bit, Universal 32 or 64 bit) but I get the same result every time.

    Any ideas? I would really like to use lightblue and not have to do straight-up PyObjC and BluetoothIO


  • Ray

    Ray - 2009-10-30

    I had some trouble installing the package and got around the error you have using:

        arch -i386 python2.6

    Seems like its defaulting incorrectly. I now have a problem when importing:

        File "/", line 17, in <module>
            import lightblue
          File "/Library/Python/2.5/site-packages/lightblue/", line 160, in <module>
            from _lightblue import *
          File "/Library/Python/2.5/site-packages/lightblue/", line 398, in <module>
            class _AsyncDeviceInquiry(Foundation.NSObject):
        TypeError: Error when calling the metaclass bases
            class _AsyncDeviceInquiry does not correctly implement protocol IOBluetoothDeviceInquiryDelegate: the signature for method deviceInquiryComplete:error:aborted: is v@:@iB instead of v20@0:4@8i12Z16

  • blam

    blam - 2009-11-16

    Hi rayscan,

    Can you please confirm what changes you made to the xcode project before you were able to build it successfully with "arch -i386 python2.6"?

    I'm trying to see how this can be built so I can look at the import error.

  • blam

    blam - 2009-11-30

    Looks like the simplest way to fix this was to create a brand new xcode project.

    I've added instructions to the home page at for building LightBlue on Mac OS 10.6.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks