Open antonvh opened 11 years ago
I have the same problem here.
You can try to set a variable NATIVE_ARCH_ACTUAL a value corresponding to your kernel version. Or manually change this line in setup.py
Try to replace in the setup.py (inside the lightblue-0.4/ directory) the following line
os.system("xcodebuild install -arch '$(NATIVE_ARCH_ACTUAL)' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
by this one
os.system("xcodebuild install -arch 'i386' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
This works for me
@BugAndNewsReporter
tried your suggestion it builds but raises wrong architecture - when i later one try:
$ bin/python lightblue-0.4-src/examples/simple_client.py
2014-01-16 09:13:23.558 python[40866:507] 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
Traceback (most recent call last):
File "lightblue-0.4-src/examples/simple_client.py", line 4, in <module>
import lightblue
File "<path_to_virtual_env_based_python_project>/project/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module>
from _lightblue import *
File "<path_to_virtual_env_based_python_project>/project/lib/python2.7/site-packages/lightblue/_lightblue.py", line 28, in <module>
import _LightAquaBlue
File "<path_to_virtual_env_based_python_project>/project/lib/python2.7/site-packages/lightblue/_LightAquaBlue.py", line 39, in <module>
globals=globals())
File "<path_to_virtual_env_based_python_project>/project/lib/python2.7/site-packages/PyObjC/objc/_bridgesupport.py", line 736, in initFrameworkWrapper
bundle_path=frameworkPath)
ImportError: Bundle could not be loaded
the suggestion given by @BugAndNewsReporter worked for me. thanks
os.system("xcodebuild install -arch 'i386' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
Above is for 32 bit architectures and hence results in "ImportError: Bundle could not be loaded" on 64 bit machines.
For 64 bit machines use: os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
Worked!, Thank you!
@madhurbhargav 's suggestion worked for me (64 bit processor, running Mavericks). Thanks!
@madhurbhargava suggestion worked for me as well. Thanks!
@BugAndNewsReporter Thanks to you too!
@madhurbhargava Thank you, works on:
lightblue-0.4 (master)$ python --version
Python 2.7.6
lightblue-0.4 (master)$ which python
/usr/bin/python
lightblue-0.4 (master)$ uname -a
Darwin x 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
The installer exits with a failure on my mac:
Check dependencies No architectures to compile for (ARCHS=$(NATIVE_ARCH_ACTUAL), VALID_ARCHS=i386 x86_64).
\ INSTALL FAILED **
It happens both within and outside a virtualenv
What to do? Any ideas? I'm on MacOS X 10.8.4 with Xcode and command line developer tools installed. 2.4ghz intel core 2 duo.