question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] <opencv>/<4.5.3>: cross compile for arm, build break with docker

See original GitHub issue

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: opencv/4.5.3
  • Operating System+version: macOS 12.1
  • Compiler+version: gcc 7
  • Docker image: conanio/gcc7-armv7
  • Conan version: conan 1.44.1
  • Python version: Python 3.7.5

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=armv7
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

  1. in project root folder, create following conanfile.txt
[requires]
opencv/4.5.3

[generators]
cmake

[options]
opencv:with_ffmpeg=False
opencv:dnn=False

Logs (Include/Attach if Applicable)

Click to expand log
conan@5f2ef354301e:~/project/build$ conan install .. --build=missing
Configuration:
[settings]
arch=armv7
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

WARN: libtiff/4.3.0: requirement libwebp/1.2.2 overridden by opencv/4.5.3 to libwebp/1.2.1
libtiff/4.3.0: WARN: Package binary is corrupted, removing: 5ca92098cd45af853421c20dbb0e61cea652152d
conanfile.txt: Installing package
Requirements
    ade/0.1.1f from 'conancenter' - Cache
    eigen/3.3.9 from 'conancenter' - Cache
    gtk/system from 'conancenter' - Cache
    jasper/2.0.33 from 'conancenter' - Cache
    jbig/20160605 from 'conancenter' - Cache
    libdeflate/1.9 from 'conancenter' - Cache
    libjpeg/9d from 'conancenter' - Cache
    libpng/1.6.37 from 'conancenter' - Cache
    libtiff/4.3.0 from 'conancenter' - Cache
    libwebp/1.2.1 from 'conancenter' - Cache
    opencv/4.5.3 from 'conancenter' - Cache
    openexr/2.5.7 from 'conancenter' - Cache
    quirc/1.1 from 'conancenter' - Cache
    xz_utils/5.2.5 from 'conancenter' - Cache
    zlib/1.2.11 from 'conancenter' - Cache
    zstd/1.5.2 from 'conancenter' - Cache
Packages
    ade/0.1.1f:0b9da21d52bd90e64a7c7c66777230d5767d297c - Cache
    eigen/3.3.9:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    gtk/system:cc5e5ca8b619d2dffaaeae1e4924ae3ce085a8f1 - Cache
    jasper/2.0.33:3c15e011e1256608a208818bb403dd13a740db29 - Cache
    jbig/20160605:99c019715e3b6f4e40e125add30e7d474d0f55fe - Cache
    libdeflate/1.9:15eab756bd1cec551ba6321ea0f516c3af2dc7f2 - Cache
    libjpeg/9d:15eab756bd1cec551ba6321ea0f516c3af2dc7f2 - Cache
    libpng/1.6.37:f40b1d339af2b43b1483874b83cbf96baddaea9c - Cache
    libtiff/4.3.0:5ca92098cd45af853421c20dbb0e61cea652152d - Build
    libwebp/1.2.1:959c9afe4579376fb30bc333ca59d3666423daff - Cache
    opencv/4.5.3:2a1cfaaf625587becb67674324c0e3f19ccccaa3 - Build
    openexr/2.5.7:1fe3a8818dcb37d67a3043841c95b194167e3825 - Build
    quirc/1.1:c2ec51df91c8a415e244646e1c77820bef2abfaf - Cache
    xz_utils/5.2.5:15eab756bd1cec551ba6321ea0f516c3af2dc7f2 - Cache
    zlib/1.2.11:15eab756bd1cec551ba6321ea0f516c3af2dc7f2 - Cache
    zstd/1.5.2:15eab756bd1cec551ba6321ea0f516c3af2dc7f2 - Cache

Cross-build from 'Linux:x86_64' to 'Linux:armv7'
Installing (downloading, building) binaries...
ade/0.1.1f: Already installed!
eigen/3.3.9: Already installed!
gtk/system: Already installed!
jbig/20160605: Already installed!
jbig/20160605: Appending PATH environment variable: /home/conan/.conan/data/jbig/20160605/_/_/package/99c019715e3b6f4e40e125add30e7d474d0f55fe/bin
libdeflate/1.9: Already installed!
libjpeg/9d: Already installed!
libwebp/1.2.1: Already installed!
quirc/1.1: Already installed!
xz_utils/5.2.5: Already installed!
zlib/1.2.11: Already installed!
zstd/1.5.2: Already installed!
jasper/2.0.33: Already installed!
libpng/1.6.37: Already installed!
libtiff/4.3.0: WARN: Build folder is dirty, removing it: /home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d
libtiff/4.3.0: Copying sources to build folder
libtiff/4.3.0: Building your package in /home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d
libtiff/4.3.0: Generator cmake_find_package created FindZLIB.cmake
libtiff/4.3.0: Generator cmake_find_package created Findlibdeflate.cmake
libtiff/4.3.0: Generator cmake_find_package created FindLibLZMA.cmake
libtiff/4.3.0: Generator cmake_find_package created FindJPEG.cmake
libtiff/4.3.0: Generator cmake_find_package created Findjbig.cmake
libtiff/4.3.0: Generator cmake_find_package created Findzstd.cmake
libtiff/4.3.0: Generator cmake_find_package created FindWebP.cmake
libtiff/4.3.0: Generator cmake created conanbuildinfo.cmake
libtiff/4.3.0: Aggregating env generators
libtiff/4.3.0: Calling build()
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-linux-gnueabi-gcc-7 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabi-g++-7 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting language standard
-- Conan: Adjusting fPIC flag (ON)
-- Conan: Compiler GCC>=5, checking major version 7
-- Conan: Checking correct version: 7
-- Conan: C++ stdlib: libstdc++
-- Building tiff version 4.3.0
-- libtiff library version 5.7.0
-- libtiff build date: 20220131
-- Performing Test C_FLAG_Wall
-- Performing Test C_FLAG_Wall - Success
-- Performing Test C_FLAG_Winline
-- Performing Test C_FLAG_Winline - Success
-- Performing Test C_FLAG_Wformat_security
-- Performing Test C_FLAG_Wformat_security - Success
-- Performing Test C_FLAG_Wpointer_arith
-- Performing Test C_FLAG_Wpointer_arith - Success
-- Performing Test C_FLAG_Wdisabled_optimization
-- Performing Test C_FLAG_Wdisabled_optimization - Success
-- Performing Test C_FLAG_Wno_unknown_pragmas
-- Performing Test C_FLAG_Wno_unknown_pragmas - Success
-- Performing Test C_FLAG_fstrict_aliasing
-- Performing Test C_FLAG_fstrict_aliasing - Success
-- Performing Test HAVE_LD_VERSION_SCRIPT
-- Performing Test HAVE_LD_VERSION_SCRIPT - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for getopt
-- Looking for getopt - found
-- Looking for optarg
-- Looking for optarg - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for setmode
-- Looking for setmode - not found
-- Check size of size_t
-- Check size of size_t - done
-- Conan: Using autogenerated FindZLIB.cmake
-- Found ZLIB: 1.2.11 (found version "1.2.11")
-- Library z found /home/conan/.conan/data/zlib/1.2.11/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libz.a
-- Found: /home/conan/.conan/data/zlib/1.2.11/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libz.a
-- Found Deflate: /home/conan/.conan/data/libdeflate/1.9/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libdeflate.a
-- Conan: Using autogenerated FindJPEG.cmake
-- Found JPEG: 9d (found version "9d")
-- Library jpeg found /home/conan/.conan/data/libjpeg/9d/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libjpeg.a
-- Found: /home/conan/.conan/data/libjpeg/9d/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libjpeg.a
-- Conan: Using autogenerated Findjbig.cmake
-- Found jbig: 20160605 (found version "20160605")
-- Library jbig found /home/conan/.conan/data/jbig/20160605/_/_/package/99c019715e3b6f4e40e125add30e7d474d0f55fe/lib/libjbig.a
-- Found: /home/conan/.conan/data/jbig/20160605/_/_/package/99c019715e3b6f4e40e125add30e7d474d0f55fe/lib/libjbig.a
-- Found JBIG: /home/conan/.conan/data/jbig/20160605/_/_/package/99c019715e3b6f4e40e125add30e7d474d0f55fe/lib/libjbig.a (found version "1.6")
-- Looking for jbg_newlen
-- Looking for jbg_newlen - found
-- Could NOT find LERC (missing: LERC_LIBRARY LERC_INCLUDE_DIR)
-- Conan: Using autogenerated FindLibLZMA.cmake
-- Found LibLZMA: 5.2.5 (found version "5.2.5")
-- Library lzma found /home/conan/.conan/data/xz_utils/5.2.5/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/liblzma.a
-- Found: /home/conan/.conan/data/xz_utils/5.2.5/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/liblzma.a
-- Conan: Using autogenerated Findzstd.cmake
-- Found zstd: 1.5.2 (found version "1.5.2")
-- Library zstd found /home/conan/.conan/data/zstd/1.5.2/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libzstd.a
-- Found: /home/conan/.conan/data/zstd/1.5.2/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libzstd.a
-- Library zstd found /home/conan/.conan/data/zstd/1.5.2/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libzstd.a
-- Found: /home/conan/.conan/data/zstd/1.5.2/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libzstd.a
-- Found ZSTD: /home/conan/.conan/data/zstd/1.5.2/_/_/package/15eab756bd1cec551ba6321ea0f516c3af2dc7f2/lib/libzstd.a (found version "1.5.2")
-- Looking for ZSTD_decompressStream
-- Looking for ZSTD_decompressStream - found
-- Conan: Using autogenerated FindWebP.cmake
-- Found WebP: 1.2.1 (found version "1.2.1")
-- Library webpdecoder found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdecoder.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdecoder.a
-- Library webpdemux found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdemux.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdemux.a
-- Library webpmux found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpmux.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpmux.a
-- Library webp found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebp.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebp.a
-- Library webp found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebp.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebp.a
-- Library webpmux found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpmux.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpmux.a
-- Library webpdemux found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdemux.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdemux.a
-- Library webpdecoder found /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdecoder.a
-- Found: /home/conan/.conan/data/libwebp/1.2.1/_/_/package/959c9afe4579376fb30bc333ca59d3666423daff/lib/libwebpdecoder.a
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_INCLUDE_DIR OpenGL)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- Looking for GL/gl.h
-- Looking for GL/gl.h - not found
-- Looking for GL/glu.h
-- Looking for GL/glu.h - not found
-- Looking for GL/glut.h
-- Looking for GL/glut.h - not found
-- Looking for GLUT/glut.h
-- Looking for GLUT/glut.h - not found
-- Looking for OpenGL/gl.h
-- Looking for OpenGL/gl.h - not found
-- Looking for OpenGL/glu.h
-- Looking for OpenGL/glu.h - not found
-- Looking for pow
-- Looking for pow - not found
-- Looking for pow
-- Looking for pow - not found
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find CMath (missing: CMath_pow)
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  source_subfolder/cmake/FindCMath.cmake:51 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  source_subfolder/CMakeLists.txt:131 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d/build_subfolder/CMakeFiles/CMakeOutput.log".
See also "/home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d/build_subfolder/CMakeFiles/CMakeError.log".
libtiff/4.3.0:
libtiff/4.3.0: ERROR: Package '5ca92098cd45af853421c20dbb0e61cea652152d' build failed
libtiff/4.3.0: WARN: Build folder /home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d
ERROR: libtiff/4.3.0: Error in build() method, line 183
	cmake = self._configure_cmake()
while calling '_configure_cmake', line 178
	self._cmake.configure(build_folder=self._build_subfolder)
	ConanException: Error 1 while executing cd '/home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d/build_subfolder' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_SYSTEM_NAME="Linux" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="7" -DCONAN_LIBCXX="libstdc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/conan/.conan/data/libtiff/4.3.0/_/_/package/5ca92098cd45af853421c20dbb0e61cea652152d" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Dlzma="True" -Djpeg="True" -Djbig="True" -Dzlib="True" -Dlibdeflate="True" -Dzstd="True" -Dwebp="True" -Dcxx="True" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" -Wno-dev '/home/conan/.conan/data/libtiff/4.3.0/_/_/build/5ca92098cd45af853421c20dbb0e61cea652152d'

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SpaceImcommented, Jan 31, 2022

It’s not an error in opencv but libtiff, during CMake configuration. Basically it can’t find pow neither in libc or libm, so I guess there is something wrong in this docker image or in your setup. Moreover, cross-build should be done with 2 profiles, but I don’t think it comes from this.

0reactions
uilianriescommented, Sep 29, 2022

@unfor19, please, open a new issue reporting your case and adding a link to this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to cross compile a rust project with opencv package ...
Installing a precompiled opencv package in the docker container does not work (still don't know why), but cross compiling the correct opencv ......
Read more >
Docker buildkit opencv compilation - General Discussions
I have a Dockerfile which compiles opencv for quite a while. Recently I decided to try out buildkit (for cross compilation).
Read more >
Using Docker to Cross-Compile
Getting Docker; Download the ev3dev cross-compiler image; Hello World! ... You can always revert back to this image after making changes without having...
Read more >
Statically Cross compile OpenCV with CUDA
Steps Taken · I have built a docker image using a base image of FROM nvidia/cuda:10.2-devel-ubuntu1804 . · I have followed this example...
Read more >
Cross-Compiling the Dependencies - Pieter's Pages
Using the cross-compilation toolchain to build the libraries you need ... docker-arm-cross-build-scripts/build.sh without arguments to see ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found