conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
966 stars 1.78k forks source link

[package] hdf5/all: allow using natively-built libraries for consumer cross-building #14018

Open pavelb-techspark opened 2 years ago

pavelb-techspark commented 2 years ago

Description

HDF5 can't yet be cross-built but I can build HDF5 on a raspberry and then upload the packages to the local cache.

However, validate disallows me to use such a package for cross-building, because it raises error ConanInvalidConfiguration.

Package and Environment Details

Conan profile

gcc-10-armhf: include(./profile) include(./minimal)

[settings] os=Linux arch=armv7hf compiler=gcc compiler.version=10 compiler.libcxx=libstdc++11 build_type=Release

[env] CMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++-10 CXX=arm-linux-gnueabihf-g++-10 LD=arm-linux-gnueabihf-ld AR=arm-linux-gnueabihf-ar AS=arm-linux-gnueabihf-gcc-10 CMAKE_C_COMPILER=arm-linux-gnueabihf-gcc-10 FC=arm-linux-gnueabihf-gfortran-10 STRIP=arm-linux-gnueabihf-strip CC=arm-linux-gnueabihf-gcc-10 RANLIB=arm-linux-gnueabihf-ranlib OBJCOPY=arm-linux-gnueabihf-objcopy

[options] qt:cross_compile=arm-linux-gnueabihf-

gcc-9: include(./profile)

[settings] os=Linux arch=x86_64 compiler=gcc compiler.version=9 compiler.libcxx=libstdc++11 build_type=Release

[options]

*:shared=True

icu:shared=False

hdf5:shared=False opencv:shared=False qt:shared=True

hdf5:enable_cxx=True

hdf5:fPIC=True

hdf5:hl=True

hdf5:parallel=False

hdf5:shared=False

hdf5:szip_support=None

hdf5:with_zlib=True

Steps to reproduce

raspberry: conan install -r conancenter hdf5/1.10.6@ -pr:b=gcc-10-armhf -pr:h=gcc-10-armhf raspberry: conan upload "hdf5/1.10.6" -r local

docker-on-pc: conan install . -pr:h=gcc-10-armhf -pr:b=gcc-9 Cross-build from 'Linux:x86_64' to 'Linux:armv7hf' ... ERROR: There are invalid packages (packages that cannot exist for this configuration): hdf5/1.10.6: Invalid ID: Current recipe doesn't support cross-building (yet) ...

docker-on-pc: conan search hdf5/1.10.6@ -r local -q "arch=armv7hf"
Existing packages for recipe hdf5/1.10.6:

Existing recipe in remote 'local':

    Package_ID: c2930e1dadc4d80f3ea176321813dcf8d68bcfd1
        [options]
            enable_cxx: True
            fPIC: True
            hl: True
            parallel: False
            shared: False
            szip_support: None
            with_zlib: True
        [settings]
            arch: armv7hf
            build_type: Release
            compiler: gcc
            compiler.libcxx: libstdc++11
            compiler.version: 10
            os: Linux
        [requires]
            zlib/1.2.12:8c34e1d1c4c9d04af8efa9638d25d1f0e8e69e4f
        Outdated from recipe: False

    Package_ID: f75a6a6cd9ee1f126d4f9c591f3b548b9d59c85e
        [options]
            enable_cxx: True
            fPIC: True
            hl: True
            parallel: False
            shared: False
            szip_support: None
            with_zlib: True
        [settings]
            arch: armv7hf
            build_type: Debug
            compiler: gcc
            compiler.libcxx: libstdc++11
            compiler.version: 10
            os: Linux
        [requires]
            zlib/1.2.12:9a598e842d296dcb96cf4da7ba1c898fc36ae2f7
        Outdated from recipe: False

Logs

Click to expand log ``` Put your log output here ```
0uk commented 1 year ago

@pavelb-techspark It looks like I am in the same boat - needing to build a library depending on hdf5 via conan on armv8 - do you have any plans to submit a PR for your fix?