vdorie / npci

Non-parametrics for Causal Inference
42 stars 18 forks source link

Unable to install npci package #3

Open neko2048 opened 3 years ago

neko2048 commented 3 years ago

Hi, there!

First, thanks for sharing the package for us! I would have this package to have several simulations for IHDP. But when I was trying to install this package, it gave me the error message below:

* installing *source* package ‘npci’ ...
** using staged installation
** libs
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o npci.so npci.o -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [npci.so] Error 1
ERROR: compilation failed for package ‘npci’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/npci’

I have tried many ways like searching the problem, changing R version to 3.1.1, and even switching from Windows to MacOS to solve this issue but all failed. Would you have any suggestion for this?

Thanks a lot!

BasVolkers commented 2 years ago

I had the same issue!

Changing the content of src/MakeVars to the following fixed it for me:

PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
vdorie commented 2 years ago

Thanks for pointing this out, and sorry that I missed this earlier. I'm a little baffled that anyone is using this repo since I've never published anything on it or made an official release.

I've corrected the Makefile to point to the correct library. If this doesn't fix it, make sure that gfortran is installed.

Zyx6666 commented 11 months ago

Why when I use install.packages("npci") to install npci package, it reports: Warning in install.packages: package ‘npci’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

vdorie commented 11 months ago

This package was never submitted to CRAN. To install it, you can use remotes or devtools, or follow the instructions on the repo.

On Wed, Nov 1, 2023 at 9:07 AM Zyx6666 @.***> wrote:

Why when I use install.packages("npci") to install npci package, it reports: Warning in install.packages: package ‘npci’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at

https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

— Reply to this email directly, view it on GitHub https://github.com/vdorie/npci/issues/3#issuecomment-1788244150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5P4BXT6T64MOOYZDWQSLYCGODLAVCNFSM5GHA2E72U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZYHAZDINBRGUYA . You are receiving this because you commented.Message ID: @.***>

Zyx6666 commented 11 months ago

Thank you very much. At your prompt, I successfully installed it.

qiaokeli1124 commented 10 months ago

Thank you very much. At your prompt, I successfully installed it.

hi,Could you kindly share the steps you took to install it?