Problem installing 'rhdf5': g++: error: [1]: No such file or directory
1
0
Entering edit mode
rebeliscu • 0
@rebeliscu-19945
Last seen 2.6 years ago
United States

I'm having issues install rhdf5:


> BiocManager::install("rhdf5")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org

Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.2 (2021-11-01)
Installing package(s) 'rhdf5'
trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/rhdf5_2.38.0.tar.gz'
Content type 'application/x-gzip' length 1231795 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

[1] 2
* installing *source* package ‘rhdf5’ ...
** using staged installation
configure: creating ./config.status
config.status: creating src/external_filters.h
** libs
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5.c -o H5.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5A.c -o H5A.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5D.c -o H5D.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5E.c -o H5E.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5F.c -o H5F.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5G.c -o H5G.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5I.c -o H5I.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5L.c -o H5L.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5O.c -o H5O.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5P.c -o H5P.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5S.c -o H5S.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5S_extras.c -o H5S_extras.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5T.c -o H5T.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5Z.c -o H5Z.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c H5constants.c -o H5constants.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c HandleList.cpp -o HandleList.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c HandleListWrap.c -o HandleListWrap.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c bit64conversion.c -o bit64conversion.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c external_filters.c -o external_filters.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c h5dump.c -o h5dump.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c h5ls.c -o h5ls.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c h5testLock.c -o h5testLock.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c h5writeDataFrame.c -o h5writeDataFrame.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c printdatatype.c -o printdatatype.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils.c -o utils.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/include'    -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c wrap.c -o wrap.o
g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-z,relro -o rhdf5.so H5.o H5A.o H5D.o H5E.o H5F.o H5G.o H5I.o H5L.o H5O.o H5P.o H5S.o H5S_extras.o H5T.o H5Z.o H5constants.o HandleList.o HandleListWrap.o bit64conversion.o external_filters.o h5dump.o h5ls.o h5testLock.o h5writeDataFrame.o printdatatype.o utils.o wrap.o [1] 2 /home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/lib/libhdf5.a /home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/lib/libsz.a -lcrypto -lcurl -lz -L/usr/lib/R/lib -lR
g++: error: [1]: No such file or directory
g++: error: 2: No such file or directory
make: *** [/usr/share/R/share/make/shlib.mk:10: rhdf5.so] Error 1
ERROR: compilation failed for package ‘rhdf5’
* removing ‘/home/shared/R/x86_64-pc-linux-gnu-library/4.0/rhdf5’
* restoring previous ‘/home/shared/R/x86_64-pc-linux-gnu-library/4.0/rhdf5’

The downloaded source packages are in
    ‘/tmp/RtmppHSE6d/downloaded_packages’
Installation paths not writeable, unable to update packages
  path: /usr/lib/R/library
  packages:
    Matrix
  path: /usr/lib/R/site-library
  packages:
    RNetCDF
Old packages: 'bamsignals', 'Cairo', 'ggiraph', 'HDF5Array', 'maftools', 'magick', 'N2R', 'pagoda2', 'proxyC', 'rhdf5', 'Rhtslib', 'rJava', 'RMySQL', 'Rsamtools', 'sccore', 'systemfonts',
  'VariantAnnotation'
Update all/some/none? [a/s/n]: 
n
Warning message:
In .inet_warning(msg) :
  installation of package ‘rhdf5’ had non-zero exit statu

Session info:

R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Devuan GNU/Linux 4 (chimaera)

Matrix products: default
BLAS/LAPACK: /usr/local/lib/libflexiblas.so.3.0

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

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

other attached packages:
[1] rhdf5_2.36.0        data.table_1.14.2   BiocManager_1.30.16 flexiblas_3.0.0    

loaded via a namespace (and not attached):
[1] compiler_4.1.2     tools_4.1.2        rhdf5filters_1.6.0 Rhdf5lib_1.16.0
rhdf5 • 2.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Looks like you are missing g++. If you have sudo privileges it is easy enough. If not, you will have to ask your sysadmin.

ADD COMMENT
2
Entering edit mode

I think the error is coming from the linking command:

g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-z,relro -o rhdf5.so H5.o H5A.o H5D.o H5E.o H5F.o H5G.o H5I.o H5L.o H5O.o H5P.o H5S.o H5S_extras.o H5T.o H5Z.o H5constants.o HandleList.o HandleListWrap.o bit64conversion.o external_filters.o h5dump.o h5ls.o h5testLock.o h5writeDataFrame.o printdatatype.o utils.o wrap.o [1] 2 /home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/lib/libhdf5.a /home/shared/R/x86_64-pc-linux-gnu-library/4.0/Rhdf5lib/lib/libsz.a -lcrypto -lcurl -lz -L/usr/lib/R/lib -lR

For some reason the command contains [1] and 2 which is why g++ is complaining.

ADD REPLY
0
Entering edit mode
sudo apt-get install g++
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
g++ is already the newest version (4:10.2.1-1).

g++ is installed.

I think I found the problem! In my .Rprofile, I have a commad that outputs '[1] 2' (changing the BLAS using flexiblas), and so it seems that was being included in the library path above.

Thanks for your insight!

ADD REPLY
0
Entering edit mode

Glad you found it. It's easy to break R by putting stuff in a startup file like .Rprofile. An easy way to recognize a self-induced issue like this one is to run R with --vanilla. If the issue goes away then you know the culprit is one of your personal startup files.

ADD REPLY

Login before adding your answer.

Traffic: 703 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6