compiling OpenCV 4.1.1 on ARM64

asked 2020-02-16 07:34:31 -0600

lobsterman gravatar image

updated 2020-02-21 05:39:23 -0600

hi all, i am hoping someone might be able to get me past this hurdle...

i am using a libreboard renegade (Rockchip RK3288) running lubuntu. i have installed opencv 3.2.2 from the repository with apt-get but i need the newer version of 4.1.1. i have most dependencies, i think, so i compile from source with

cmake -DBUILD_SHARED_LIBS=OFF ..
make -j4

it runs through much of the building until it runs into this error. my version of libgtk-3-dev is reported to be at the newest version available in the repositories

/usr/lib/aarch64-linux-gnu/libgtk-3.so: undefined reference to `g_log_structured_standard' collect2: error: ld returned 1 exit status modules/core/CMakeFiles/opencv_test_core.dir/build.make:1006: recipe for target 'bin/opencv_test_core' failed make[2]: * [bin/opencv_test_core] Error 1 CMakeFiles/Makefile2:1460: recipe for target 'modules/core/CMakeFiles/opencv_test_core.dir/all' failed make[1]: [modules/core/CMakeFiles/opencv_test_core.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: ** [all] Error 2

looks like others have encountered this as well but i could not find a solution. any advice?

edit retag flag offensive close merge delete

Comments

Where did you get this make --j 4? This should be make -j4. Kindly, update OpenCV 4.2.0

supra56 gravatar imagesupra56 ( 2020-02-16 08:07:11 -0600 )edit

thanks supra56, but "make -j4" and using OpenCV 4.2.0 gives the same result ... /usr/lib/aarch64-linux-gnu/libgtk-3.so: undefined reference to `g_log_structured_standard' collect2: error: ld returned 1 exit status modules/core/CMakeFiles/opencv_test_core.dir/build.make:1006: recipe for target 'bin/opencv_test_core' failed make[2]: * [bin/opencv_test_core] Error 1 CMakeFiles/Makefile2:1460: recipe for target 'modules/core/CMakeFiles/opencv_test_core.dir/all' failed make[1]: [modules/core/CMakeFiles/opencv_test_core.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: ** [all] Error 2

lobsterman gravatar imagelobsterman ( 2020-02-17 11:38:06 -0600 )edit

seeing that it is a problem with opencv_test_core.dir i turned off

-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_python3=OFF -DINSTALL_TESTS=OFF

it now gets further and only after built target opencv_stitching it reports ... Makefile:162: recipe for target 'all' failed make: ** [all] Error 2

lobsterman gravatar imagelobsterman ( 2020-02-17 12:04:00 -0600 )edit

continuing to run into the same error. still getting undefined reference to `g_log_structured_standard', now in opencv_annotation. can i turn this one off at cmake like i turned off the tests? do i need the annotations? ... or can i define the g_log_structured_standard somewhere? any advise greatly appreciated

lobsterman gravatar imagelobsterman ( 2020-02-18 10:35:58 -0600 )edit

sudo apt install ibgtk-3-dev

supra56 gravatar imagesupra56 ( 2020-02-19 04:06:25 -0600 )edit

i assume that is meant libgtk-3-dev. as i mentioned above i have libgte-3-dev at the newest level from repository (3.22.30-lubuntu4). still without even a guess at a solution

lobsterman gravatar imagelobsterman ( 2020-02-19 10:58:30 -0600 )edit

Are you using Raspbian Buster?

supra56 gravatar imagesupra56 ( 2020-02-21 09:03:06 -0600 )edit

No, using libreboard renegade (Rockchip RK3328) running lubuntu 18.04. The processor is a quad-core A53x4 64-bit processor, with 4GB DDR4 RAM - NOT a raspberry pi

lobsterman gravatar imagelobsterman ( 2020-02-26 09:59:10 -0600 )edit

still hoping someone might point me to an understanding of g_log_structured_standard and similar. compile fails with a number of references to such structures being undefined.

lobsterman gravatar imagelobsterman ( 2020-02-26 10:01:02 -0600 )edit