R package h5r configure: error: Can't find HDF5

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
4
down vote

favorite












I am trying to install the R-pbh-5 package for R, which requires h5r. When I try to install h5r with install_version("h5r", "1.4.7"), I receive the following error:



[...]
checking for library containing inflate... -lz
checking for library containing H5open... no
configure: error: Can't find HDF5
ERROR: configuration failed for package ‘h5r’


I searched the Ubuntu package index for HDF5 and installed the libraries libhdf5-10, libhdf5-dev, hdf5-tools, and pbh5tools. It seems to be correctly installed as well:



$ whereis hdf5
hdf5: /usr/include/hdf5


I just spent the last hours googling, but I can't figure out what I'm missing here. Any advice?



> sessionInfo()
R Under development (unstable) (2018-02-12 r74246)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /opt/R/3.5.0/lib/R/lib/libRblas.so
LAPACK: /opt/R/3.5.0/lib/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 yaml_2.1.17 Rhdf5lib_1.1.5


Update 1:



Following the suggestions in the comments, I managed to get one step further. When I run:



R CMD INSTALL h5r_1.4.7.tar.gz --configure-vars="LDFLAGS='-L/usr/lib/x86_64-linux-gnu/hdf5/serial/' CPPFLAGS='-I/usr/include/hdf5/serial'"


I now receive the following error:



-I/usr/include/hdf5/serial
-L/usr/lib/x86_64-linux-gnu/hdf5/serial/
checking for library containing inflate... -lz
checking for library containing H5open... -lhdf5
checking for sufficiently new HDF5... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c h5_debug.c -o h5_debug.o
h5_debug.c:4:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'h5_debug.o' failed
make: *** [h5_debug.o] Error 1
ERROR: compilation failed for package ‘h5r’









share|improve this question























  • There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
    – steeldriver
    Feb 28 at 15:03










  • I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
    – bgbrink
    Feb 28 at 15:08






  • 1




    Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
    – steeldriver
    Feb 28 at 15:18











  • Did you try sudo apt-get install hdf5-helpers?
    – N0rbert
    Feb 28 at 19:25










  • Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
    – bgbrink
    Mar 1 at 11:31














up vote
4
down vote

favorite












I am trying to install the R-pbh-5 package for R, which requires h5r. When I try to install h5r with install_version("h5r", "1.4.7"), I receive the following error:



[...]
checking for library containing inflate... -lz
checking for library containing H5open... no
configure: error: Can't find HDF5
ERROR: configuration failed for package ‘h5r’


I searched the Ubuntu package index for HDF5 and installed the libraries libhdf5-10, libhdf5-dev, hdf5-tools, and pbh5tools. It seems to be correctly installed as well:



$ whereis hdf5
hdf5: /usr/include/hdf5


I just spent the last hours googling, but I can't figure out what I'm missing here. Any advice?



> sessionInfo()
R Under development (unstable) (2018-02-12 r74246)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /opt/R/3.5.0/lib/R/lib/libRblas.so
LAPACK: /opt/R/3.5.0/lib/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 yaml_2.1.17 Rhdf5lib_1.1.5


Update 1:



Following the suggestions in the comments, I managed to get one step further. When I run:



R CMD INSTALL h5r_1.4.7.tar.gz --configure-vars="LDFLAGS='-L/usr/lib/x86_64-linux-gnu/hdf5/serial/' CPPFLAGS='-I/usr/include/hdf5/serial'"


I now receive the following error:



-I/usr/include/hdf5/serial
-L/usr/lib/x86_64-linux-gnu/hdf5/serial/
checking for library containing inflate... -lz
checking for library containing H5open... -lhdf5
checking for sufficiently new HDF5... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c h5_debug.c -o h5_debug.o
h5_debug.c:4:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'h5_debug.o' failed
make: *** [h5_debug.o] Error 1
ERROR: compilation failed for package ‘h5r’









share|improve this question























  • There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
    – steeldriver
    Feb 28 at 15:03










  • I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
    – bgbrink
    Feb 28 at 15:08






  • 1




    Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
    – steeldriver
    Feb 28 at 15:18











  • Did you try sudo apt-get install hdf5-helpers?
    – N0rbert
    Feb 28 at 19:25










  • Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
    – bgbrink
    Mar 1 at 11:31












up vote
4
down vote

favorite









up vote
4
down vote

favorite











I am trying to install the R-pbh-5 package for R, which requires h5r. When I try to install h5r with install_version("h5r", "1.4.7"), I receive the following error:



[...]
checking for library containing inflate... -lz
checking for library containing H5open... no
configure: error: Can't find HDF5
ERROR: configuration failed for package ‘h5r’


I searched the Ubuntu package index for HDF5 and installed the libraries libhdf5-10, libhdf5-dev, hdf5-tools, and pbh5tools. It seems to be correctly installed as well:



$ whereis hdf5
hdf5: /usr/include/hdf5


I just spent the last hours googling, but I can't figure out what I'm missing here. Any advice?



> sessionInfo()
R Under development (unstable) (2018-02-12 r74246)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /opt/R/3.5.0/lib/R/lib/libRblas.so
LAPACK: /opt/R/3.5.0/lib/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 yaml_2.1.17 Rhdf5lib_1.1.5


Update 1:



Following the suggestions in the comments, I managed to get one step further. When I run:



R CMD INSTALL h5r_1.4.7.tar.gz --configure-vars="LDFLAGS='-L/usr/lib/x86_64-linux-gnu/hdf5/serial/' CPPFLAGS='-I/usr/include/hdf5/serial'"


I now receive the following error:



-I/usr/include/hdf5/serial
-L/usr/lib/x86_64-linux-gnu/hdf5/serial/
checking for library containing inflate... -lz
checking for library containing H5open... -lhdf5
checking for sufficiently new HDF5... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c h5_debug.c -o h5_debug.o
h5_debug.c:4:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'h5_debug.o' failed
make: *** [h5_debug.o] Error 1
ERROR: compilation failed for package ‘h5r’









share|improve this question















I am trying to install the R-pbh-5 package for R, which requires h5r. When I try to install h5r with install_version("h5r", "1.4.7"), I receive the following error:



[...]
checking for library containing inflate... -lz
checking for library containing H5open... no
configure: error: Can't find HDF5
ERROR: configuration failed for package ‘h5r’


I searched the Ubuntu package index for HDF5 and installed the libraries libhdf5-10, libhdf5-dev, hdf5-tools, and pbh5tools. It seems to be correctly installed as well:



$ whereis hdf5
hdf5: /usr/include/hdf5


I just spent the last hours googling, but I can't figure out what I'm missing here. Any advice?



> sessionInfo()
R Under development (unstable) (2018-02-12 r74246)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /opt/R/3.5.0/lib/R/lib/libRblas.so
LAPACK: /opt/R/3.5.0/lib/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 yaml_2.1.17 Rhdf5lib_1.1.5


Update 1:



Following the suggestions in the comments, I managed to get one step further. When I run:



R CMD INSTALL h5r_1.4.7.tar.gz --configure-vars="LDFLAGS='-L/usr/lib/x86_64-linux-gnu/hdf5/serial/' CPPFLAGS='-I/usr/include/hdf5/serial'"


I now receive the following error:



-I/usr/include/hdf5/serial
-L/usr/lib/x86_64-linux-gnu/hdf5/serial/
checking for library containing inflate... -lz
checking for library containing H5open... -lhdf5
checking for sufficiently new HDF5... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c h5_debug.c -o h5_debug.o
h5_debug.c:4:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'h5_debug.o' failed
make: *** [h5_debug.o] Error 1
ERROR: compilation failed for package ‘h5r’






16.04 package-management r






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 1 at 11:30

























asked Feb 28 at 14:44









bgbrink

234




234











  • There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
    – steeldriver
    Feb 28 at 15:03










  • I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
    – bgbrink
    Feb 28 at 15:08






  • 1




    Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
    – steeldriver
    Feb 28 at 15:18











  • Did you try sudo apt-get install hdf5-helpers?
    – N0rbert
    Feb 28 at 19:25










  • Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
    – bgbrink
    Mar 1 at 11:31
















  • There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
    – steeldriver
    Feb 28 at 15:03










  • I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
    – bgbrink
    Feb 28 at 15:08






  • 1




    Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
    – steeldriver
    Feb 28 at 15:18











  • Did you try sudo apt-get install hdf5-helpers?
    – N0rbert
    Feb 28 at 19:25










  • Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
    – bgbrink
    Mar 1 at 11:31















There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
– steeldriver
Feb 28 at 15:03




There are some historic issues with Debian (and derivatives) packaging the HDF5 headers / libraries in a serial subdirectory - I wonder if that's the issue here? Perhaps there's a way around it by passing appropriate --configure-vars to the build process?
– steeldriver
Feb 28 at 15:03












I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
– bgbrink
Feb 28 at 15:08




I am not so familiar with custom build commands. Could you help me out and formulate the appropriate option which would point to the hdf libs?
– bgbrink
Feb 28 at 15:08




1




1




Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
– steeldriver
Feb 28 at 15:18





Unfortunately I'm not either - there's some information here based on which I'd try something like R CMD INSTALL <whatever> --configure-vars='LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/'
– steeldriver
Feb 28 at 15:18













Did you try sudo apt-get install hdf5-helpers?
– N0rbert
Feb 28 at 19:25




Did you try sudo apt-get install hdf5-helpers?
– N0rbert
Feb 28 at 19:25












Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
– bgbrink
Mar 1 at 11:31




Thank you for your suggestions. Installing hdf5-helpers did not change anything, but @steeldriver was pointing me in the right direction. I updated the question.
– bgbrink
Mar 1 at 11:31










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










I managed to do it, although in slightly messy way. I used sudo cp -rs /usr/include/hdf5/serial/* /usr/share/R/include to create links to all the hdf5 files within the R/include folder, which is included in the build by default.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010676%2fr-package-h5r-configure-error-cant-find-hdf5%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    I managed to do it, although in slightly messy way. I used sudo cp -rs /usr/include/hdf5/serial/* /usr/share/R/include to create links to all the hdf5 files within the R/include folder, which is included in the build by default.






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      I managed to do it, although in slightly messy way. I used sudo cp -rs /usr/include/hdf5/serial/* /usr/share/R/include to create links to all the hdf5 files within the R/include folder, which is included in the build by default.






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        I managed to do it, although in slightly messy way. I used sudo cp -rs /usr/include/hdf5/serial/* /usr/share/R/include to create links to all the hdf5 files within the R/include folder, which is included in the build by default.






        share|improve this answer












        I managed to do it, although in slightly messy way. I used sudo cp -rs /usr/include/hdf5/serial/* /usr/share/R/include to create links to all the hdf5 files within the R/include folder, which is included in the build by default.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 5 at 9:48









        bgbrink

        234




        234



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010676%2fr-package-h5r-configure-error-cant-find-hdf5%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Trouble downloading packages list due to a “Hash sum mismatch” error

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            How do I move numbers in filenames, in a batch renaming operation?