This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

configuring pc_ble_driver_py for use with sd api v6

Hello, I would like to use the pc_ble_driver_py with sd api v6.  I can see in the CMakeLists.txt where I can change set(SD_API_VERS "2;5")  to set(SD_API_VERS "2;6"), and it appears to do the right thing until it fails down below on line 35 with "

Undefined symbols for architecture x86_64:

  _sd_ble_gap_adv_addr_get", referenced from: _wrap_sd_ble_gap_adv_addr_get(_object*, _object*) in nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o

"

pc-ble-driver-py-master-2/$ tox
py37 installed: cmake==3.16.3,entrypoints==0.3,flake8==3.7.9,future==0.18.2,mccabe==0.6.1,ninja==1.9.0.post1,packaging==20.1,pc-ble-driver-py==0.14.0,pycodestyle==2.5.0,pyflakes==2.1.1,pyparsing==2.4.6,scikit-build==0.10.0,six==1.14.0,wrapt==1.11.2
py37 run-test-pre: PYTHONHASHSEED='2144723334'
py37 run-test: commands[0] | /Users/mcanulty/Downloads/pc-ble-driver-py-master-2/.tox/py37/bin/python setup.py bdist_wheel --build-type Release
[0/1] Re-running CMake...
-c:42: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
CMake Warning (dev) at .tox/py37/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/UseSWIG.cmake:460 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  .tox/py37/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/UseSWIG.cmake:702 (SWIG_ADD_SOURCE_TO_MODULE)
  CMakeLists.txt:81 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- LINK_LIBRARIES are not nrf::nrf_ble_driver_sd_api_v2_static;/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
CMake Warning (dev) at .tox/py37/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/UseSWIG.cmake:460 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  .tox/py37/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/UseSWIG.cmake:702 (SWIG_ADD_SOURCE_TO_MODULE)
  CMakeLists.txt:81 (swig_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- LINK_LIBRARIES are not nrf::nrf_ble_driver_sd_api_v6_static;/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mcanulty/Downloads/pc-ble-driver-py-master-2/_skbuild/macosx-10.15-x86_64-3.7/cmake-build
[1/2] Linking CXX shared library _nrf_ble_driver_sd_api_v6.so
FAILED: _nrf_ble_driver_sd_api_v6.so 
: && /Applications/Xcode_10.1/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode_10.1/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -dynamiclib -Wl,-headerpad_max_install_names  -o _nrf_ble_driver_sd_api_v6.so -install_name @rpath/_nrf_ble_driver_sd_api_v6.so CMakeFiles/nrf_ble_driver_sd_api_v6.dir/outdir/nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o  /usr/local/bin/vcpkg-root/installed/x64-osx/lib/libnrf-ble-driver-sd_api_v6.a  /Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib  -framework CoreFoundation  -framework IOKit && :
Undefined symbols for architecture x86_64:
  "_sd_ble_gap_adv_addr_get", referenced from:
      _wrap_sd_ble_gap_adv_addr_get(_object*, _object*) in nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o
  "_sd_ble_gap_qos_channel_survey_start", referenced from:
      _wrap_sd_ble_gap_qos_channel_survey_start(_object*, _object*) in nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o
  "_sd_ble_gap_qos_channel_survey_stop", referenced from:
      _wrap_sd_ble_gap_qos_channel_survey_stop(_object*, _object*) in nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o
  "_sd_ble_uuid_vs_remove", referenced from:
      _wrap_sd_ble_uuid_vs_remove(_object*, _object*) in nrf_ble_driver_sd_api_v6PYTHON_wrap.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/Users/mcanulty/Downloads/pc-ble-driver-py-master-2/.tox/py37/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 577, in setup
    cmkr.make(make_args, env=env)
  File "/Users/mcanulty/Downloads/pc-ble-driver-py-master-2/.tox/py37/lib/python3.7/site-packages/skbuild/cmaker.py", line 482, in make
    os.path.abspath(CMAKE_BUILD_DIR())))

An error occurred while building with CMake.
  Command:
    "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
  Source directory:
    /Users/mcanulty/Downloads/pc-ble-driver-py-master-2
  Working directory:
    /Users/mcanulty/Downloads/pc-ble-driver-py-master-2/_skbuild/macosx-10.15-x86_64-3.7/cmake-build
Please see CMake's output for more information.
ERROR: InvocationError for command /Users/mcanulty/Downloads/pc-ble-driver-py-master-2/.tox/py37/bin/python setup.py bdist_wheel --build-type Release (exited with code 1)
________________________________________________ summary _________________________________________________
ERROR:   py37: commands failed

Is there some other editing I'll need to do to bring the python library up to date with v6?  Any suggestions would be appreciated.  

Parents Reply Children
Related