conda-forge / hdf5-feedstock

A conda-smithy repository for hdf5.
BSD 3-Clause "New" or "Revised" License
13 stars 60 forks source link

Bug with imported Cmake target 1.14.0 #196

Closed larsoner closed 1 year ago

larsoner commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

The error in the automated OpenMEEG rebuild PR https://github.com/conda-forge/openmeeg-feedstock/pull/42 seems to indicate a problem with HDF5 feedstock:

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=654485&view=logs&j=d0d954b5-f111-5dc4-4d76-03b6c9d0cf7e&t=841356e0-85bb-57d8-dbbc-852e683d1642&l=271

Running CMAKE
-- The C compiler identification is GNU 11.3.0
...
-- Found HDF5: $PREFIX/lib/libhdf5.so;$PREFIX/lib/libcrypto.so;$PREFIX/lib/libcurl.so;$BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib/librt.so;$BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib/libpthread.so;$PREFIX/lib/libsz.so;$PREFIX/lib/libz.so;$BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib/libdl.so;$BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/lib/libm.so (found version "1.14.0")  
...
-- Configuring done
CMake Error in OpenMEEGMaths/CMakeLists.txt:
  Imported target "HDF5::HDF5" includes non-existent path

    "/home/conda/feedstock_root/build_artifacts/hdf5_1675740981212/work/src/H5FDsubfiling"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

Note that my manual migration PR to 1.12.2 went smoothly and we haven't changed OpenMEEG infra/code at all, so it seems like a new problem with 1.14.0.

Installed packages

Copied from https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=654485&view=logs&j=d0d954b5-f111-5dc4-4d76-03b6c9d0cf7e&t=841356e0-85bb-57d8-dbbc-852e683d1642&l=271

    _libgcc_mutex:            0.1-conda_forge         conda-forge
    _openmp_mutex:            4.5-2_gnu               conda-forge
    binutils_impl_linux-64:   2.39-he00db2b_1         conda-forge
    binutils_linux-64:        2.39-h5fc0e48_11        conda-forge
    bzip2:                    1.0.8-h7f98852_4        conda-forge
    c-ares:                   1.18.1-h7f98852_0       conda-forge
    ca-certificates:          2022.12.7-ha878542_0    conda-forge
    cmake:                    3.25.2-h077f3f9_0       conda-forge
    expat:                    2.5.0-h27087fc_0        conda-forge
    gcc_impl_linux-64:        11.3.0-hab1b70f_19      conda-forge
    gcc_linux-64:             11.3.0-he6f903b_11      conda-forge
    gfortran_impl_linux-64:   11.3.0-he34c6f7_19      conda-forge
    gfortran_linux-64:        11.3.0-h3c55166_11      conda-forge
    gxx_impl_linux-64:        11.3.0-hab1b70f_19      conda-forge
    gxx_linux-64:             11.3.0-hc203a17_11      conda-forge
    kernel-headers_linux-64:  2.6.32-he073ed8_15      conda-forge
    keyutils:                 1.6.1-h166bdaf_0        conda-forge
    krb5:                     1.20.1-h81ceb04_0       conda-forge
    ld_impl_linux-64:         2.39-hcc3a1bd_1         conda-forge
    libcurl:                  7.87.0-hdc1c0ab_0       conda-forge
    libedit:                  3.1.20191231-he28a2e2_2 conda-forge
    libev:                    4.33-h516909a_1         conda-forge
    libgcc-devel_linux-64:    11.3.0-h210ce93_19      conda-forge

### Environment info

```shell
Standard conda-forge build, see https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=654485&view=logs&j=d0d954b5-f111-5dc4-4d76-03b6c9d0cf7e&t=841356e0-85bb-57d8-dbbc-852e683d1642&l=271
hmaarrfk commented 1 year ago

Thanks. I would like to say that this is an upstream bug with malformed cmake file.

hmaarrfk commented 1 year ago

will need more investigation.

ndevenish commented 1 year ago

We've just hit this on the autoupdate PR on our feedstock https://github.com/conda-forge/dxtbx-feedstock/pull/31

hmaarrfk commented 1 year ago

I think homebrew hit the same bug https://github.com/HDFGroup/hdf5/issues/2422

larsoner commented 1 year ago

Awesome, thanks for investigating @hmaarrfk !

hmaarrfk commented 1 year ago

i'm somewhat tempted to pause the HDF5 migration. Though I'm not sure i fully want to stop it. I feel like without "trailblazing" nobody will ever test the new software, so we will always "delay" these tests.

I am building both versions of HDF5 for opencv at the moment thought.

larsoner commented 1 year ago

It would be nice if all or most conda packages that depend on the hdf5 version at least build though. I'm not sure how many use the cmake interfaces -- if 99% work without needing cmake that's one thing, if only 20% do that's another. So maybe 1.14.0 already works for most packages and the others can wait for 1.14.1? 🤷

I'm also not sure how much extra complexity and solve time having only some packages migrate would create, which might be a concern.

hmaarrfk commented 1 year ago

i think it is going "better than other HDF5 migrations". Lets see how fare we go.

MicK7 commented 1 year ago

I see the same cmake issue in https://github.com/conda-forge/cgns-feedstock/pull/27

Thanks @hmaarrfk for investigating

MichaelSchoenfelder-SiV commented 1 year ago

This appears to be what is causing the error in my environment. Note the extra include path; that's what is causing the error since it doesn't exist.

h5c++ -showconfig | grep AM_CPPFLAGS
                    AM_CPPFLAGS:  -I<my conda env path>/include -I/home/conda/feedstock_root/build_artifacts/hdf5_1675775987664/work/src/H5FDsubfiling
hmaarrfk commented 1 year ago

https://github.com/HDFGroup/hdf5/issues/2422 was recently closed. If somebody wants to look into backporting the fix that may be appropriate while a new release is cut.

minrk commented 1 year ago

Fixed in #202