纯小白一枚,在ubuntu18.10系统安装某开源数值模拟软件,具体操作见:http://www.maisondelasimulation.fr/smilei/install_linux.html根据安装要求需要配置openmpi和hdf5。(openmpi-4.1.0,hdf5-1.10.1),
openmpi按要求安装一切顺利,hdf5安装时,configure没问题,具体信息如下:zhangtao@zhangtaoA9503:~/hdf5-1.10.1$ ./configure --prefix=${INSTALL_DIR}/hdf5 --enable-parallel --with-pic --enable-linux-lfs --enable-shared --enable-build-mode=production --disable-sharedlib-rpath --enable-static CC=mpicc FC=mpif90
configure: WARNING: unrecognized options: --enable-linux-lfs。。(省略)
SUMMARY OF THE HDF5 CONFIGURATION
    =================================General Information:
-------------------
                   HDF5 Version: 1.10.1
                  Configured on: Tue Feb 26 15:33:55 CST 2019
                  Configured by: zhangtao@zhangtaoA9503
                    Host system: x86_64-unknown-linux-gnu
              Uname information: Linux zhangtaoA9503 4.18.0-15-generic #16-Ubuntu SMP Thu Feb 7 10:56:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                       Byte sex: little-endian
             Installation point: /usr/local/hdf5Compiling Options:
------------------
                     Build Mode: production
              Debugging Symbols: no
                        Asserts: no
                      Profiling: no
             Optimization Level: highLinking Options:
----------------
                      Libraries: static, shared
  Statically Linked Executables: 
                        LDFLAGS: 
                     H5_LDFLAGS: 
                     AM_LDFLAGS: 
                Extra libraries: -lz -ldl -lm 
                       Archiver: ar
                         Ranlib: ranlibLanguages:
----------
                              C: yes
                     C Compiler: /usr/local/openmpi/bin/mpicc ( Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu built with gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1))
                       CPPFLAGS: 
                    H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L   -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS: 
                        C Flags: 
                     H5 C Flags:   -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -finline-functions -s -Wno-inline -Wno-aggregate-return -O
                     AM C Flags: 
               Shared C Library: yes
               Static C Library: yes
                        Fortran: no                            C++: no                           Java: no
Features:
---------
                  Parallel HDF5: yes
             High-level library: yes
                   Threadsafety: no
            Default API mapping: v110
 With deprecated public symbols: yes
         I/O filters (external): deflate(zlib)
                            MPE: 
                     Direct VFD: no
                        dmalloc: no
 Packages w/ extra debug output: none
                    API tracing: no
           Using memory checker: no
Memory allocation sanity checks: no
            Metadata trace file: no
         Function stack tracing: no
      Strict file format checks: no
   Optimization instrumentation: no
之后进行make ,出错,具体信息如下:zhangtao@zhangtaoA9503:~/hdf5-1.10.1$ make
Making all in src
make[1]: 进入目录“/home/zhangtao/hdf5-1.10.1/src”
make  all-am
make[2]: 进入目录“/home/zhangtao/hdf5-1.10.1/src”
LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo  |                  \
sed -e 's/-L/:/g' -e 's/ //g'`"                               \
 ./H5make_libsettings > H5lib_settings.c  ||                               \
    (test $HDF5_Make_Ignore && echo "*** Error ignored") ||          \
    (rm -f H5lib_settings.c ; exit 1)
  CC       H5lib_settings.lo
  CCLD     libhdf5.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: 离开目录“/home/zhangtao/hdf5-1.10.1/src”
make[1]: 离开目录“/home/zhangtao/hdf5-1.10.1/src”
Making all in test
make[1]: 进入目录“/home/zhangtao/hdf5-1.10.1/test”
  CC       h5test.lo
h5test.c: In function ‘h5_dump_info_object’:
h5test.c:1278:72: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   printf("Dumping MPI Info Object(%d) (up to %d bytes per item):\n", (int)info,
                                                                      ^  CCLD     libh5test.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       tarray.o
In file included from tarray.c:23:
tarray.c: In function ‘test_array’:
H5srcdir.h:62:69: warning: ‘%s’ directive output may be truncated writing 10 bytes into a region of size between 1 and 1024 [-Wformat-truncation=]
             HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
                                                                     ^~
In file included from /usr/include/stdio.h:873,
                 from ../src/H5private.h:57,
                 from testhdf5.h:25,
                 from tarray.c:22:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 11 and 1034 bytes into a destination of size 1024
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       tfile.o
tfile.c: In function ‘set_multi_split’:
tfile.c:3844:55: warning: unused parameter ‘multi’ [-Wunused-parameter]
 set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split)
                                               ~~~~~~~~^~~~~
  CC       th5s.o
In file included from th5s.c:23:
th5s.c: In function ‘test_h5s_basic’:
H5srcdir.h:62:69: warning: ‘%s’ directive output may be truncated writing 7 bytes into a region of size between 1 and 1024 [-Wformat-truncation=]
             HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
                                                                     ^~
In file included from /usr/include/stdio.h:873,
                 from ../src/H5private.h:57,
                 from testhdf5.h:25,
                 from th5s.c:22:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 8 and 1031 bytes into a destination of size 1024
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       tmisc.o
  CCLD     testhdf5
/usr/bin/ld: ../src/.libs/libhdf5.so: undefined reference to `OMPI_C_MPI_NULL_COPY_FN'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1968:testhdf5] 错误 1
make[1]: 离开目录“/home/zhangtao/hdf5-1.10.1/test”
make: *** [Makefile:650:all-recursive] 错误 1束手无策,求大神搭救,感激涕零.......