Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 929217 - media-libs/opencv[vtk] fails with sci-libs/vtk-9.3.0
Summary: media-libs/opencv[vtk] fails with sci-libs/vtk-9.3.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Paul Zander
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-12 14:06 UTC by Nowa Ammerlaan
Modified: 2024-11-05 02:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log.gz,43.97 KB, application/gzip)
2024-04-12 14:06 UTC, Nowa Ammerlaan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan gentoo-dev 2024-04-12 14:06:43 UTC
Created attachment 890491 [details]
build log

Works if the vtk flag is disabled, otherwise:

FAILED: lib/libopencv_videoio.so.4.9.0
: && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O3 -pipe -march=skylake -mtune=skylake   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -mavx2 -fvisibility=hidden -fvisibility-inlines-hidden  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs  -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -shared -Wl,-soname,libopencv_videoio.so.409 -o lib/libopencv_videoio.so.4.9.0 modules/videoio/CMakeFiles/opencv_videoio.dir/src/videoio_registry.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/videoio_c.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_images.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_encoder.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_decoder.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_static.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/container_avi.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_v4l.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_obsensor_capture.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_obsensor/obsensor_uvc_stream_channel.cpp.o modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_obsensor/obsensor_stream_channel_v4l2.cpp.o  -Wl,-rpath,/tmp/portage/media-libs/opencv-4.9.0/work/opencv-4.9.0_build-abi_x86_64.amd64-python3_11/lib:  lib/libopencv_imgcodecs.so.4.9.0  -ldl  -lm  -lpthread  -lrt  lib/libopencv_imgproc.so.4.9.0  lib/libopencv_core.so.4.9.0 && :
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: modules/videoio/CMakeFiles/opencv_videoio.dir/src/videoio_registry.cpp.o:in function `_GLOBAL__sub_I_videoio_registry.cpp':
videoio_registry.cpp:(.text.startup._GLOBAL__sub_I_videoio_registry.cpp+0x40): undefined reference to `cv::cvCreateVideoWriter_FFMPEG_proxy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, cv::Size_<int> const&, cv::VideoWriterParameters const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: videoio_registry.cpp:(.text.startup._GLOBAL__sub_I_videoio_registry.cpp+0x47): undefined reference to `cv::cvCreateFileCapture_FFMPEG_proxy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::VideoCaptureParameters const&)'
collect2: error: ld returned 1 exit status
Comment 1 Nowa Ammerlaan gentoo-dev 2024-04-12 14:14:58 UTC
vtk is installed with the following flags:

[I] sci-libs/vtk
Available versions:  9.2.5(0/9.2)^t (~)9.2.6-r1(0/9.2)^t{gpkg} 9.3.0(0/9.3)^t {all-modules boost cuda debug doc examples ffmpeg (+)freetype gdal gles2-only imaging java las +logging mpi mysql odbc opencascade openmp openvdb pdal postgres python qt5 qt6 +rendering sdl tbb test +threads tk (+)views vtkm web PYTHON_SINGLE_TARGET="python3_10 python3_11" VIDEO_CARDS="nvidia"}
Installed versions:  9.3.0(0/9.3)^t[1](14:38:02 12/04/24)(all-modules boost doc ffmpeg freetype gdal imaging las logging mysql odbc opencascade openmp openvdb pdal postgres python qt6 rendering sdl tbb threads views -cuda -debug -examples -gles2-only -java -mpi -qt5 -test -tk -vtkm -web PYTHON_SINGLE_TARGET="python3_11 -python3_10" VIDEO_CARDS="-nvidia")
Homepage:            https://www.vtk.org/
Description:         The Visualization Toolkit

[1] "localrepo" /home/andrew/Git/localrepo
Comment 2 Nowa Ammerlaan gentoo-dev 2024-04-12 14:15:56 UTC
and ffmpeg is installed with these flags:

[U] media-video/ffmpeg
Available versions:  4.4.4-r9(0/56.58.58)^td{gpkg:8} 6.0-r12(0/58.60.60)^td 6.0.1-r4(0/58.60.60)^td 6.1.1-r5(0/58.60.60)^td**9999(0/58.60.60)*l^td {X alsa amf amr amrenc appkit bluray bs2b +bzip2 cdio chromaprint chromium codec2 cpudetection cuda +dav1d debug doc +encode fdk flite fontconfig frei0r fribidi gcrypt glslang gme gmp +gnutls +gpl gsm hardcoded-tables +iconv iec61883 ieee1394 jack jpeg2k jpegxl kvazaar ladspa lcms libaom libaribb24 libass libcaca libdrm libilbc libplacebo librtmp libsoxr libtesseract libv4l libxml2 lv2 lzma mipsdspr1 mipsdspr2 mipsfpu mmal modplug mp3 +network nvenc openal opencl opengl openh264 openssl opus oss +pic +postproc pulseaudio qsv rav1e rubberband samba sdl shaderc snappy sndio soc speex srt ssh static-libs svg svt-av1 test theora +threads truetype twolame v4l vaapi vdpau verify-sig vidstab vmaf vorbis vpx vulkan webp x264 x265 xvid zeromqzimg +zlib zvbi ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_ARM="asimddp i8mm neon thumb thumb2 v6 v8vfp vfpv3" CPU_FLAGS_PPC="altivec vsx vsx2" CPU_FLAGS_X86="3dnow 3dnowext aes avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 xop" FFTOOLS="+aviocat +cws2fws +ffescape +ffeval +ffhash +fourcc2pixfmt +graph2dot +ismindex +pktdumper +qt-faststart +sidxindex +trasher"}
Installed versions:  4.4.4-r9(0/56.58.58)^td{gpkg:8}(20:00:57 24/03/24)(X alsa bluray bzip2 dav1d encode fdk fontconfig gnutls gpl iconv libass libdrm libv4l lzma mp3 network openal opencl opengl openssl opus pic postproc pulseaudio qsv samba sdl speex svg theora threads truetype v4l vaapi verify-sig vorbis vpx vulkan x264 x265 xvid zlib -amf -amr -amrenc -appkit -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -flite -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libcaca -libilbc -librtmp -libsoxr -libtesseract-libxml2 -lv2 -mipsdspr1 -mipsdspr2 -mipsfpu -mmal -modplug -nvenc -openh264 -oss -rav1e -rubberband -snappy -sndio -srt -ssh -static-libs -svt-av1 -test -twolame -vdpau -vidstab -vmaf -webp -zeromq -zimg -zvbi ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64"ABI_X86="32 64 -x32" CPU_FLAGS_ARM="-neon -thumb -thumb2 -v6 -v8 -vfp -vfpv3" CPU_FLAGS_PPC="-altivec -vsx -vsx2" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher")
Homepage:            https://ffmpeg.org/
Description:         Complete solution to record/convert/stream audio and video. Includes libavcodec
Comment 3 Paul Zander 2024-04-14 11:58:56 UTC
sci-libs/opencascade[ffmpeg] exports -DHAVE_FFMPEG=true in it's OpenCASCADEConfig.cmake. Fixing this will a better understanding of the convoluted opencascade cmake files and a lot of testing, hence time.

Since opencascade only supports <ffmpeg-5 I recommend building sci-libs/opencascade[-ffmpeg] to avoid this and spend the time elsewhere.
Comment 4 Nowa Ammerlaan gentoo-dev 2024-04-14 14:38:11 UTC
(In reply to Paul Zander from comment #3)
> sci-libs/opencascade[ffmpeg] exports -DHAVE_FFMPEG=true in it's
> OpenCASCADEConfig.cmake. Fixing this will a better understanding of the
> convoluted opencascade cmake files and a lot of testing, hence time.
> 
> Since opencascade only supports <ffmpeg-5 I recommend building
> sci-libs/opencascade[-ffmpeg] to avoid this and spend the time elsewhere.

So how do we resolve this in the ebuild? Mask the "vtk" or "ffmpeg" flag? Or something like REQUIRED_USE="vtk? ( !ffmpeg )"?
Comment 5 Paul Zander 2024-04-14 14:54:04 UTC
Since sam is gonna yell at me if I use blockers something like this in {,R}DEPEND:

vtk?(
  ^^ (
    sci-libs/vtk[-opencascade]
    (
      sci-libs/vtk[opencascade]
      sci-libs/opencascade[-ffmpeg]
    )
  )
)
Comment 6 Larry the Git Cow gentoo-dev 2024-11-05 02:03:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3db769c9725026eabb9b697856ef2bd57b6ebe4d

commit 3db769c9725026eabb9b697856ef2bd57b6ebe4d
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2024-11-04 14:31:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-05 02:02:48 +0000

    media-libs/opencv: rework vtk depspec #929217
    
    The VTK <-> OpenCASCADE interaction is cumbersome with their circular inclusion
    and non-namespaced exporting of defines in cmake files.
    
    Since we do not want `OpenCASCADE` polluting our build environment with
    e.g. `-DHAVE_FFMPEG=true`, we require `VTK` to be build without `OpenCASCADE`
    support or `OpenCASCADE` to be build without ffmpeg support.
    
    Closes: https://bugs.gentoo.org/929217
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/opencv/opencv-4.10.0.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)