Conan-center-index: [package] eigen/3.3.7: TypeError: '_CppInfo' object is not subscriptable

Created on 3 Sep 2020  路  4Comments  路  Source: conan-io/conan-center-index

  • Package Name/Version: eigen/3.3.7
  • Operating System+version: Windows 10
  • Compiler+version: MSVC 2017
  • Conan version: conan 1.23.0
  • Python version: Python 3.8.2
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=15
build_type=Release

Steps to reproduce

Using Conan CMake wrapper to run

conan_cmake_run(REQUIRES itk/5.1.0
        BASIC_SETUP CMAKE_TARGETS
        GENERATORS cmake_find_package_multi
        BUILD missing
)

CMake output

Click to expand log

Install ITK
Conan: Automatic detection of conan settings from cmake
Conan: Detected VS runtime: MD
Conan: Settings= -s;arch=x86_64;-s;build_type=Release;-s;compiler=Visual Studio;-s;compiler.version=15;-s;compiler.runtime=MD
Conan: checking conan executable
Conan: Found program conan/Scripts/conan.exe
Conan: Version found Conan version 1.23.0

Conan executing: conan/Scripts/conan.exe install . -s arch=x86_64 -s build_type=Release -s compiler=Visual Studio -s compiler.version=15 -s compiler.runtime=MD -g=cmake_find_package_multi -g=cmake --build=missing
Configuration:

[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]


conanfile.txt: 
Installing package

Requirements

    dcmtk/3.6.5 from 'conan-center' - Cache
    double-conversion/3.1.5 from 'conan-center' - Cache
    eigen/3.3.7 from 'conan-center' - Cache

    expat/2.2.9 from 'conan-center' - Cache
    fftw/3.3.8 from 'conan-center' - Cache
    hdf5/1.12.0 from 'conan-center' - Cache
    icu/67.1 from 'conan-center' - Cache

    itk/5.1.0 from 'conan-center' - Cache
    jbig/20160605 from 'conan-center' - Cache
    libiconv/1.16 from 'conan-center' - Cache

    libjpeg/9d from 'conan-center' - Cache
    libpng/1.6.37 from 'conan-center' - Cache
    libtiff/4.1.0 from 'conan-center' - Cache
    libwebp/1.1.0 from 'conan-center' - Cache

    libxml2/2.9.10 from 'conan-center' - Cache
    openjpeg/2.3.1 from 'conan-center' - Cache
    openssl/1.0.2u from 'conan-center' - Cache

    xz_utils/5.2.4 from 'conan-center' - Cache
    zlib/1.2.11 from 'conan-center' - Cache
    zstd/1.4.5 from 'conan-center' - Cache
Packages

    dcmtk/3.6.5:fe0bad5ee07f5973c4f15b6f0c19337f8f7429b5 - Cache
    double-conversion/3.1.5:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    eigen/3.3.7:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache

    expat/2.2.9:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    fftw/3.3.8:515dcf91fe5be2f47f00fa43921914a5c987423f - Cache
    hdf5/1.12.0:abcd6e0d515a4c4276ad2833f4c668012847788f - Cache
    icu/67.1:55750ca1806de5acad55828cd07eea60e109b004 - Cache

    itk/5.1.0:4f81a53d7645feec3590983d0480dd611864e48a - Cache
    jbig/20160605:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    libiconv/1.16:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache

    libjpeg/9d:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    libpng/1.6.37:606fdb601e335c2001bdf31d478826b644747077 - Cache
    libtiff/4.1.0:3942b283effd9584d18d4781c7de7e7782b5713b - Cache
    libwebp/1.1.0:36cedbf3473b284f710724d0897d2340d94bb47e - Cache
    libxml2/2.9.10:b0c71451788d0f89bcecccd0ccb54ab22e12ce21 - Cache
    openjpeg/2.3.1:d2f61bd085f73cf079a4d6769a30370968c82c33 - Cache
    openssl/1.0.2u:606fdb601e335c2001bdf31d478826b644747077 - Cache
    xz_utils/5.2.4:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    zlib/1.2.11:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    zstd/1.4.5:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache


Installing (downloading, building) binaries...

double-conversion/3.1.5: 
Already installed!

eigen/3.3.7: 
Already installed!

ERROR: eigen/3.3.7: Error in package_info() method, line 41
    self.cpp_info.components["eigen3"].names["cmake_find_package"] = "Eigen"
    TypeError: '_CppInfo' object is not subscriptable

CMake Error at build/Conan/conan.cmake:402 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  build/Conan/conan.cmake:497 (conan_cmake_install)
  Conan/itk_conan_run.cmake:3 (conan_cmake_run)
  CMakeLists.txt:39 (include)


Configuring incomplete, errors occurred!

I did not try another Conan version but it seems that a lot has changed since 1.23.0. I'm not an expert on Python but the root cause might be there.

bug

Most helpful comment

Maybe it would be also a good idea to check conan version in recipes and throw an exception?

Such a feature is implemented since Conan 1.28.0. We could not do something like this before (easily at least)

Since this is not a recipe issue and the required_conan_version attribute is without effect for Conan clients < 1.28.0, I think this issue can be closed

All 4 comments

Your Conan version is too old. Please update to 1.29.0+ if you can.

Maybe it would be also a good idea to check conan version in recipes and throw an exception?

Yes, version 1.29.0 worked.
I tested all versions down to 1.23.0 and the problem seems to be fixed directly with 1.24.0.

Maybe it would be also a good idea to check conan version in recipes and throw an exception?

Such a feature is implemented since Conan 1.28.0. We could not do something like this before (easily at least)

Since this is not a recipe issue and the required_conan_version attribute is without effect for Conan clients < 1.28.0, I think this issue can be closed

Was this page helpful?
0 / 5 - 0 ratings