You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fletch OpenCV3 patch (1a97ac3) with its if() section containing "FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2)" apparently presumes that FFmpeg will have been built incorporating bz2 support, when that support is only conditionally compiled (subject to CONFIG_BZLIB in matroskadec.c), and FFmpeg may configure/build without a requirement of bz2 support.
On systems that may have only versioned instances of the bz2 shared library locatable (no locatable unversioned library or unversioned symlink present), a build failure may occur with cmake not finding the correct bz2 library via FIND_LIBRARY() and thus executing the FIND_FILE() which, in my 64bit targeted build, finds and refs the 32bit version of the library (curiously, twice, in the opencv_videoio link.txt). The OpenCV ld therefore fails, finding the (actually unnecessary) 32bit library to be in the wrong format (for the 64bit targeted build) and failing to complete.
Either of, A) removing the incorrect 32bit ref's from the link.txt, or, B) changing them to reference the correct available 64bit versioned instances of the library, allows the link to complete successfully.
I replied to your comment there, but am also reproducing here further below for continuity within this issue.
I suspect the safest (simplest?) solution might be for fletch to obtain and build libbz2 for local use also, since it's already obtaining and building many packages. (FFmpeg, OpenCV, and boost 1.55 bzip2 functionality could all then reference the local copy.)
reproduced from patch (1a97ac3)
1)IIUC, FFmpeg may have been built by fletch rather than installed by a package manager.
2)FFmpeg is only optionally dependent on bz2 (CONFIG_BZLIB), and will configure and build without it (and it did so in my environment.)
3)Should fletch perhaps obtain and build a version of bz2 (perhaps static library version?) for FFmpeg use? And then use it for OpenCV here as well? (Might be useful for building boost as well...)
Yes, if fletch is using projects which require bzip2, it should either provide it or error out for it not existing on the system. IIRC, providing dependencies is Fletch's purpose.
This fletch OpenCV3 patch (1a97ac3) with its if() section containing "FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2)" apparently presumes that FFmpeg will have been built incorporating bz2 support, when that support is only conditionally compiled (subject to CONFIG_BZLIB in matroskadec.c), and FFmpeg may configure/build without a requirement of bz2 support.
On systems that may have only versioned instances of the bz2 shared library locatable (no locatable unversioned library or unversioned symlink present), a build failure may occur with cmake not finding the correct bz2 library via FIND_LIBRARY() and thus executing the FIND_FILE() which, in my 64bit targeted build, finds and refs the 32bit version of the library (curiously, twice, in the opencv_videoio link.txt). The OpenCV ld therefore fails, finding the (actually unnecessary) 32bit library to be in the wrong format (for the 64bit targeted build) and failing to complete.
Either of, A) removing the incorrect 32bit ref's from the link.txt, or, B) changing them to reference the correct available 64bit versioned instances of the library, allows the link to complete successfully.
See https://gitlab.kitware.com/cmake/cmake/issues/17131 for a bit more information on the circumstances leading to the failure and this discovery.
The text was updated successfully, but these errors were encountered: