我已安装Intel C,C ++和fortran编译器,并尝试在Ubuntu上安装hdf5。
但是,当我通过输入
进行编译时,由于错误而卡住了make
这是我收到的错误消息。
CCLD testhdf5
ld: warning: libimf.so, needed by ../src/.libs/libhdf5.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by ../src/.libs/libhdf5.so, not found (try using -rpath or -rpath-link)
ld: warning: libirng.so, needed by ../src/.libs/libhdf5.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by ../src/.libs/libhdf5.so, not found (try using -rpath or -rpath-link)
ld: .libs/testhdf5: hidden symbol `__intel_cpu_feature_indicator_x' in /opt/intel/compilers_and_libraries_2017.0.098/linux/compiler/lib/intel64_lin/libirc.a(cpu_feature_disp.o) is referenced by DSO
ld: final link failed: Bad value
Makefile:1519: recipe for target 'testhdf5' failed
make[1]: *** [testhdf5] Error 1
make[1]: Leaving directory '/home/Develop/Project/dep_src/hdf5-1.8.17/test'
Makefile:576: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
这是我使用的配置。
CC=icc CXX=icpc F9X=ifort CFLAGS='-O3 -xHost' CXXFLAGS='-O3 -xHost' ./configure --with-zlib=/home/Develop/Project/dep_libs/zlib --prefix=/home/Develop/Project/dep_libs/hdf5-1.8.17-intel64 --enable-hl --enable-cxx --enable-fortran
请帮帮我。谢谢。
答案 0 :(得分:0)
我遇到了同样的问题然后以某种方式解决了它。看起来他们找不到像libirng.so
这样的相关文件,所以我将intel的include和lib dir添加到了标志中:
CFLAGS=-O3 -xHost -ip -I/opt/intel/include/intel64
LDFLAGS=-L/opt/intel/lib/intel64
LD_LIBRARY_PATH=/opt/intel/lib/intel64:$LD_LIBRARY_PATH
我不知道为什么需要将这个lib目录添加到LD_LIBRARY_PATH,否则它仍然会死掉。