Thanks for your quick response, Praveen. Unfortunately, your solution
didn't work for me because I don't have a "configure_50_hdf5.cmake" file
(or any similarly named file) in my deal.II folder in spack. It did point
me in the right direction and I have now been able to compile and run all
my deal.II codes successfully, thanks!
I'll summarize below how I solved this problem in case someone else faces
the same error in the future. Hope it helps!
The error I encountered when I compile any deal.II code is:
* Consolidate compiler generated dependencies of target step-1*
[ 50%] *Linking CXX executable step-1*
ld: library not found for -lhdf5-shared
clang: *error: **linker command failed with exit code 1 (use -v to see
invocation)*
make[2]: *** [step-1] Error 1
make[1]: *** [CMakeFiles/step-1.dir/all] Error 2
make: *** [all] Error 2
I checked my spack installation of hdf5 and everything seemed correct.
However, when I checked deal.II's detailed.log, which I have in the path:
/Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spack/dealii-9.4.0-eyotztjepnxo24vrevovh6bdejcvs2u5/share/deal.II/detailed.log
I saw the problem was that "HDF5_LIBRARIES" pointed to "hdf5-shared", which
the system couldn't find (as indicated by the compiler error). It should be
replaced with the correct path, which is for me:
/Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spack/hdf5-1.10.7-6i6oulsc3hyehgkevx56xykhibxlmbmc/lib/
libhdf5.dylib
In deal.II's configure files, which I found in the folder:
/Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spack/dealii-9.4.0-eyotztjepnxo24vrevovh6bdejcvs2u5/lib/cmake/deal.II/
I replaced every instance of "hdf5-shared" with "
/Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spack/hdf5-1.10.7-6i6oulsc3hyehgkevx56xykhibxlmbmc/lib/
libhdf5.dylib". The files I ended up changing are:
deal.IIConfig.cmake
deal.IIFeatureConfig.cmake
deal.IITargets.cmake
And that's it. I compiled my deal.II codes again from scratch and now it
works!
Best,
Ester
Missatge de Praveen C <[email protected]> del dia dc., 15 de febr. 2023 a les
3:54:
> I had hdf+mpi installed by spack, so I commented out the check in deal.II
> in the file
>
> cmake/configure/configure_50_hdf5.cmake
>
>
>
> MACRO(FEATURE_HDF5_FIND_EXTERNAL var)
> FIND_PACKAGE(HDF5)
>
> IF(HDF5_FOUND)
> SET(${var} *TRUE*)
>
> # IF(NOT HDF5_IS_PARALLEL)
> # MESSAGE(STATUS "Insufficient hdf5 installation found: "
> # "hdf5 has to be configured with MPI support."
> # )
> # SET(HDF5_ADDITIONAL_ERROR_STRING
> # "Insufficient hdf5 installation found!\n"
> # "hdf5 has to be configured with MPI support.\n"
> # )
> # SET(${var} FALSE)
> # ENDIF()
>
> CHECK_MPI_INTERFACE(HDF5 ${var})
> ENDIF()
> ENDMACRO()
>
> best
> praveen
> On 14 Feb 2023 at 8:03 PM +0530, Ester Comellas <[email protected]>,
> wrote:
>
> Hi All,
>
> Praveen, I'm getting this exact same error message when I try to compile
> my deal.II code. It's been a while since your post... do your recall how
> you solved it?
>
> I recently reinstalled deal.II via spack after upgrading macOS to Ventura
> 13.2. This is my error message:
>
> *Consolidate compiler generated dependencies of target TuringPatterns*
> [ 50%] *Linking CXX executable TuringPatterns*
> ld: library not found for -lhdf5-shared
> clang: *error:* *linker command failed with exit code 1 (use -v to see
> invocation)*
> make[2]: *** [TuringPatterns] Error 1
> make[1]: *** [CMakeFiles/TuringPatterns.dir/all] Error 2
> make: *** [all] Error 2
>
> And the detailed.log shows:
> # DEAL_II_WITH_HDF5 set up with external dependencies
> # HDF5_VERSION = 1.10.7
> # HDF5_DIR =
> /Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spack/hdf5-1$
> # HDF5_INCLUDE_DIRS =
> /Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.0_spa$
> # HDF5_USER_INCLUDE_DIRS =
> /Users/ecomellas/spack/opt/spack/darwin-ventura-skylake/apple-clang-14.0.$
> # HDF5_LIBRARIES = hdf5-shared
>
> The file "macro_find_package.cmake" Praveen mentioned in his original post
> doesn't exist in my installation. I don't know why spack didn't install the
> preferred version of hdf5 (1.12.2). I'm wondering whether I should install
> the preferred version or the most recent version (1.13.2) of hdf5 and try
> reinstalling deal.II? Could this solve the problem? Any suggestions would
> be really welcome. Thanks!
>
> Best,
> Ester
>
> El dia dimecres, 17 d’agost de 2022 a les 10:19:40 UTC+2, Praveen C va
> escriure:
>
>> The detailed.log shows this
>>
>> # DEAL_II_WITH_HDF5 set up with external dependencies
>> # HDF5_VERSION = 1.12.2
>> # HDF5_DIR =
>> /Users/praveen/Applications/spack/opt/spack/darwin-monterey-m1/apple-clang-13.1.6/hdf5-1.12.2-gxrwbuzg3xom562obmqaqtu5forevio5/cmake
>> # HDF5_INCLUDE_DIRS =
>> /Users/praveen/Applications/spack/opt/spack/darwin-monterey-m1/apple-
>> clang-13.1.6/hdf5-1.12.2-gxrwbuzg3xom562obmqaqtu5forevio5/include
>> # HDF5_USER_INCLUDE_DIRS =
>> /Users/praveen/Applications/spack/opt/spack/darwin-monterey-m1/
>> apple-clang-13.1.6/hdf5-1.12.2-gxrwbuzg3xom562obmqaqtu5forevio5/include
>> # HDF5_LIBRARIES = hdf5-shared
>>
>> and last line above seems wrong.
>>
>> Thanks
>> praveen
>>
>> On 17-Aug-2022, at 11:49 AM, Praveen C <[email protected]> wrote:
>>
>> Hello
>>
>> I am compiling [email protected] myself using dependent packages installed
>> via spack.
>>
>> I am facing the issue reported here
>>
>> https://github.com/spack/spack/issues/32023
>>
>> and is fixed here
>>
>> https://github.com/spack/spack/pull/32079
>>
>> This fix seems to remove the file
>>
>> cmake/macros/macro_find_package.cmake
>>
>> I removed it and was able to compile dealii. But when I compile an
>> example, I get this error
>>
>> *Consolidate compiler generated dependencies of target step-1*
>> [ 50%] *Linking CXX executable step-1*
>> ld: library not found for -lhdf5-shared
>> clang: *error:* *linker command failed with exit code 1 (use -v to see
>> invocation)*
>> make[2]: *** [step-1] Error 1
>> make[1]: *** [CMakeFiles/step-1.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> Thanks for any help.
>> Best
>> praveen
>>
>>
>> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/ae92d984-ea52-4a5e-8609-4123deff23b2n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/ae92d984-ea52-4a5e-8609-4123deff23b2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/nodblNqEjd4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/2aef3f8a-83da-46d2-9482-634e691a4502%40Spark
> <https://groups.google.com/d/msgid/dealii/2aef3f8a-83da-46d2-9482-634e691a4502%40Spark?utm_medium=email&utm_source=footer>
> .
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/CACCwedvpvRThmjF-1LyQ9Q37CX82O7Q-ONzNTjnwCi7TrMjvqQ%40mail.gmail.com.