SugiharaLab/rEDM

Compilation failed for package ‘rEDM’

Closed this issue · 10 comments

I am trying to install rEDM 1.2.2 because the later version does not have the EmbedDimension. I trying to install using the archive repository https://cran.r-project.org/src/contrib/Archive/rEDM/, devtools::install_github("SugiharaLab/rEDM") and install.packages("rEDM") but it gives the same error message, which follows below:

install.packages("~/GW_SW_Correlation_Analysis/rEDM_1.2.2.tar.gz", repos = NULL, type = "source")
Installing package into ‘/home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)

  • installing source package ‘rEDM’ ...
    ** package ‘rEDM’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    g++ -std=gnu++11 -I"/opt/R/3.6.3/lib/R/include" -DNDEBUG -I ./cppEDM/src/ -I"/opt/R/3.6.3/lib/R/library/Rcpp/include" -I"/home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include" -I/usr/local/include -fpic -g -O2 -c CCM.cpp -o CCM.o
    In file included from /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread.h:11:0,
    from RcppEDMCommon.h:8,
    from CCM.cpp:2:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/Thread.hpp: In lambda function:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/Thread.hpp:42:19: error: parameter packs not expanded with ‘...’:
    f(args...);
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/Thread.hpp:42:19: note: ‘args’
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/Thread.hpp:42:23: error: expansion pattern ‘args’ contains no argument packs
    f(args...);
    ^
    In file included from /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread.h:13:0,
    from RcppEDMCommon.h:8,
    from CCM.cpp:2:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp: In member function ‘void RcppThread::ThreadPool::push(F&&, Args&& ...)’:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:127:31: error: expected ‘,’ before ‘...’ token
    jobs_.emplace([f, args...] { f(args...); });
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:127:31: error: expected identifier before ‘...’ token
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: error: parameter packs not expanded with ‘...’:
    jobs_.emplace([f, args...] { f(args...); });
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: note: ‘args’
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:127:44: error: expansion pattern ‘args’ contains no argument packs
    jobs_.emplace([f, args...] { f(args...); });
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp: In member function ‘std::future<decltype (f(args ...))> RcppThread::ThreadPool::pushReturn(F&&, Args&& ...)’:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected ‘,’ before ‘...’ token
    auto job = std::make_shared([&f, args...] {
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected identifier before ‘...’ token
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: error: parameter packs not expanded with ‘...’:
    auto job = std::make_shared([&f, args...] {
    ^
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: note: ‘args’
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
    /home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/RcppThread/include/RcppThread/ThreadPool.hpp:145:22: error: expansion pattern ‘args’ contains no argument packs
    return f(args...);
    ^
    make: *** [CCM.o] Error 1
    ERROR: compilation failed for package ‘rEDM’
  • removing ‘/home/gbonotto/R/x86_64-pc-linux-gnu-library/3.6/rEDM’
    Warning in install.packages :
    installation of package ‘/home/gbonotto/GW_SW_Correlation_Analysis/rEDM_1.2.2.tar.gz’ had non-zero exit status

I also faced this problem. I suspected the version of Rtools causes the problem because the error happened when compiling the source of rEDM. So, I updated Rtools and R to the latest version. However, the the problem did not be solved. This is just a short note to inform you.
my current environment: R version 4.0.2, Rtools version rtools40
my previous environment: R version3.6.2, Rtools version rtools35

Data-Anal-Ojisan, are you able to install the latest version rEDM 1.5? The functionality of EmbedDimension is easily replicated in 1.5 if this is the case.

I couldn't install the latest version. So instead, I installed older version(0.6.9) of rEDM from CRAN(https://cran.r-project.org/src/contrib/Archive/rEDM/), as follows. And it worked.

install.packages('rEDM_0.6.9.tar.gz', repos=NULL, type='source')

I guess that the compilation error has occurred since January of this year according to another issue reports of this repository.

Can you give an overview of your system architecture? Is the installation error you are receiving identical to the original error above from May 24th by giancarlo-bonotto? If can you please supply the equivalent output.

Also please note that version 1.5 is now available on CRAN.

https://CRAN.R-project.org/package=rEDM

My system architecture is as follows.
os: Windows10 Home
CPU: Intel corei7-6700
RAM: 64GB

More specifically, I can install rEDM1.5 with the following command.

install.packages('rEDM')

However, when I try to load the rEDM library after the installation, the process of R hangs up. So I also tried to install the latest version of rEDM1.5 from source, but the result of installation process was as follows and the installation failed. Installation error was little bit different from May 24th by giancarlo-bonotto.

> install.packages('rEDM_1.5.0.tar.gz', repos=NULL, type='source')
* installing *source* package 'rEDM' ...
** using staged installation
** libs
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c CCM.cpp -o CCM.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c ComputeError.cpp -o ComputeError.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c DataFrame.cpp -o DataFrame.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c Embed.cpp -o Embed.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c EmbedDim.cpp -o EmbedDim.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c Multiview.cpp -o Multiview.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c PredictInterval.cpp -o PredictInterval.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c PredictNL.cpp -o PredictNL.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c RcppEDMCommon.cpp -o RcppEDMCommon.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c SMap.cpp -o SMap.o
"C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.0/include" -DNDEBUG -I./cppEDM/src -I../ -I'C:/Program Files/R/R-4.0.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.0/library/RcppThread/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c Simplex.cpp -o Simplex.o
make[1]: Entering directory '/Users/rhira/AppData/Local/Temp/Rtmpg9I1iv/R.INSTALL648c7c444a4b/rEDM/src/cppEDM/src'
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c API.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c CCM.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c Common.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c DateTime.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c EDM.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c EDM_Formatting.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c EDM_Neighbors.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c Eval.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c Multiview.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c Parameter.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c Simplex.cc
C:/rtools40/mingw64/bin/gcc  -std=c++11 -DCCM_THREADED -DMULTIVIEW_VALUES_OVERLOAD -I../  -c SMap.cc
ar -rcs libEDM.a API.o CCM.o Common.o DateTime.o EDM.o EDM_Formatting.o EDM_Neighbors.o Eval.o Multiview.o Parameter.o Simplex.o SMap.o
make[1]: ar: Command not found
make[1]: *** [makefile.mingw:29: libEDM.a] Error 127
make[1]: Leaving directory '/Users/AppData/Local/Temp/Rtmpg9I1iv/R.INSTALL648c7c444a4b/rEDM/src/cppEDM/src'
make: *** [Makevars.win:16: cppEDM/src/libEDM.a] Error 2
ERROR: compilation failed for package 'rEDM'
* removing 'C:/Program Files/R/R-4.0.0/library/rEDM'
* restoring previous 'C:/Program Files/R/R-4.0.0/library/rEDM'
Warning in install.packages :
  installation of package ‘rEDM_1.5.0.tar.gz’ had non-zero exit status

This is the why I installed older version of rEDM as I commented below.

Hello, I'm having issues installing the v1.5 as well.

install.packages('rEDM') runs but throws an error in the end and rEDM does not properly install. I have installed v1.2.3 instead.
I have the same issue if I try to build from source using the command line. Any help would be welcome.

Below is the error encountered:

There is a binary version available but the source version
is later:
binary source needs_compilation
rEDM 1.2.3 1.5.0 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘rEDM’

trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/rEDM_1.5.0.tar.gz'
Content type 'application/x-gzip' length 1797589 bytes (1.7 MB)

downloaded 1.7 MB

  • installing source package ‘rEDM’ ...
    ** package ‘rEDM’ successfully unpacked and MD5 sums checked
    ** libs
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c CCM.cpp -o CCM.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c ComputeError.cpp -o ComputeError.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c DataFrame.cpp -o DataFrame.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c Embed.cpp -o Embed.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c EmbedDim.cpp -o EmbedDim.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c Multiview.cpp -o Multiview.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c PredictInterval.cpp -o PredictInterval.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c PredictNL.cpp -o PredictNL.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppEDMCommon.cpp -o RcppEDMCommon.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c SMap.cpp -o SMap.o
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I ./cppEDM/src/ -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppThread/include" -I/usr/local/include -fPIC -Wall -g -O2 -c Simplex.cpp -o Simplex.o
    rm -f API.o CCM.o Common.o DateTime.o EDM.o EDM_Formatting.o EDM_Neighbors.o Eval.o Multiview.o Parameter.o Simplex.o SMap.o libEDM.a
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c API.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c CCM.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c Common.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c DateTime.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c EDM.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c EDM_Formatting.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c EDM_Neighbors.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c Eval.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c Multiview.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c Parameter.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c Simplex.cc
    clang++ -std=gnu++11 -Wall -g -O2 -fPIC -DCCM_THREADED -c SMap.cc
    ar -rcs libEDM.a API.o CCM.o Common.o DateTime.o EDM.o EDM_Formatting.o EDM_Neighbors.o Eval.o Multiview.o Parameter.o Simplex.o SMap.o # AR passed from Makevars
    cp libEDM.a ../lib/
    clang++ -std=gnu++11 -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 rEDM.so CCM.o ComputeError.o DataFrame.o Embed.o EmbedDim.o Multiview.o PredictInterval.o PredictNL.o RcppEDMCommon.o RcppExports.o SMap.o Simplex.o -L ./cppEDM/lib/ -lEDM -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.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-darwin15/6.1.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: *** [rEDM.so] Error 1
    ERROR: compilation failed for package ‘rEDM’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rEDM’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rEDM’

The downloaded source packages are in
‘/private/var/folders/bp/61k_8c5j5p32zkh4b0sz811h0000gn/T/RtmpJf7UNk/downloaded_packages’
Warning message:
In install.packages("rEDM") :
installation of package ‘rEDM’ had non-zero exit status

Regarding the windows issues, these seem congruent with the build failure reported by CRAN for r-oldrel-windows-ix86+x86_64, the "old" release of R based on GCC 4.6.
https://www.r-project.org/nosvn/R.check/r-oldrel-windows-ix86+x86_64/rEDM-00install.html
make[2]: ar: Command not found

The current R release r-release-windows-ix86+x86_64 is based on GCC 8.3. It seems the R build script in the old release is not recognising the enviroment variable for the linker (ar).

If you are on an old release of R, is it possible to upgrade to a current release?

Regarding macOS, both old release and current release pass CRAN build checks. You should be able to install 1.5 from CRAN.

The error reported by clang for 1.2.3 build
ld: library not found for -lgfortran
seems to be that R cannot find the gfortran libraries, which is odd, since R includes it's own version of these.

Updating R solved the Fortran library issues for me.

Cheers and thanks