There is something when I use cmake to configure dealii with hdf5

636 views
Skip to first unread message

cxmai...@gmail.com

unread,
Apr 27, 2018, 3:28:51 AM4/27/18
to deal.II User Group
@davydden But after I finish configure the dealii:

sudo cmake -DCMAKE_INSTALL_PREFIX=/home/chenxi/DealIInew
-DDEAL_II_WITH_HDF5=ON
-DHDF5_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/lib
-DHDF5_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/include
 
-DHDF5_HL_LIBRARY=/usr/include/hdf5/serial/hdf5_hl.h
-DHDF5_PUBCONF=/usr/include/hdf5/serial/H5pubconf.h ../.





But I still got some warnings:


WARNING: Target "deal_II.g" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "deal_II" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "deal_II.g" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "deal_II" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "step.release" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "step.debug" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "affinity.debug" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING
: Target "tbb.debug" requests linking to directory "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/chenxi/Desktop/deal.II/build



But it works when I use make install to install dealii


What should I do to fix this problem?

Thank you very much in advance!!!!



Wolfgang Bangerth

unread,
Apr 27, 2018, 10:45:27 AM4/27/18
to dea...@googlegroups.com
On 04/27/2018 01:28 AM, cxmai...@gmail.com wrote:
> @davydden But after I finish configure the dealii:
>
> |
> sudo cmake -DCMAKE_INSTALL_PREFIX=/home/chenxi/DealIInew

It's generally a bad idea to do anything with 'sudo'. In your case, you
are installing into your home directory, so it is not even necessary here.


> But I still got some warnings:
>
>
> |
> WARNING:Target"deal_II.g"requests linking to directory
> "/usr/lib/x86_64-linux-gnu/hdf5/serial/lib".Targetsmay link only to
> libraries.CMakeisdropping the item.

I don't know where they come from, but these are just warnings. You can
ignore them. As long as....

> But it works when I use make install to install dealii
...it works, you should be fine. Can you run any of the tutorial programs?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

cxmai...@gmail.com

unread,
May 7, 2018, 9:05:05 AM5/7/18
to deal.II User Group
Thank you! Professor W.
I have solved my problem, 

-DHDF5_LIBRARY=/usr/lib/x86_64-linux-gnu/hdf5/serial/lib 

this command should link a static library, not a /lib.

在 2018年4月27日星期五 UTC+8下午10:45:27,Wolfgang Bangerth写道:
Reply all
Reply to author
Forward
0 new messages