Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] AttributeError: 'OpenCVConan' object has no attribute 'deps_cpp_info' #17182

Closed
AoGao-Kedoka opened this issue Apr 23, 2023 · 3 comments · Fixed by #15193
Closed

[bug] AttributeError: 'OpenCVConan' object has no attribute 'deps_cpp_info' #17182

AoGao-Kedoka opened this issue Apr 23, 2023 · 3 comments · Fixed by #15193
Assignees

Comments

@AoGao-Kedoka
Copy link

Environment details

  • Operating System+version: Windows11
  • Compiler+version: msvc 193
  • Conan version: 2.0.4
  • Python version: 3.10.9

Steps to reproduce

conanfile.py:

from conan import ConanFile

class App(ConanFile):
    settings = "os", "arch", "compiler", "build_type"
    requires = "opencv/4.5.5"
    generators = "CMakeDeps", "CMakeToolchain"
    default_options = {"opencv/4.5.5:contrib": True}
    
    def requirements(self):
        self.requires("libwebp/1.3.0", override=True)

Then command line:
conan install . --build-folder=build --build=missing

Logs

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.py: C:\Users\aogao\Projects\Extended_Reality\SimpleMarkerAR\conanfile.py      
Requirements
    ade/0.1.2a#40f60830184f44589a2d49ad7454a654 - Cache
    brotli/1.0.9#ffbecf553112bc3e25a08c91c28b8b68 - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Cache
    eigen/3.3.9#a1c8302ddcf95a8b79d437eb59f5491d - Cache
    ffmpeg/4.4#648b14ba345732dd06f661b6c91fd2b7 - Cache
    freetype/2.13.0#a312c096b314c6cfd6b43e290c88928a - Cache
    imath/3.1.6#5f8e538b39341ae7f5086967ae57cb2a - Cache
    jasper/4.0.0#478d874438e50163be99725c8603281a - Cache
    jbig/20160605#2d29fa02aacd76902e0d2cbbc24631ef - Cache
    libdeflate/1.17#245e79e0c70a86450df2816a2289fa04 - Cache
    libfdk_aac/2.0.2#c9eb99853a2067c754bb1a826044d6eb - Cache
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335 - Cache
    libjpeg/9e#68269859e4325ddc3f995d1fd3fc9187 - Cache
    libmp3lame/3.100#44b12d19316eb2b223d98d3e75dae438 - Cache
    libpng/1.6.39#a4953955f060811c79abff9fe986b6fe - Cache
    libtiff/4.4.0#e6d8942022c89a22dfbe1a9b77289c7e - Cache
    libvpx/1.11.0#6fbd55b629d52b82db5786b0dd84a48b - Cache
    libwebp/1.3.0#d92654dbce1f8cb8ae45d5388f86fcfe - Cache
    libx264/cci.20220602#1847939486c0bfc5141898c469f9fff4 - Cache
    libx265/3.4#fb1af2d1f0f1c8aa25510237f1d86c39 - Cache
    ogg/1.3.5#062626875f5c8c59f069f76f148098ef - Cache
    opencv/4.5.5#6e269cd47b943e533827cdea4d498cf1 - Cache
    openexr/3.1.5#88ba2322e127ebe5635fcbfdff4928d2 - Cache
    openh264/2.3.1#e61a2e588611d5f611fdca7cbc4947b2 - Cache
    openjpeg/2.5.0#e3684ea8ab1cfc6707a461b0b2d0bb9c - Cache
    openssl/1.1.1t#7d9fc949345908e1b8609d9d9f528a08 - Cache
    opus/1.3.1#6938146de9da3b6817c85b6d522e8e4d - Cache
    protobuf/3.17.1#ffb2039b66b5a372f7a2a8a0b1ddfd13 - Cache
    quirc/1.1#897bda03871fa477f64b2230eae5d66b - Cache
    vorbis/1.3.7#d936fd8c850f0c7c4021e24e55e6352c - Cache
    xz_utils/5.4.0#186e94237b66f785e4ea095f2f621a56 - Cache
    zlib/1.2.13#13c96f538b52e1600c40b88994de240f - Cache
    zstd/1.5.4#15ac0bc440f89247276d78ea4fdf8b14 - Cache
Build requirements
    autoconf/2.71#f4e2bd681d49b4b80761aa587bde94d5 - Cache
    automake/1.16.5#891f585a736bce951cc0e7109aa5ffee - Cache
    m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c - Cache
    meson/1.0.0#15586c0ac6f682805875ef903dbe7ee2 - Cache
    msys2/cci.latest#567331f1604f3c584f04feade960f06e - Cache
    nasm/2.15.05#799d63b1672a337584b09635b0f22fc1 - Cache
    ninja/1.11.1#a2f0b832705907016f336839f96963f8 - Cache
    pkgconf/1.9.3#a920b5c7f8d04f22b9fe03db91a864dd - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache
    yasm/1.3.0#fb800a15413dca19bfaef9e4b5d50694 - Cache

======== Computing necessary packages ========
opencv/4.5.5: Checking 3 compatible configurations:
opencv/4.5.5: 'e9ac5bec452e1488120e5a991d5421377f1ffe54': compiler.cppstd=17
opencv/4.5.5: 'ddcc905677c0a6d660b576a49f86e8e06ad7b5d2': compiler.cppstd=20
opencv/4.5.5: '20d3b4232ae5458b7818aa6fe98368082a9cd1c6': compiler.cppstd=23
Requirements
    ade/0.1.2a#40f60830184f44589a2d49ad7454a654:c13a22a41ecd72caf9e556f68b406569547e0861#7aac953e578e4d07a1e208261488e4b0 - Cache
    brotli/1.0.9#ffbecf553112bc3e25a08c91c28b8b68:75df3523cadfb3cb5a2c1cc2d61e8c640e1f9b96#edc56626750531343a46a50b06c6a9d7 - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d:67bfcb7b4b78262b9d05495e479dcd92f747316b#2f8ef286cd9cf61aa002ef4c64a243e7 - Cache
    eigen/3.3.9#a1c8302ddcf95a8b79d437eb59f5491d:da39a3ee5e6b4b0d3255bfef95601890afd80709#e333b964bdb2048ca7b0f8ebd626ba48 - Cache
    ffmpeg/4.4#648b14ba345732dd06f661b6c91fd2b7:8c5ee5ec87578a5016ec81fd32a6ff93910b7c29#fdd95ea4e927f5a6fea7dcd3ab46239f - Cache
    freetype/2.13.0#a312c096b314c6cfd6b43e290c88928a:5558ae4aede2b521a7c72b10550e915ac9ee0e56#2c15a786ad5d74f966c6c32ef0a002bd - Cache
    imath/3.1.6#5f8e538b39341ae7f5086967ae57cb2a:9bdee485ef71c14ac5f8a657202632bdb8b4482b#9c4fe396bb0245e91dcf64d07a5a5372 - Cache
    jasper/4.0.0#478d874438e50163be99725c8603281a:d20bef96bfc627ab53546b5d5fb7fbb8418a925d#65d6cb2e2c91aeac1798aa43c68df0a0 - Cache
    jbig/20160605#2d29fa02aacd76902e0d2cbbc24631ef:98edcdfcd9fb7b473373eb7fe0d66af0e897e33e#c2aa0296769fb6a63880084f38985c9c - Cache
    libdeflate/1.17#245e79e0c70a86450df2816a2289fa04:7bfde258ff4f62f75668d0896dbddedaa7480a0f#259635e759f443ca96d727ad924db2f8 - Cache
    libfdk_aac/2.0.2#c9eb99853a2067c754bb1a826044d6eb:9bdee485ef71c14ac5f8a657202632bdb8b4482b#047ccef03f7418175d42e489559f962a - Cache
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335:7bfde258ff4f62f75668d0896dbddedaa7480a0f#c80a8218ec64ac2601d5873dc3b8d2b8 - Cache
    libjpeg/9e#68269859e4325ddc3f995d1fd3fc9187:7bfde258ff4f62f75668d0896dbddedaa7480a0f#fe9ad9742bd384de9d4dc3ba38619a2a - Cache
    libmp3lame/3.100#44b12d19316eb2b223d98d3e75dae438:7bfde258ff4f62f75668d0896dbddedaa7480a0f#f553581bef9aba765f1618ec6a6b9794 - Cache
    libpng/1.6.39#a4953955f060811c79abff9fe986b6fe:4e5406e4c2becfcef5afa6a019eb0f41c5cc8117#e196580a430a27038d69e56bb5258d7f - Cache
    libtiff/4.4.0#e6d8942022c89a22dfbe1a9b77289c7e:ba3d2277ded6d95800b1631ed406826e6963b106#cbb0985cf4acd234b302cf958b733151 - Cache
    libvpx/1.11.0#6fbd55b629d52b82db5786b0dd84a48b:5aae1e06780eab083531942603bf58697dff02d5#265185087909c86c389a2988259edcbe - Cache
    libwebp/1.3.0#d92654dbce1f8cb8ae45d5388f86fcfe:653db3a579025ea1bd9ddbca1ed97a34042b07bc#45721d40a00c80792349005f4ba22d08 - Cache
    libx264/cci.20220602#1847939486c0bfc5141898c469f9fff4:d255942e7ec60660e981cc1158cc19583e748ba0#dcb16ccc0c841b37cec8a3f5590886af - Cache
    libx265/3.4#fb1af2d1f0f1c8aa25510237f1d86c39:51e0f530ce3b7ab1874d8a7d4d1db79c6980ad83#5282451900e0d8f6deb19ba35987d3f0 - Cache
    ogg/1.3.5#062626875f5c8c59f069f76f148098ef:7bfde258ff4f62f75668d0896dbddedaa7480a0f#5f087e6746ab9b497c3872c1dd16a496 - Cache
    opencv/4.5.5#6e269cd47b943e533827cdea4d498cf1:cdf794b036f90846f11e93fbb06b6ffa673fb7cd - Build
    openexr/3.1.5#88ba2322e127ebe5635fcbfdff4928d2:ee48f9a5ee4b9a9e6b5901105ba7e2e6aed4ef82#248dcc8a36efe09b75b0f17540f287b6 - Cache
    openh264/2.3.1#e61a2e588611d5f611fdca7cbc4947b2:9bdee485ef71c14ac5f8a657202632bdb8b4482b#3b01fb1a4d49280a4315b91e961b5304 - Cache
    openjpeg/2.5.0#e3684ea8ab1cfc6707a461b0b2d0bb9c:7bfde258ff4f62f75668d0896dbddedaa7480a0f#e5333607d89d9a0a4f47da3f8f8ea66a - Cache
    openssl/1.1.1t#7d9fc949345908e1b8609d9d9f528a08:380f8ec226bccb813e196fb7ea4779da9a5c4a9f#322984aabeef9eaca6fdebbfc403e16a - Cache
    opus/1.3.1#6938146de9da3b6817c85b6d522e8e4d:8d1b5f509253e9145989c2f0f392281d40cbb3be#4b1e7c1dcae81401316e4817ead54a6d - Cache
    protobuf/3.17.1#ffb2039b66b5a372f7a2a8a0b1ddfd13:6894faa3b32456018c2db0ac241625d98ec6c582#c5d2e4fdf1048f32c285d3aaa9a035a3 - Cache
    quirc/1.1#897bda03871fa477f64b2230eae5d66b:20029e17f0b8792b803e478a6a51139592160580#f87f2b6811dbd0753cd2ade8c7e02428 - Cache
    vorbis/1.3.7#d936fd8c850f0c7c4021e24e55e6352c:5716ed60be3e52a680aebcade966a2d4782db011#d38dae70e8f579c7b25e6522dfe19df2 - Cache
    xz_utils/5.4.0#186e94237b66f785e4ea095f2f621a56:7bfde258ff4f62f75668d0896dbddedaa7480a0f#24d3d48d751c01449584bbdac421918c - Cache
    zlib/1.2.13#13c96f538b52e1600c40b88994de240f:7bfde258ff4f62f75668d0896dbddedaa7480a0f#f334406891bc00db993f9ede5f8a01e5 - Cache
    zstd/1.5.4#15ac0bc440f89247276d78ea4fdf8b14:47121e91833bc0c01414a4b0d4515c22a5cef7a2#7c89cde11a1cd7e6c42cc2c72f34f306 - Cache
Build requirements
    autoconf/2.71#f4e2bd681d49b4b80761aa587bde94d5:da39a3ee5e6b4b0d3255bfef95601890afd80709#5c53a519d70fdb79d3cd4145e9f0355f - Skip
    automake/1.16.5#891f585a736bce951cc0e7109aa5ffee:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715#07094da42a0b39fd4b34760c5f1f3e7d - Skip
    m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c:723257509aee8a72faf021920c2874abc738e029#0b5e50355c3e4e4e9e3434f96167ed09 - Skip
    meson/1.0.0#15586c0ac6f682805875ef903dbe7ee2:da39a3ee5e6b4b0d3255bfef95601890afd80709#5c8fd51fc33f12e26519674d99afd0e5 - Skip
    msys2/cci.latest#567331f1604f3c584f04feade960f06e:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#ce3addef73068ed1ad9ca9976b2d50c1 - Skip
    nasm/2.15.05#799d63b1672a337584b09635b0f22fc1:723257509aee8a72faf021920c2874abc738e029#35f6a3ef14b15246b30071d024e4f18d - Skip
    ninja/1.11.1#a2f0b832705907016f336839f96963f8:723257509aee8a72faf021920c2874abc738e029#2af209f6b38a9f7b2c777c6bff456ffb - Skip
    pkgconf/1.9.3#a920b5c7f8d04f22b9fe03db91a864dd:43771b8671ac44479c188dd72670e2eb2d7918a6#ce4d1d61f0b05d4229631aa740250685 - Skip
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47:522dcea5982a3f8a5b624c16477e47195da2f84f#a365b3810f698e2f0a00fbeece022903 - Skip
    yasm/1.3.0#fb800a15413dca19bfaef9e4b5d50694:723257509aee8a72faf021920c2874abc738e029#68bb37bc24509a0529e3363ecac8f9e3 - Skip

======== Installing packages ========
ade/0.1.2a: Already installed! (1 of 33)
brotli/1.0.9: Already installed! (2 of 33)
bzip2/1.0.8: Already installed! (3 of 33)
eigen/3.3.9: Already installed! (4 of 33)
imath/3.1.6: Already installed! (5 of 33)
jbig/20160605: Already installed! (6 of 33)
libdeflate/1.17: Already installed! (7 of 33)
libfdk_aac/2.0.2: Already installed! (8 of 33)
libjpeg/9e: Already installed! (9 of 33)
libmp3lame/3.100: Already installed! (10 of 33)
libwebp/1.3.0: Already installed! (11 of 33)
ogg/1.3.5: Already installed! (12 of 33)
openjpeg/2.5.0: Already installed! (13 of 33)
opus/1.3.1: Already installed! (14 of 33)
quirc/1.1: Already installed! (15 of 33)
xz_utils/5.4.0: Already installed! (16 of 33)
zlib/1.2.13: Already installed! (17 of 33)
zstd/1.5.4: Already installed! (18 of 33)
libiconv/1.17: Already installed! (19 of 33)
libvpx/1.11.0: Already installed! (20 of 33)
libx264/cci.20220602: Already installed! (21 of 33)
libx265/3.4: Already installed! (22 of 33)
openssl/1.1.1t: Already installed! (23 of 33)
openh264/2.3.1: Already installed! (24 of 33)
jasper/4.0.0: Already installed! (25 of 33)
libpng/1.6.39: Already installed! (26 of 33)
libtiff/4.4.0: Already installed! (27 of 33)
openexr/3.1.5: Already installed! (28 of 33)
protobuf/3.17.1: Already installed! (29 of 33)
vorbis/1.3.7: Already installed! (30 of 33)
freetype/2.13.0: Already installed! (31 of 33)
ffmpeg/4.4: Already installed! (32 of 33)

-------- Installing package opencv/4.5.5 (33 of 33) --------
opencv/4.5.5: Building from source
opencv/4.5.5: Package opencv/4.5.5:cdf794b036f90846f11e93fbb06b6ffa673fb7cd
opencv/4.5.5: Copying sources to build folder
opencv/4.5.5: Building your package in C:\Users\aogao\.conan2\p\t\openca3cb61306e086\b
opencv/4.5.5: Calling generate()
opencv/4.5.5: Generators folder: C:\Users\aogao\.conan2\p\t\openca3cb61306e086\b\build\generators
ERROR: opencv/4.5.5: Error in generate() method, line 376
        ffmpeg_component_version = self.deps_cpp_info["ffmpeg"].components[component].version
        AttributeError: 'OpenCVConan' object has no attribute 'deps_cpp_info'
@AbrilRBS
Copy link
Member

Hi @AoGao-Kedoka thanks for your report.
I see that you are using Conan 2. I've filled a request to also update the offending line in #16678 (review). As this is a ConanCenterIndex issue I'll move the issue to that repo to track it there :)

@AbrilRBS AbrilRBS transferred this issue from conan-io/conan Apr 24, 2023
@SpaceIm
Copy link
Contributor

SpaceIm commented Apr 24, 2023

It's also fixed for weeks in #15193

if self.options.get_safe("with_ffmpeg"):
tc.variables["OPENCV_FFMPEG_SKIP_BUILD_CHECK"] = True
tc.variables["OPENCV_FFMPEG_SKIP_DOWNLOAD"] = True
# opencv will not search for ffmpeg package, but for
# libavcodec;libavformat;libavutil;libswscale modules
tc.variables["OPENCV_FFMPEG_USE_FIND_PACKAGE"] = "ffmpeg"
tc.variables["OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT"] = False
ffmpeg_libraries = []
for component in ["avcodec", "avdevice", "avformat", "avutil", "swscale", "avresample"]:
if component == "avutil" or self.dependencies["ffmpeg"].options.get_safe(component):
ffmpeg_libraries.append(f"ffmpeg::{component}")
ffmpeg_component_version = self.dependencies["ffmpeg"].cpp_info.components[component].get_property("component_version")
tc.variables[f"FFMPEG_lib{component}_VERSION"] = ffmpeg_component_version
tc.variables["FFMPEG_LIBRARIES"] = ";".join(ffmpeg_libraries)

@AbrilRBS
Copy link
Member

Ooops, you're right! There're so many opencv recipes it's sometimes hard to keep track of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants