4re / vapoursynth-portage

Unofficial portage tree with all VapourSynth related ebuilds
23 stars 10 forks source link

media-libs/waifu2x-converter-cpp ebuild failure #50

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello, trying to build this (standalone, not as a vapoursynth plugin dependency) and I get this:

!!! The ebuild selected to satisfy ">=media-libs/opencv-3.0.0" has unmet requirements.
- media-libs/opencv-3.2.0::gentoo USE="eigen jpeg opengl openmp png python threads -contrib -contrib_cvv -contrib_hdf -contrib_sfm -contrib_xfeatures2d -cuda -debug -examples -ffmpeg -gdal -gflags -glog -gphoto2 -gstreamer -gtk -ieee1394 (-ipp) -java -jpeg2k -lapack -libav -opencl -openexr -pch -qt5 -tesseract -testprograms -tiff -v4l -vaapi -vtk -webp -xine" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -python3_5"

  The following REQUIRED_USE flag constraints are unsatisfied:
    opengl? ( any-of ( gtk qt5 ) )

  The above constraints are a subset of the following complete expression:
    cuda? ( tesseract? ( opencl ) ) gflags? ( contrib ) glog? ( contrib ) contrib_cvv? ( contrib qt5 ) contrib_hdf? ( contrib ) contrib_sfm? ( contrib eigen gflags glog ) opengl? ( any-of ( gtk qt5 ) ) python? ( any-of ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 ) ) tesseract? ( contrib )

(dependency required by "media-libs/waifu2x-converter-cpp-2016.06.23::vapoursynth" [ebuild])
(dependency required by "media-libs/waifu2x-converter-cpp" [argument])

Shouldn't it just tell me that I don't have the required version (only opencv-2.4.13 is installed).

ghost commented 7 years ago

Well, I solved it by installing opencv while disabling opengl. But now, I have a real waifu2x-converter-cpp problem. When trying to run it, I get:

waifu2x-converter-cpp: error while loading shared libraries: libopencv_core.so.2.4: cannot open shared object file: No such file or directory

ldd reports

> ldd /usr/local/bin/waifu2x-converter-cpp
        linux-vdso.so.1 (0x00007ffed9152000)
        libw2xc.so => /usr/lib64/libw2xc.so (0x00007ff9cce60000)
        libopencv_core.so.2.4 => not found
        libopencv_imgproc.so.2.4 => not found
        libopencv_highgui.so.2.4 => not found
        libopencv_features2d.so.2.4 => not found
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff9ccc58000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff9cca38000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6 (0x00007ff9cc640000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ff9cc338000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1 (0x00007ff9cc120000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff9cbd80000)
        libopencv_core.so.3.1 => /usr/lib64/libopencv_core.so.3.1 (0x00007ff9cb978000)
        libopencv_imgproc.so.3.1 => /usr/lib64/libopencv_imgproc.so.3.1 (0x00007ff9cb4b0000)
        libopencv_imgcodecs.so.3.1 => /usr/lib64/libopencv_imgcodecs.so.3.1 (0x00007ff9cb288000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff9cd0a8000)
        libz.so.1 => /lib64/libz.so.1 (0x00007ff9cb070000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff9cae68000)
        libtbb.so.2 => /usr/lib64/libtbb.so.2 (0x00007ff9cac38000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007ff9ca9c8000)
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007ff9ca790000)

It seems to link to both opencv versions.

ghost commented 7 years ago

I think it's worth mentioning that it links to both while only 3.1 is installed.

4re commented 7 years ago

I can't look into it right now because I'm away from home. I will when i get there.

4re commented 7 years ago

A few things here: You are checking a binary in your local path, that's why it's linking against an old opencv library (maybe a leftover from an experiment?). Somehow cmake does not do what it is supposed to do here, it was not even building/installing the binary let's not talk about the library, maybe a bug in cmake maybe a bug in the CMakeLists.txt file. I don't know. Anyway, I just dumbed down the check and now things are working for me in this end, sync again my overlay and check if it works for you too. Also your first portage error was telling you to upgrade opencv to >=3.0.0 and to choose gtk or qt5 too if you wanted the opengl useflag on (ofc another option was to disable opengl).

ghost commented 7 years ago

It compiles and install now, but I get Error : couldnError : couldn't open models_rgb/noise1_model.json't open models_rgb/noise1_model.json Checking with equery f, it looks like the models didn't install.

> equery f waifu2x-converter-cpp
 * Searching for waifu2x-converter-cpp ...
 * Contents of media-libs/waifu2x-converter-cpp-2016.06.23-r1:
/usr
/usr/bin
/usr/bin/waifu2x-converter-cpp
/usr/include
/usr/include/w2xconv.h
/usr/lib64
/usr/lib64/libw2xc.so
/usr/share
/usr/share/doc
/usr/share/doc/waifu2x-converter-cpp-2016.06.23-r1
/usr/share/doc/waifu2x-converter-cpp-2016.06.23-r1/README.md.bz2
ghost commented 7 years ago

Whoops, didn't see the USE flag (any reason it's not default?)

4re commented 7 years ago

Mostly because I conceived it to be used as the library for the vapoursynth's plug-in and not as an stand-alone app and they are huge (vapoursynth's plug-in installs it's own models). Do you think they should be default?

ghost commented 7 years ago

You're right, 99% will only get it via a dependency. An elog should suffice.

4re commented 7 years ago

Done.