Issue installing metawear on Jetson NX (aarch64)

Hi,
I was trying to install metawear on Jetson NX (ARM64 architecture) from pip install metawear (default to be python 3) and it results in the following errors and I was wondering if anyone has similar experience and/or can direct me to possible solutions. I saw there is a similar post and it didn't seem to have a solution. Due to limit in characters, I have only posted partial error log. Please see attached file for full error log. Thanks in advance!

user@computer:~$ pip install metawear
Defaulting to user installation because normal site-packages is not writeable
Collecting metawear
Downloading metawear-1.0.2.tar.gz (1.0 MB)
|████████████████████████████████| 1.0 MB 766 kB/s
Requirement already satisfied: warble<2.0,>=1.1 in ./.local/lib/python3.6/site-packages (from metawear) (1.2.6)
Requirement already satisfied: requests in ./.local/lib/python3.6/site-packages (from metawear) (2.25.1)
Requirement already satisfied: idna<3,>=2.5 in ./.local/lib/python3.6/site-packages (from requests->metawear) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests->metawear) (2020.12.5)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests->metawear) (1.26.3)
Requirement already satisfied: chardet<5,>=3.0.2 in ./.local/lib/python3.6/site-packages (from requests->metawear) (4.0.0)
Building wheels for collected packages: metawear
Building wheel for metawear (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/setup.py'"'"'; file='"'"'/tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/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-0n1hkhfb
cwd: /tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/
Complete output (65 lines):
running bdist_wheel
running build
running build_py
make: Entering directory '/tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/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/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/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/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++ -MMD -MP -MF "build/arm/release/src/metawear/core/cpp/anonymous_datasignal.d" -c -o build/arm/release/src/metawear/core/cpp/anonymous_datasignal.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/core/cpp/anonymous_datasignal.cpp
g++ -MMD -MP -MF "build/arm/release/src/metawear/core/cpp/debug.d" -c -o build/arm/release/src/metawear/core/cpp/debug.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/core/cpp/debug.cpp
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
Makefile:76: recipe for target 'build/arm/release/src/metawear/platform/cpp/async_creator.o' failed
make: *** [build/arm/release/src/metawear/platform/cpp/async_creator.o] Error 1
make: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
Makefile:76: recipe for target 'build/arm/release/src/metawear/core/cpp/anonymous_datasignal.o' failed
make: *** [build/arm/release/src/metawear/core/cpp/anonymous_datasignal.o] Error 1
Makefile:76: recipe for target 'build/arm/release/src/metawear/platform/cpp/task.o' failed
make: *** [build/arm/release/src/metawear/platform/cpp/task.o] Error 1
Makefile:76: recipe for target 'build/arm/release/src/metawear/platform/cpp/memory.o' failed
make: *** [build/arm/release/src/metawear/platform/cpp/memory.o] Error 1
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
Makefile:76: recipe for target 'build/arm/release/src/metawear/platform/cpp/threadpool.o' failed
make: *** [build/arm/release/src/metawear/platform/cpp/threadpool.o] Error 1
g++: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
Makefile:76: recipe for target 'build/arm/release/src/metawear/core/cpp/debug.o' failed
make: *** [build/arm/release/src/metawear/core/cpp/debug.o] Error 1
make: Leaving directory '/tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/MetaWear-SDK-Cpp'
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/setup.py", line 82, in
'Programming Language :: Python :: 3',
File "/usr/local/lib/python3.6/dist-packages/setuptools/init.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()

Comments

  • edited April 14

    Looks like -marm works for arm but not arm64.

    Unfortunately we don't support arm64 right now. I can look into this in the next CPP release if you file an issue in our Github CPP SDL repo and add support to cross compile.

    You can try to mess around with the MakeFile for the CPP lib to see if any g++ compile flag changes make any differences if you want.

    Based on your output it would be here: /tmp/pip-install-_s8p_fq1/metawear_ed7f9f10f33e4be48c0db120d1462cd4/MetaWear-SDK-Cpp/Makefile -> I would start by removing -marm

  • edited April 14

    Looks like you can add a flag for this, check out: https://github.com/therecipe/qt/issues/328

    Let me know if you are able to add the CXX flag, remove -marm and compile.

  • I was able to compile successfully after removing -marm from Makefile. Thanks for the help!

Sign In or Register to comment.