Open jsotogaviard opened 3 years ago
I got it to compile by changing line 66 in setup.py
to
os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES ALWAYS_SEARCH_USER_PATHS=NO GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS=NO OTHER_CFLAGS='-Wno-implicit-function-declaration'")
The key here is OTHER_CFLAGS='-Wno-implicit-function-declaration'
.
But after that I got a linking error.
"_IOBluetoothLocalDeviceReadAddress", referenced from:
+[BBLocalDevice getAddressString] in BBLocalDevice.o
"_IOBluetoothLocalDeviceReadClassOfDevice", referenced from:
+[BBLocalDevice getClassOfDevice] in BBLocalDevice.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1
Apple removed the IOBluetoothLocalDeviceReadAddress
and IOBluetoothLocalDeviceReadClassOfDevice
, among others from IOBluetoothUserLib.h
since MacOS 10.8 (see API diff). I don't know what to replace those methods with. Using LightBlue may be a dead end for MacOS 11.
I have replaced the deprecated function references. The framework builds without errors and seems to be working for my use cases (PyBluez), but I don't know how to properly test it. I have opened a pull request anyway.
Can you please add the link to the PR? I'd like to modify my code in the same way @JuliusNmn
Here you go: Pull request 19
Project is not building because of those three errors:
/Users/isoto/dev/lightblue-0.4/src/mac/LightAquaBlue/BBServiceAdvertiser.m:128:20: Implicit declaration of function 'IOBluetoothAddServiceDict' is invalid in C99
/Users/isoto/dev/lightblue-0.4/src/mac/LightAquaBlue/BBServiceAdvertiser.m:142:3: Implicit declaration of function 'IOBluetoothObjectRelease' is invalid in C99
/Users/isoto/dev/lightblue-0.4/src/mac/LightAquaBlue/BBServiceAdvertiser.m:151:9: Implicit declaration of function 'IOBluetoothRemoveServiceWithRecordHandle' is invalid in C99