Can't install metawear, warble on Raspberry Pi 4B
Hello,
Hoping to move over to developing, in python, on the new Raspberry Pi 4B boards. I have the latest Ubuntu installed. Unfortunately, i don't appear to be able to install metawear or warble:
g++: error: unrecognized command line option ‘-marm’
Full output below, any ideas?
ubuntu@ubuntu:~$ pip3 install metawear
Collecting metawear
Using cached https://files.pythonhosted.org/packages/f0/f2/804d95c4adffb09cafc2bd388b1c5e92c1936a20cdd486d348f5024d3ac0/metawear-0.7.0.tar.gz
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from metawear) (2.21.0)
Collecting warble<2.0,>=1.1 (from metawear)
Using cached https://files.pythonhosted.org/packages/5e/ac/56e3b66c494c367de6ac2a78524e67dc536b16352350e35565955a799464/warble-1.2.0.tar.gz
Building wheels for collected packages: metawear, warble
Running setup.py bdist_wheel for metawear ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-jbd21laq/metawear/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-9m285h23 --python-tag cp37:
running bdist_wheel
running build
running build_py
make: Entering directory '/tmp/pip-install-jbd21laq/metawear/MetaWear-SDK-Cpp'
mkdir -p build/arm/release/src/metawear/platform/cpp
mkdir -p build/arm/release/src/metawear/core/cpp
mkdir -p build/arm/release/src/metawear/peripheral/cpp
mkdir -p build/arm/release/src/metawear/processor/cpp
mkdir -p build/arm/release/src/metawear/sensor/cpp
mkdir -p build/arm/release/src/metawear/impl/cpp
mkdir -p build/arm/release/src/metawear/dfu/cpp
mkdir -p dist/release/lib/arm
g++ -MMD -MP -MF "build/arm/release/src/metawear/platform/cpp/memory.d" -c -o build/arm/release/src/metawear/platform/cpp/memory.o -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Isrc -DMETAWEAR_DLL -DMETAWEAR_DLL_EXPORTS -Wno-strict-aliasing -O3 -marm src/metawear/platform/cpp/memory.cpp
g++ -MMD -MP -MF "build/arm/release/src/metawear/platform/cpp/threadpool.d" -c -o build/arm/release/src/metawear/platform/cpp/threadpool.o -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Isrc -DMETAWEAR_DLL -DMETAWEAR_DLL_EXPORTS -Wno-strict-aliasing -O3 -marm src/metawear/platform/cpp/threadpool.cpp
g++ -MMD -MP -MF "build/arm/release/src/metawear/platform/cpp/task.d" -c -o build/arm/release/src/metawear/platform/cpp/task.o -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Isrc -DMETAWEAR_DLL -DMETAWEAR_DLL_EXPORTS -Wno-strict-aliasing -O3 -marm src/metawear/platform/cpp/task.cpp
g++ -MMD -MP -MF "build/arm/release/src/metawear/platform/cpp/async_creator.d" -c -o build/arm/release/src/metawear/platform/cpp/async_creator.o -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Isrc -DMETAWEAR_DLL -DMETAWEAR_DLL_EXPORTS -Wno-strict-aliasing -O3 -marm src/metawear/platform/cpp/async_creator.cpp
g++: error: unrecognized command line option ‘-marm’
make: *** [Makefile:69: build/arm/release/src/metawear/platform/cpp/memory.o] Error 1
make: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option ‘-marm’
g++: error: unrecognized command line option ‘-marm’
make: *** [Makefile:69: build/arm/release/src/metawear/platform/cpp/task.o] Error 1
make: *** [Makefile:69: build/arm/release/src/metawear/platform/cpp/threadpool.o] Error 1
g++: error: unrecognized command line option ‘-marm’
make: *** [Makefile:69: build/arm/release/src/metawear/platform/cpp/async_creator.o] Error 1
make: Leaving directory '/tmp/pip-install-jbd21laq/metawear/MetaWear-SDK-Cpp'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-jbd21laq/metawear/setup.py", line 93, in
'Programming Language :: Python :: 3',
File "/usr/lib/python3/dist-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-jbd21laq/metawear/setup.py", line 56, in run
raise RuntimeError("Failed to compile C++ SDK")
RuntimeError: Failed to compile C++ SDK
`ubuntu@ubuntu:/$ clang++ --version
clang version 9.0.0-2 (tags/RELEASE_900/final)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
ubuntu@ubuntu:/$ g++ --version
g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ubuntu@ubuntu:/$ make --version
GNU Make 4.2.1
Built for aarch64-unknown-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ubuntu@ubuntu:/$ python3 --version
Python 3.7.5
ubuntu@ubuntu:/$
`
Help appreciated!
Comments
full log:
https://pastebin.com/e59HRP7y
Does it work for Python2.7?
Laura, i haven't the time to test it right now. I guess the tooling to compile on ARM devices isn't quite setup right. I haven't much experience in this area. I have now moved over to the official raspbian release, which is working.
For those trying to develop on Pi 4B & using Python3.7, this compiles warble and metawear without hiccup. There is, however, a problem with installing pygattlib. This can be fixed by manually downloading the pygattlib module, and editing the setup.py file as per https://github.com/pybluez/pygattlib/issues/8
Thanks
Thanks for the update.