buildroot opencv3 python package builds for the wrong target?

Question:

I am using buildroot tagged 2017.11.2 (building for aarch64). I enable build of python3 library for opencv3 in the buildroot configuration:

BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_OPENCV3=y
BR2_PACKAGE_OPENCV3_LIB_PYTHON=y

I can see during the build that cmake says:

--     Host:                        Linux 4.13.0-36-generic x86_64
--     Target:                      Linux aarch64
--     C++ Compiler:                /home/buildroot/output/host/bin/aarch64-linux-gnu-g++  (ver 6.4.1)

But later I see

[100%] Linking CXX shared module ../../lib/python3/cv2.cpython-36m-x86_64-linux-gnu.so
[100%] Built target opencv_python3

I would expect cv2.cpython-36m-x86_64-linux-gnu.so to be named cv2.cpython-36m-aarch64-linux-gnu.so. What can I do to fix this?

Asked By: Alexander Shyrokov

||

Answers:

It looks like the required distutils environment variables are not set. Can you try setting OPENCV3_CONF_ENV to $(PKG_PYTHON_DISTUTILS_ENV)? If that works, please prepare a patch and send it to the Buildroot mailing list.

Answered By: Arnout