bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
217 stars 36 forks source link

opencv/4.1.1@conan/stable #1212

Closed juhnowski closed 4 years ago

juhnowski commented 4 years ago

Hello, I have:

[requires]
 bzip2/1.0.8@conan/stable
 opencv/4.1.1@conan/stable

[options]
opencv:contrib=True
opencv:ffmpeg=True

[generators]
cmake

Run:

conan install .. -s build_type=Debug --build=ffmpeg --build=libtiff --build=openjpeg --build=opencv

and get:

openjpeg/2.3.1@bincrafters/stable: WARN: Build folder /data/home/iyukhnov/.conan/data/openjpeg/2.3.1/bincrafters/stable/build/2bbe359e5d9349b57bcc834d45c9b33d5d083993
ERROR: openjpeg/2.3.1@bincrafters/stable: Error in build() method, line 64
    cmake.build()
    ConanException: Error 2 while executing cmake --build '/data/home/iyukhnov/.conan/data/openjpeg/2.3.1/bincrafters/stable/build/2bbe359e5d9349b57bcc834d45c9b33d5d083993' '--' '-j128'

Could you please help me, what I'm doing wrong? Thank you.

juhnowski commented 4 years ago

I append:

[requires]
 openjpeg/2.3.1

and got

dpkg-query: no packages found matching libva-dev:amd64

following prompt for sudo password, for

sudo apt-get update

unfortunately I haven't root rights on server (Ubuntu 16.04) Is it possible to build libva from source?

juhnowski commented 4 years ago

I try build on personal comp with Ubuntu 20.04 with root rights:

conan install .. -s build_type=Debug --build harfbuzz --build ffmpeg --build protobuf --build opencv

but got another error:

ffmpeg/4.2@bincrafters/stable: Calling build()
ffmpeg/4.2@bincrafters/stable:
ffmpeg/4.2@bincrafters/stable: ERROR: Package '1bf68c299902ec16d46d708ee73798622665919c' build failed
ffmpeg/4.2@bincrafters/stable: WARN: Build folder /home/ilya/.conan/data/ffmpeg/4.2/bincrafters/stable/build/1bf68c299902ec16d46d708ee73798622665919c
ERROR: ffmpeg/4.2@bincrafters/stable: Error in build() method, line 231
        self.build_configure()
while calling 'build_configure', line 236
        shutil.move("freetype.pc", "freetype2.pc")
        FileNotFoundError: [Errno 2] No such file or directory: 'freetype.pc'
ilya@ilya-ThinkPad-11e:~/CLionProjects/amqp/cmake-build-debug$

Please help, how to build opencv

juhnowski commented 4 years ago

I append

[requires]
freetype/2.10.1

but nothing changed: ffmpeg/4.2@bincrafters/stable: Error in build() method, line 231 ... No such file or directory: 'freetype.pc'

uilianries commented 4 years ago

ping @SSE4

ericLemanissier commented 4 years ago

this is one of several issues which would be solved by https://github.com/conan-community/conan-opencv/pull/44 but I did not find the time to solve the linking issues on macos and windows

juhnowski commented 4 years ago

I try build only ffmpeg:

[requires]
 openjpeg/2.3.1
libpng/1.6.37@bincrafters/stable
ffmpeg/4.2@bincrafters/stable

[generators]
 cmake

and got another error:

ffmpeg/4.2@bincrafters/stable: ERROR: Package '1bf68c299902ec16d46d708ee73798622665919c' build failed
ffmpeg/4.2@bincrafters/stable: WARN: Build folder /home/ilya/.conan/data/ffmpeg/4.2/bincrafters/stable/build/1bf68c299902ec16d46d708ee73798622665919c
ERROR: ffmpeg/4.2@bincrafters/stable: Error in build() method, line 231
        self.build_configure()
while calling 'build_configure', line 238
        shutil.move("openjpeg.pc", "libopenjp2.pc")
        FileNotFoundError: [Errno 2] No such file or directory: 'openjpeg.pc'
ericLemanissier commented 4 years ago

you should try with ffmpeg/4.2.1@bincrafters/stable

juhnowski commented 4 years ago

you should try with ffmpeg/4.2.1@bincrafters/stable

  • errors :(
[requires]
 zlib/1.2.11@conan/stable
 ffmpeg/4.2.1@bincrafters/stable

[generators]
 cmake

run:

conan install .. -s build_type=Debug --build=ffmpeg

got:

ffmpeg/4.2.1@bincrafters/stable: Calling:
 > ./configure '--prefix=/home/ilya/.conan/data/ffmpeg/4.2.1/bincrafters/stable/package/91103e94d6c2a59692e5b69f4391bc433e337e91' '--disable-doc' '--disable-programs' '--disable-shared' '--enable-static' '--pkg-config-flags=--static' '--disable-optimizations' '--disable-mmx' '--disable-stripping' '--enable-debug' '--enable-pic' '--enable-postproc' '--enable-zlib' '--enable-bzlib' '--enable-lzma' '--enable-iconv' '--enable-libfreetype' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-gpl' '--enable-nonfree' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-cuda' '--disable-cuvid' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib'
ERROR: x265 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
ffmpeg/4.2.1@bincrafters/stable:
ffmpeg/4.2.1@bincrafters/stable: ERROR: Package '91103e94d6c2a59692e5b69f4391bc433e337e91' build failed
ffmpeg/4.2.1@bincrafters/stable: WARN: Build folder /home/ilya/.conan/data/ffmpeg/4.2.1/bincrafters/stable/build/91103e94d6c2a59692e5b69f4391bc433e337e91
ERROR: ffmpeg/4.2.1@bincrafters/stable: Error in build() method, line 226
        self.build_configure()
while calling 'build_configure', line 322
        env_build.configure(args=args, build=False, host=False, target=False)
        ConanException: Error 1 while executing ./configure '--prefix=/home/ilya/.conan/data/ffmpeg/4.2.1/bincrafters/stable/package/91103e94d6c2a59692e5b69f4391bc433e337e91' '--disable-doc' '--disable-programs' '--disable-shared' '--enable-static' '--pkg-config-flags=--static' '--disable-optimizations' '--disable-mmx' '--disable-stripping' '--enable-debug' '--enable-pic' '--enable-postproc' '--enable-zlib' '--enable-bzlib' '--enable-lzma' '--enable-iconv' '--enable-libfreetype' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-gpl' '--enable-nonfree' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-cuda' '--disable-cuvid' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib'
juhnowski commented 4 years ago

I install x265 manually, but nothing changes: ERROR: x265 not found using pkg-config

ericLemanissier commented 4 years ago

You should either replacezlib/1.2.11@conan/stable with zlib/1.2.11, or remove it. packages finishing in @conan/stable are not maintained any more if they have been transferred to Conan Center Index Please provide the full log and profile, when you have an error

juhnowski commented 4 years ago

Finally, build ffmpeg done!

[requires]
 libx265/3.2.1
 ffmpeg/4.2.1@bincrafters/stable

[generators]
 cmake

Now I will try build opencv with this ffmpeg

juhnowski commented 4 years ago

My conanfile:

[requires]
 libx265/3.2.1
 ffmpeg/4.2.1@bincrafters/stable
 opencv/4.1.1@conan/stable

[options]
 opencv:contrib=True
 opencv:ffmpeg=True

[generators]
 cmake

Error:

ERROR: ffmpeg/4.2.1@bincrafters/stable: Incompatible requirements obtained in different evaluations of 'requirements'
    Previous requirements: [zlib/1.2.11, bzip2/1.0.8, xz_utils/5.2.4, libiconv/1.16, freetype/2.10.1, openjpeg/2.3.1, openh264/1.7.0, vorbis/1.3.6, opus/1.3.1, libx264/20190605, libx265/3.2.1, libvpx/1.8.0@bincrafters/stable, libmp3lame/3.100, libfdk_aac/2.0.0, libwebp/1.0.3, openssl/1.1.1d, libalsa/1.1.9, libxcb/1.13.1@bincrafters/stable, pulseaudio/13.0@bincrafters/stable]
    New requirements: [zlib/1.2.11, bzip2/1.0.8, xz_utils/5.2.4, libiconv/1.16, freetype/2.10.0, openjpeg/2.3.1, openh264/1.7.0, vorbis/1.3.6, opus/1.3.1, libx264/20190605, libx265/3.2.1, libvpx/1.8.0@bincrafters/stable, libmp3lame/3.100, libfdk_aac/2.0.0, libwebp/1.0.3, openssl/1.1.1d, libalsa/1.1.9, libxcb/1.13.1@bincrafters/stable, pulseaudio/13.0@bincrafters/stable]

What I need to do with requiremens? Add new to [requires] block? difference: freetype/2.10.1 - Previous requirements freetype/2.10.0 - new

ericLemanissier commented 4 years ago

you can add freetype/2.10.1

juhnowski commented 4 years ago
[requires]
 glib/2.64.0@bincrafters/stable
 freetype/2.10.1
 libx265/3.2.1
 ffmpeg/4.2.1@bincrafters/stable
 opencv/4.1.1@conan/stable

[options]
 opencv:contrib=True
 opencv:ffmpeg=True

[generators]
 cmake

error:

[ 28%] Linking CXX static library ../../../lib/libopencv_core.a
[ 28%] Built target opencv_core
make: *** [Makefile:152: all] Ошибка 2
opencv/4.1.1@conan/stable: 
opencv/4.1.1@conan/stable: ERROR: Package 'c3fe5db8ee8d9498c2d88ce4e607a693d584a0ce' build failed
opencv/4.1.1@conan/stable: WARN: Build folder /home/ilya/.conan/data/opencv/4.1.1/conan/stable/build/c3fe5db8ee8d9498c2d88ce4e607a693d584a0ce
ERROR: opencv/4.1.1@conan/stable: Error in build() method, line 422
        cmake.build()
        ConanException: Error 2 while executing cmake --build '/home/ilya/.conan/data/opencv/4.1.1/conan/stable/build/c3fe5db8ee8d9498c2d88ce4e607a693d584a0ce/build_subfolder' '--' '-j4'
juhnowski commented 4 years ago

I don't know what was wrong previously, but when I rebuild - it's builded! @ericLemanissier THANK YOU FOR HELP!!!!

command:

conan install .. -s build_type=Debug --build harfbuzz --build opencv

conanfile:

[requires]
 glib/2.64.0@bincrafters/stable
 freetype/2.10.1
 libx265/3.2.1
 ffmpeg/4.2.1@bincrafters/stable
 opencv/4.1.1@conan/stable

[options]
 opencv:contrib=True
 opencv:ffmpeg=True

[generators]
 cmake
juhnowski commented 4 years ago

@ericLemanissier may be you know how to switch off "sudo apt-get update" I need build on server, where I haven't root priveleged

ericLemanissier commented 4 years ago

See https://docs.conan.io/en/latest/reference/env_vars.html#conan-sysrequires-mode

juhnowski commented 4 years ago

See https://docs.conan.io/en/latest/reference/env_vars.html#conan-sysrequires-mode

thank you :)