Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation error #146

Open
DawnEve opened this issue Jun 13, 2024 · 1 comment
Open

installation error #146

DawnEve opened this issue Jun 13, 2024 · 1 comment

Comments

@DawnEve
Copy link

DawnEve commented Jun 13, 2024

When I try to install this package like this, an error occures:
BiocManager::install("rhdf5")

g++ -std=gnu++11 -shared -L/opt/R/4.3.2/lib64/R/lib -L/usr/local/lib64 -o rhdf5.so H5.o H5A.o H5D.o H5E.o H5F.o H5G.o H5I.o H5L.o H5O.o H5P.o H5R.o H5S.o H5S_extras.o H5T.o H5T_extras.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 WARNING: ignoring environment value of R_HOME /picb/jinlab/wangjl/R/x86_64-pc-linux-gnu-library/4.3/Rhdf5lib/lib/libhdf5.a -L/picb/jinlab/wangjl/R/x86_64-pc-linux-gnu-library/4.3/Rhdf5lib/lib -lcrypto -lcurl -lsz -laec -lz -ldl -lm -L/opt/R/4.3.2/lib64/R/lib -lR
/bin/ld: cannot find WARNING:: No such file or directory
/bin/ld: cannot find ignoring: No such file or directory
/bin/ld: cannot find environment: No such file or directory
/bin/ld: cannot find value: No such file or directory
/bin/ld: cannot find of: No such file or directory
/bin/ld: cannot find R_HOME: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [rhdf5.so] Error 1
ERROR: compilation failed for package ‘rhdf5’
* removing ‘/picb/jinlab/wangjl/R/x86_64-pc-linux-gnu-library/4.3/rhdf5’

My environment is CentOS7.9, R 4.3.2, Rsudio.

> packageVersion("Seurat")
[1] ‘4.4.0’
> packageVersion("Rhdf5lib")
[1] ‘1.24.1’

> system("which h5cc")
/home/wangjl/.local/bin/h5cc

> system("gcc --version")
gcc (GCC) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@DawnEve
Copy link
Author

DawnEve commented Jun 13, 2024

I find the answer today, though I don't know why this works:

1. check the path of HDF5:
$ which h5cc
~/.local/bin/h5cc

2. Run under R in shell:
export HDF5_DIR=/home/wangjl/.local/
export LD_LIBRARY_PATH=$HDF5_DIR/lib:$LD_LIBRARY_PATH
export CFLAGS="-I$HDF5_DIR/include"
export LDFLAGS="-L$HDF5_DIR/lib"

Rscript -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager"); BiocManager::install("rhdf5")'


3. check in shell R or Rstudio:
R
> library("rhdf5")
> packageVersion("rhdf5") #‘2.46.1’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant