Open
Description
On the master branch, when I run make quick-install
in a Terminal or compile("glmmTMB.cpp")
or compile("glmmTMB.cpp",'-O0 -g',libinit=FALSE)
in the Console, I get the following:
> compile("glmmTMB.cpp")
Note: Using Makevars in /Users/molliebrooks/.R/Makevars
using C++ compiler: ‘g++ (GCC) 11.0.0 20201205 (experimental)’
using SDK: ‘’
g++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include" -I"/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_glmmTMB -DTMB_LIB_INIT=R_init_glmmTMB -DCPPAD_FRAMEWORK -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c glmmTMB.cpp -o glmmTMB.o
In file included from glmmTMB.cpp:4:
init.h:18:8: error: redefinition of ‘void R_init_glmmTMB(DllInfo*)’
18 | void R_init_glmmTMB(DllInfo *dll)
| ^~~~~~~~~~~~~~
<command-line>: note: ‘void R_init_glmmTMB(DllInfo*)’ previously defined here
In file included from glmmTMB.cpp:5:
distrib.h: In instantiation of ‘Type glmmtmb::dcauchy(Type, Type, Type, int) [with Type = CppAD::AD<double>]’:
glmmTMB.cpp:1154:34: required from ‘Type objective_function<Type>::operator()() [with Type = CppAD::AD<double>]’
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/tmb_core.hpp:1312:7: required from here
distrib.h:343:61: error: cannot convert ‘CppAD::AD<double>’ to ‘double’
343 | Type logans = Type(-log(M_PI)) - log(scale) - log1p(resid*resid);
| ~~~~~^~~~~~
| |
| CppAD::AD<double>
In file included from /usr/local/gfortran/include/c++/11.0.0/cmath:45,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Core:19,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/TMB.hpp:92,
from glmmTMB.cpp:2:
/usr/local/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0/include-fixed/math.h:400:21: note: initializing argument 1 of ‘double log1p(double)’
400 | extern double log1p(double);
| ^~~~~~
In file included from glmmTMB.cpp:5:
distrib.h: In instantiation of ‘Type glmmtmb::dcauchy(Type, Type, Type, int) [with Type = CppAD::AD<CppAD::AD<double> >]’:
glmmTMB.cpp:1154:34: required from ‘Type objective_function<Type>::operator()() [with Type = CppAD::AD<CppAD::AD<double> >]’
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/tmb_core.hpp:917:29: required from ‘Type objective_function<Type>::evalUserTemplate() [with Type = CppAD::AD<CppAD::AD<double> >]’
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/tmb_core.hpp:2116:27: required from here
distrib.h:343:61: error: cannot convert ‘CppAD::AD<CppAD::AD<double> >’ to ‘double’
343 | Type logans = Type(-log(M_PI)) - log(scale) - log1p(resid*resid);
| ~~~~~^~~~~~
| |
| CppAD::AD<CppAD::AD<double> >
In file included from /usr/local/gfortran/include/c++/11.0.0/cmath:45,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Core:19,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/TMB.hpp:92,
from glmmTMB.cpp:2:
/usr/local/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0/include-fixed/math.h:400:21: note: initializing argument 1 of ‘double log1p(double)’
400 | extern double log1p(double);
| ^~~~~~
In file included from glmmTMB.cpp:5:
distrib.h: In instantiation of ‘Type glmmtmb::dcauchy(Type, Type, Type, int) [with Type = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]’:
glmmTMB.cpp:1154:34: required from ‘Type objective_function<Type>::operator()() [with Type = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]’
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/tmb_core.hpp:917:29: required from ‘Type objective_function<Type>::evalUserTemplate() [with Type = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]’
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/tmb_core.hpp:2365:29: required from here
distrib.h:343:61: error: cannot convert ‘CppAD::AD<CppAD::AD<CppAD::AD<double> > >’ to ‘double’
343 | Type logans = Type(-log(M_PI)) - log(scale) - log1p(resid*resid);
| ~~~~~^~~~~~
| |
| CppAD::AD<CppAD::AD<CppAD::AD<double> > >
In file included from /usr/local/gfortran/include/c++/11.0.0/cmath:45,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Core:19,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1,
from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/TMB/include/TMB.hpp:92,
from glmmTMB.cpp:2:
/usr/local/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0/include-fixed/math.h:400:21: note: initializing argument 1 of ‘double log1p(double)’
400 | extern double log1p(double);
| ^~~~~~
make: *** [glmmTMB.o] Error 1
Error in compile.orig(file, ...) : Compilation failed
Error in compile("glmmTMB.cpp") : Compilation failed
Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels