pyarmor
pyarmor copied to clipboard
[Query] OpenCV error on running obfuscated script on RaspPi 3B
Hi,
I have a library which I am trying to obfuscate on the RaspPi 3B. Here are the commands being run to obfuscate:
pyarmor obfuscate --exact __init__.py --plugin ~/.pyarmor/plugins/check_ntp_time
pyarmor obfuscate --restrict 4 --recursive --exclude __init__.py . --with-license licenses/rcode-001/license.lic
The obfuscation happens sucessfully. However, the following exception occurs while using a certain function of the library.
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from abc import xyz
******************************************************************
* FATAL ERROR: *
* This OpenCV build doesn't support current CPU/HW configuration *
* *
* Use OPENCV_DUMP_CONFIG=1 environment variable for details *
******************************************************************
Required baseline features:
NEON - NOT AVAILABLE
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.1.0) /home/pi/opencv-python/opencv/modules/core/src/system.cpp:538: error: (-215:Assertion failed) Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup. in function 'initialize'
Aborted
However, if I run the library without obfuscation it runs perfectly fine. Please let me know what I am missing.
Thanks
This is a known issue for some armv7 platforms, I have not found how to fix it. One solution is to specify basic feature library when obfuscating the scripts, for example,
pyarmor obfuscate --platform linux.armv7.0 foo.py