cannot install 'gradientForest' and dependencies

I am getting multiple errors when trying to install the 'gradientForest' package as well as its dependency 'extendedForest'. I'm not quite understanding what the error messages mean. Any help would be appreciated.

Here is my error:

> install.packages("gradientForest", repos="http://R-Forge.R-project.org")
also installing the dependency ‘extendedForest’

Warning in install.packages :
  unable to access index for repository http://R-Forge.R-project.org/bin/macosx/contrib/4.2:

Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘extendedForest’
Do you want to attempt to install these from sources? (Yes/no/cancel) yes

* installing *source* package ‘extendedForest’ ...
** using staged installation
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c classTree.c -o classTree.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c regTree.c -o regTree.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c regrf.c -o regrf.o
regrf.c:53:25: warning: variable 'averrb' set but not used [-Wunused-but-set-variable]
    double errts = 0.0, averrb, meanY, meanYts, varY, varYts, r, xrand,
                        ^
1 warning generated.
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c rf.c -o rf.o
rf.c:89:15: warning: variable 'nimp' set but not used [-Wunused-but-set-variable]
        mimp, nimp, near, nuse, noutall, nrightall, nrightimpall,
              ^
rf.c:89:9: warning: variable 'mimp' set but not used [-Wunused-but-set-variable]
        mimp, nimp, near, nuse, noutall, nrightall, nrightimpall,
        ^
rf.c:104:10: warning: variable 'tp' set but not used [-Wunused-but-set-variable]
        *tp, *wr;
         ^
3 warnings generated.
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c rfsub.f -o rfsub.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c rfutils.c -o rfutils.o
clang -mmacosx-version-min=10.13 -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 extendedForest.so classTree.o regTree.o regrf.o rf.o rfsub.o rfutils.o -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: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file rfsub.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-extendedForest/00new/extendedForest/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘extendedForest’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-extendedForest/00new/extendedForest/libs/extendedForest.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-extendedForest/00new/extendedForest/libs/extendedForest.so, 0x0006): symbol not found in flat namespace (_buildtree_)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/extendedForest’
Warning in install.packages :
  installation of package ‘extendedForest’ had non-zero exit status
ERROR: dependency ‘extendedForest’ is not available for package ‘gradientForest’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/gradientForest’
Warning in install.packages :
  installation of package ‘gradientForest’ had non-zero exit status

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.