Hi, I'm trying to use OpenCV 4.1.0, cross-compiled for armv6l from source with Python 3. When I try to import cv2
in Python, I receieve a Segementation fault
and the Python interpreter is closed. Also, I recieve errors about Python not being able to find OpenCV .so files if I do not run ldconfig
.
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX="${ROOTFS_DIR}/usr/local" \
-D CMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake \
-D OPENCV_ENABLE_NONFREE=ON \
-D PYTHON3_INCLUDE_PATH=/usr/include/python3.7m \
-D PYTHON3_LIBRARIES=/usr/lib/arm-linux-gnueabihf/libpython3.7m.so \
-D PYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \
-D BUILD_opencv_python3=ON \
-D PYTHON3_CVPY_SUFFIX='.cpython-37m-arm-linux-gnueabihf.so' \
-D ENABLE_NEON=ON \
-D ENABLE_VFPV3=ON \
-D WITH_GTK=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_DOCS=OFF \
-D BUILD_EXAMPLES=OFF \
-D BUILD_PERF_TESTS=OFF \
-B "${CV_DIR}/build/" \
-S "${CV_DIR}"
CMake Output: https://ikl.sh/c6d6 Make Output: https://ikl.sh/oQTA Make Install Output: https://ikl.sh/QDrB
Thanks :)