hdf5r icon indicating copy to clipboard operation
hdf5r copied to clipboard

Compilation failed: hdf5.h: No such file or directory

Open pavlin-policar opened this issue 5 years ago • 9 comments

I have installed R in a conda environment and have made sure to also install the HDF5 package. I did this because I don't permission to install system-wide packages, and conda has worked well for me in the past. However, I can't seem to install hdf5r.

I've cloned the repository, cd-ed into the directory and run R CMD build ., but I get the following error:

 checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘hdf5r’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* installing the package to build vignettes
      -----------------------------------
* installing *source* package ‘hdf5r’ ...
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for grep that handles long lines and -e... /bin/grep
checking for gcc... /home/ppolicar/miniconda3/envs/cell/bin/x86_64-conda_cos6-linux-gnu-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/ppolicar/miniconda3/envs/cell/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... yes
checking for /home/ppolicar/miniconda3/envs/cell/bin/x86_64-conda_cos6-linux-gnu-cc option to accept ISO C89... none needed
checking how to run the C preprocessor... /home/ppolicar/miniconda3/envs/cell/bin/x86_64-conda_cos6-linux-gnu-cpp
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for h5cc... /home/ppolicar/miniconda3/envs/cell/bin/h5cc
checking for HDF5 libraries... yes (version 1.10.2)
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for H5Fcreate in -lhdf5... yes
checking for hdf5_hl.h... yes
checking for H5LTpath_valid in -lhdf5_hl... yes
checking for main in -lhdf5_hl... yes
checking for matching HDF5 Fortran wrapper... /home/ppolicar/miniconda3/envs/cell/bin/h5fc
Found hdf5 with version: 1.10.2
checking for ggrep... /bin/grep
checking whether /bin/grep accepts -o... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
cp 1_10_2/*.c 1_10_2/*.h .
x86_64-conda_cos6-linux-gnu-cc -I/home/ppolicar/miniconda3/envs/cell/lib/R/include -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -I/home/ppolicar/nfs/miniconda/envs/cell/include -I/home/ppolicar/nfs/miniconda/envs/cell/include  -D__USE_MINGW_ANSI_STDIO -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/home/ppolicar/nfs/miniconda/envs/cell/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix  -c const_export.c -o const_export.o
In file included from const_export.h:22:0,
                 from const_export.c:23:
global.h:23:10: fatal error: hdf5.h: No such file or directory
 #include <hdf5.h>
          ^~~~~~~~
compilation terminated.
make: *** [/home/ppolicar/miniconda3/envs/cell/lib/R/etc/Makeconf:160: const_export.o] Error 1
ERROR: compilation failed for package ‘hdf5r’
* removing ‘/tmp/RtmphybFB5/Rinst53f974d37756/hdf5r’
      -----------------------------------
ERROR: package installation failed

I've made very sure that hdf5.h actually exists in /home/ppolicar/nfs/miniconda/envs/cell/include, and it seems that it is actually found in checking for hdf5.h... yes.

Any help would be appreciated.

pavlin-policar avatar Jan 03 '19 22:01 pavlin-policar