Linking error when compiling examples: error: cannot find -lhdf5-shared

60 views
Skip to first unread message

Amit Sharma

unread,
Mar 31, 2023, 4:51:02 AM3/31/23
to deal.II User Group
Hello everyone,

I installed dealii using spack manager. I started learning dealii using examples but I am getting a linking error.

Scanning dependencies of target step-1
[ 33%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
[ 66%] Linking CXX executable step-1
/home/amit/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.4.0/binutils-2.38-e2nnae3w7g55p34q7m3tsngmmrol2iba/bin/ld.gold: error: cannot find -lhdf5-shared
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/step-1.dir/build.make:223: step-1] Error 1
make[2]: *** [CMakeFiles/Makefile2:272: CMakeFiles/step-1.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:252: CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:196: run] Error 2

Thanks,
Amit Sharma

Bruno Turcksin

unread,
Mar 31, 2023, 8:57:13 AM3/31/23
to deal.II User Group
Amit,

Did you load the hdf5 package? You can check using `spack find --loaded`.

Best,

Bruno

Ajay Rawat

unread,
Mar 31, 2023, 9:02:48 AM3/31/23
to dea...@googlegroups.com

Hello,

It seems hdf5 library still needs to be loaded. Try something like "spack load hdf5**" before compiling your code.

With regards
Ajay

--
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 dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/42939680-2c90-4f7d-ad5f-c3c23bc5ddc6n%40googlegroups.com.


--
Ajay Rawat
Kalpakkam, IGCAR

-------------------------------------------------------------------------
Save Himalayas....
-------------------------------------------------------------------------

Amit Sharma

unread,
Mar 31, 2023, 9:05:26 AM3/31/23
to deal.II User Group
Dear Bruno,

Yes, I loaded hdf5(version-1.10.7) and I tried same with latest version available on spack.

Thanks,
Amit

Simon

unread,
Apr 7, 2023, 8:21:45 AM4/7/23
to deal.II User Group
Is there already a solution to this issue?

I have the same problem as Amit Sharm;
hdf5 is loaded.

Best
Simon

Amit Sharma

unread,
Apr 17, 2023, 6:03:26 AM4/17/23
to deal.II User Group
There is some issue with dealii-9.4.0 with spack. I uninstall everything and install dealii-9.3.1 which works fine. Details are below if anyone needs it.

spackv0.17
cmake-3.16.3
spack install dea...@9.3.1 target=x86_64

Best Regards,
Amit Sharma

Simon Wiesheier

unread,
Apr 17, 2023, 12:54:27 PM4/17/23
to dea...@googlegroups.com
In case you do not need hdf5, you can install dealii without hdf5 enabled as

spack install dealii~hdf5

which worked in my case.

Best
Simon

--
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 dealii+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages