James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
124 stars 54 forks source link

Error in TMB::compile(paste0(Version, ".cpp")) : Compilation failed #218

Closed JenM1 closed 4 years ago

JenM1 commented 4 years ago

Part of the output below: Calculated and saved to /private/var/folders/87/z7zyllzd4hld9fwy_7s535p00000gp/T/RtmpC4fB10/Summer-Gadus_chalcogrammus-2020-02-10//Kmeans-500.RData

Making data object

FieldConfig_input is: Component_1 Component_2 Omega -2 -2 Epsilon -2 -2 Beta -2 -2 Epsilon_time -3 -3 OverdispersionConfig_input is: Eta1 Eta2 -1 -1 Calculating range shift for stratum #1:

Making TMB object

Note: Using Makevars in /Users/jmmarsh/.R/Makevars clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/jmmarsh/Library/R/3.6/library/TMB/include -I/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include -DTMB_SAFEBOUNDS -DLIB_UNLOAD=R_unload_VAST_v9_1_0 -DTMB_LIB_INIT=R_init_VAST_v9_1_0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c VAST_v9_1_0.cpp -o VAST_v9_1_0.o In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:535: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:2: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/LU:47: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Cholesky:12: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Jacobi:29: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Cholesky:43: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:4: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/QR:17: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Householder:27: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:5: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/SVD:48: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:6: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Geometry:58: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:7: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Eigenvalues:58: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:54: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Sparse:26: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/SparseCore:66: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:54: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Sparse:27: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/OrderingMethods:71: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:54: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Sparse:29: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/SparseCholesky:43: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:54: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Sparse:32: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/SparseQR:35: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v9_1_0.cpp:2: In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:54: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Sparse:33: In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46: /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

VAST_v9_1_0.cpp:725:18: error: call to 'sqrt' is ambiguous Range_raw1 = sqrt(8) / exp( logkappa1 ); // Range = approx. distance @ 10% correlation ^~~~ /usr/local/clang7/include/c++/v1/math.h:1038:1: note: candidate function [with _A1 = int] sqrt(_A1 lcpp_x) _NOEXCEPT {return ::sqrt((double)lcpp_x);} ^ VAST_v9_1_0.cpp:68:6: note: candidate function [with Type = int] Type sqrt(Type x){ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:433:15: note: candidate function extern double sqrt(double); ^ /usr/local/clang7/include/c++/v1/math.h:1031:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY float sqrt(float lcpp_x) _NOEXCEPT {return ::sqrtf(lcpp_x);} ^ /usr/local/clang7/include/c++/v1/math.h:1032:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double lcpp_x) _NOEXCEPT {return ::sqrtl(lcpp_x);} ^ VAST_v9_1_0.cpp:726:18: error: call to 'sqrt' is ambiguous Range_raw2 = sqrt(8) / exp( logkappa2 ); // Range = approx. distance @ 10% correlation ^~~~ /usr/local/clang7/include/c++/v1/math.h:1038:1: note: candidate function [with _A1 = int] sqrt(_A1 lcpp_x) _NOEXCEPT {return ::sqrt((double)lcpp_x);} ^ VAST_v9_1_0.cpp:68:6: note: candidate function [with Type = int] Type sqrt(Type x){ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:433:15: note: candidate function extern double sqrt(double); ^ /usr/local/clang7/include/c++/v1/math.h:1031:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY float sqrt(float lcpp_x) _NOEXCEPT {return ::sqrtf(lcpp_x);} ^ /usr/local/clang7/include/c++/v1/math.h:1032:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double lcpp_x) _NOEXCEPT {return ::sqrtl(lcpp_x);} ^ VAST_v9_1_0.cpp:848:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if( (Options_vec(8)==1) ){


VAST_v9_1_0.cpp:848:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v9_1_0.cpp:848:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
VAST_v9_1_0.cpp:848:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1135:6: note: in instantiation of member function 'objective_function<CppAD::AD<double> >::operator()' requested here
    F(); // Run through user template (modifies reportvector)
     ^
VAST_v9_1_0.cpp:848:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v9_1_0.cpp:848:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:676:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<double> >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:69:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v9_1_0.cpp:475:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v9_1_0.cpp:778:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<double> >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1135:6: note: in instantiation of member function 'objective_function<CppAD::AD<double> >::operator()' requested here
    F(); // Run through user template (modifies reportvector)
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:532:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/usr/local/clang7/include/c++/v1/math.h:1217:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1218:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1228:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<double>, _A2 = CppAD::AD<double>]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<double>, CppAD::AD<double>, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:684:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<double> >::value' was not satisfied [with _A1 = CppAD::AD<double>]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:685:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<double> >::value' was not satisfied [with _A1 = CppAD::AD<double>]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
VAST_v9_1_0.cpp:848:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1369:34: note: in instantiation of member function 'objective_function<double>::operator()' requested here
      PROTECT( res = asSEXP( pf->operator()() ) );
                                 ^
VAST_v9_1_0.cpp:848:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v9_1_0.cpp:848:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
VAST_v9_1_0.cpp:848:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:906:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1418:10: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::evalUserTemplate' requested here
  y[0]=F.evalUserTemplate();
         ^
VAST_v9_1_0.cpp:848:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v9_1_0.cpp:848:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:676:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<CppAD::AD<double> > >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:69:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v9_1_0.cpp:475:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v9_1_0.cpp:778:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<double> > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:906:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1418:10: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::evalUserTemplate' requested here
  y[0]=F.evalUserTemplate();
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:532:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/usr/local/clang7/include/c++/v1/math.h:1217:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1218:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1228:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<CppAD::AD<double> >, _A2 = CppAD::AD<CppAD::AD<double> >]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<CppAD::AD<double> >, CppAD::AD<CppAD::AD<double> >, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:684:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<AD<double> > >::value' was not satisfied [with _A1 = CppAD::AD<CppAD::AD<double> >]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:685:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<AD<double> > >::value' was not satisfied [with _A1 = CppAD::AD<CppAD::AD<double> >]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
VAST_v9_1_0.cpp:848:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:906:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1533:12: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::evalUserTemplate' requested here
  y[0] = F.evalUserTemplate();
           ^
VAST_v9_1_0.cpp:848:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v9_1_0.cpp:848:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:676:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:69:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v9_1_0.cpp:475:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v9_1_0.cpp:778:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:906:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/jmmarsh/Library/R/3.6/library/TMB/include/tmb_core.hpp:1533:12: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::evalUserTemplate' requested here
  y[0] = F.evalUserTemplate();
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:532:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/usr/local/clang7/include/c++/v1/math.h:1217:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1218:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1228:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >, _A2 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, CppAD::AD<CppAD::AD<CppAD::AD<double> > >, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:684:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<AD<AD<double> > > >::value' was not satisfied [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
In file included from VAST_v9_1_0.cpp:2:
In file included from /Users/jmmarsh/Library/R/3.6/library/TMB/include/TMB.hpp:53:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/jmmarsh/Library/R/3.6/library/RcppEigen/include/Eigen/Core:96:
/usr/local/clang7/include/c++/v1/complex:685:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:409:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/usr/local/clang7/include/c++/v1/math.h:1485:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1486:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/usr/local/clang7/include/c++/v1/math.h:1491:1: note: candidate template ignored: requirement 'std::is_integral<AD<AD<AD<double> > > >::value' was not satisfied [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]
scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
^
18 warnings and 11 errors generated.
make: *** [VAST_v9_1_0.o] Error 1
Error in TMB::compile(paste0(Version, ".cpp")) : Compilation failed
Cole-Monnahan-NOAA commented 4 years ago

I wonder if you are using the wrong compiler? Please run where("g++") in the console and report back what it says.

Can you run other TMB models? Does TMB::run_example('simple') work?

Cole-Monnahan-NOAA commented 4 years ago

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

JenM1 commented 4 years ago

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan notifications@github.com wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA .

JenM1 commented 4 years ago

Hi,

Which package it the where function in? I installed pryr and this is what I get.

where("g++") Error: Can't find g++

On Mon, Feb 10, 2020 at 10:40 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan notifications@github.com wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA .

colemonnahan commented 4 years ago

You gotta wrap it in a system call, at least on Windows:

system('where g++') C:\Rtools\mingw_64\bin\g++.exe

it just asks which file is used to compile the model.

Those warnings are fine. It seems like everything is compiling fine except for VAST then. VAST must be using an option that the other models aren't. I'm at a bit of a loss, this isn't really my speciality. But at least we know TMB is working on your machine. Are you on a Mac? There's a couple solved issues with VAST:

https://github.com/James-Thorson-NOAA/VAST/issues/182 https://github.com/James-Thorson-NOAA/VAST/issues/140

Please have a look and try that maybe?

On Mon, Feb 10, 2020 at 11:56 AM JenM1 notifications@github.com wrote:

Hi,

Which package it the where function in? I installed pryr and this is what I get.

where("g++") Error: Can't find g++

On Mon, Feb 10, 2020 at 10:40 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan <notifications@github.com

wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=ABEVC3W7ELCRKL7LQKVQ52TRCGWGVA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKAIRY#issuecomment-584320071, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEVC3RYJAG5SW6BW32RKA3RCGWGVANCNFSM4KSTYRJA .

JenM1 commented 4 years ago

Hi,

Yes, I am on a Mac. I'll try your suggestions.

Thanks, Jen

On Mon, Feb 10, 2020 at 11:06 AM Cole Monnahan notifications@github.com wrote:

You gotta wrap it in a system call, at least on Windows:

system('where g++') C:\Rtools\mingw_64\bin\g++.exe

it just asks which file is used to compile the model.

Those warnings are fine. It seems like everything is compiling fine except for VAST then. VAST must be using an option that the other models aren't. I'm at a bit of a loss, this isn't really my speciality. But at least we know TMB is working on your machine. Are you on a Mac? There's a couple solved issues with VAST:

https://github.com/James-Thorson-NOAA/VAST/issues/182 https://github.com/James-Thorson-NOAA/VAST/issues/140

Please have a look and try that maybe?

On Mon, Feb 10, 2020 at 11:56 AM JenM1 notifications@github.com wrote:

Hi,

Which package it the where function in? I installed pryr and this is what I get.

where("g++") Error: Can't find g++

On Mon, Feb 10, 2020 at 10:40 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan < notifications@github.com

wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=ABEVC3W7ELCRKL7LQKVQ52TRCGWGVA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKAIRY#issuecomment-584320071 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABEVC3RYJAG5SW6BW32RKA3RCGWGVANCNFSM4KSTYRJA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSQGXHCBCDC3NUK5DDLRCGXVLA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCHNY#issuecomment-584328119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMKBSXQHIN7H7Z7JIYV4ADRCGXVLANCNFSM4KSTYRJA .

JenM1 commented 4 years ago

Hi,

I think it's working, well fit_model() has been spitting out numbers for the last 10 minutes... I added what Sarah Gaichas suggested to ~/.R/Markvars in this thread https://github.com/kaskr/adcomp/issues/297 I did substitute "clang7" for "clang6".

Thanks for your help. Jen

On Mon, Feb 10, 2020 at 11:11 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi,

Yes, I am on a Mac. I'll try your suggestions.

Thanks, Jen

On Mon, Feb 10, 2020 at 11:06 AM Cole Monnahan notifications@github.com wrote:

You gotta wrap it in a system call, at least on Windows:

system('where g++') C:\Rtools\mingw_64\bin\g++.exe

it just asks which file is used to compile the model.

Those warnings are fine. It seems like everything is compiling fine except for VAST then. VAST must be using an option that the other models aren't. I'm at a bit of a loss, this isn't really my speciality. But at least we know TMB is working on your machine. Are you on a Mac? There's a couple solved issues with VAST:

https://github.com/James-Thorson-NOAA/VAST/issues/182 https://github.com/James-Thorson-NOAA/VAST/issues/140

Please have a look and try that maybe?

On Mon, Feb 10, 2020 at 11:56 AM JenM1 notifications@github.com wrote:

Hi,

Which package it the where function in? I installed pryr and this is what I get.

where("g++") Error: Can't find g++

On Mon, Feb 10, 2020 at 10:40 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan < notifications@github.com

wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=ABEVC3W7ELCRKL7LQKVQ52TRCGWGVA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKAIRY#issuecomment-584320071 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABEVC3RYJAG5SW6BW32RKA3RCGWGVANCNFSM4KSTYRJA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSQGXHCBCDC3NUK5DDLRCGXVLA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCHNY#issuecomment-584328119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMKBSXQHIN7H7Z7JIYV4ADRCGXVLANCNFSM4KSTYRJA .

Cole-Monnahan-NOAA commented 4 years ago

Yeah if it compiled and is optimizing it is working. The example he provided can take a long time to run. You should be set.

On Mon, Feb 10, 2020 at 2:21 PM JenM1 notifications@github.com wrote:

Hi,

I think it's working, well fit_model() has been spitting out numbers for the last 10 minutes... I added what Sarah Gaichas suggested to ~/.R/Markvars in this thread https://github.com/kaskr/adcomp/issues/297 I did substitute "clang7" for "clang6".

Thanks for your help. Jen

On Mon, Feb 10, 2020 at 11:11 AM Jen Marsh jennifer.m.marsh@gmail.com wrote:

Hi,

Yes, I am on a Mac. I'll try your suggestions.

Thanks, Jen

On Mon, Feb 10, 2020 at 11:06 AM Cole Monnahan <notifications@github.com

wrote:

You gotta wrap it in a system call, at least on Windows:

system('where g++') C:\Rtools\mingw_64\bin\g++.exe

it just asks which file is used to compile the model.

Those warnings are fine. It seems like everything is compiling fine except for VAST then. VAST must be using an option that the other models aren't. I'm at a bit of a loss, this isn't really my speciality. But at least we know TMB is working on your machine. Are you on a Mac? There's a couple solved issues with VAST:

https://github.com/James-Thorson-NOAA/VAST/issues/182 https://github.com/James-Thorson-NOAA/VAST/issues/140

Please have a look and try that maybe?

On Mon, Feb 10, 2020 at 11:56 AM JenM1 notifications@github.com wrote:

Hi,

Which package it the where function in? I installed pryr and this is what I get.

where("g++") Error: Can't find g++

On Mon, Feb 10, 2020 at 10:40 AM Jen Marsh < jennifer.m.marsh@gmail.com> wrote:

Hi Cole,

I get a bunch of warnings.

Warning messages: 1: In file.remove(dynlib(name)) : cannot remove file 'ar1xar1.so', reason 'No such file or directory' 2: In file.remove(paste0(name, ".o")) : cannot remove file 'ar1xar1.o', reason 'No such file or directory' 3: In file.remove(dynlib(name)) : cannot remove file 'linreg_parallel.so', reason 'No such file or directory' 4: In file.remove(paste0(name, ".o")) : cannot remove file 'linreg_parallel.o', reason 'No such file or directory' 5: In file.remove(dynlib(name)) : cannot remove file 'randomregression.so', reason 'No such file or directory' 6: In file.remove(paste0(name, ".o")) : cannot remove file 'randomregression.o', reason 'No such file or directory' 7: In file.remove(paste0(name, ".o")) : cannot remove file 'simple.o', reason 'No such file or directory'

Thanks, Jen

On Mon, Feb 10, 2020 at 10:26 AM Cole Monnahan < notifications@github.com

wrote:

I should have said this: TMB::runExample(all=TRUE, clean=TRUE) that will run all examples after cleaning to force a recompilation of all .cpp files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSV3QPV5A6EBGZQYVCTRCGS6XA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJ5GEQ#issuecomment-584307474

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AJMKBSRWHPDGGQD7NUTFPUTRCGS6XANCNFSM4KSTYRJA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=ABEVC3W7ELCRKL7LQKVQ52TRCGWGVA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKAIRY#issuecomment-584320071

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABEVC3RYJAG5SW6BW32RKA3RCGWGVANCNFSM4KSTYRJA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AJMKBSQGXHCBCDC3NUK5DDLRCGXVLA5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCHNY#issuecomment-584328119 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJMKBSXQHIN7H7Z7JIYV4ADRCGXVLANCNFSM4KSTYRJA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/James-Thorson-NOAA/VAST/issues/218?email_source=notifications&email_token=AOBEDUFRO5N5YX7JFUKWKIDRCHHP3A5CNFSM4KSTYRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKQR5Q#issuecomment-584386806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBEDUDBFM3PB6VRN7NU7KDRCHHP3ANCNFSM4KSTYRJA .

megan221 commented 4 years ago

If you get the 'Compilation failed' warning using Windows OS you might try using an earlier version of Rtools. I had installed Rtools35 and had issues with compile but installed Rtools34 instead and ran the TMB simple example successfully

cheryl-barnes commented 4 years ago

Below is a complete list of steps to make compilers functional with:

Note: The order and methods used to install programs matter.
install.packages("devtools")
  require(devtools)
install.packages("Matrix")
  require(Matrix)

Before proceeding, follow these instructions: https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/. Recommend using the "Manual Install Guide" instructions (via the terminal [Applications > Utilities > Terminal]).

Install TMB from CRAN:

install.packages("TMB")
  # select option 1 (update all packages), if prompted
require(TMB)


Replace ~/.R/Makevars contents with the following (type 'open ~/.R/Makevars' in the terminal to edit) :

CC=gcc
CXX=/usr/local/gfortran/bin/g++
CXX1X=/usr/local/clang7/bin/clang++
CXX98=/usr/local/clang7/bin/clang++
CXX11=/usr/local/clang7/bin/clang++
CXX14=/usr/local/clang7/bin/clang++
CXX17=/usr/local/clang7/bin/clang++
LDFLAGS=-L/usr/local/clang7/lib

   # The final line with no data may be necessary...for some unknown reason.


Test TMB following code from: https://github.com/nwfsc-assess/geostatistical_delta-GLMM/wiki/Steps-to-install-TMB.

Version = "linear_mixed_model"

# Simulate data for a linear mixed model with random intercepts:
set.seed(1)
Factor = rep(1:10, each=10)
Z = rnorm(length(unique(Factor)), mean=0, sd=1)

X0 = 0
Y = Z[Factor] + X0 + rnorm( length(Factor), mean=0, sd=1)

# Download CPP file:
setwd(tempdir())
download.file(url="https://raw.githubusercontent.com/James-Thorson/mixed-effects/master/linear_mixed_model/linear_mixed_model.cpp", destfile="linear_mixed_model.cpp", method="auto")
compile(paste0(Version,".cpp"))

# Generate inputs for TMB:
Data = list("n_data"=length(Y), "n_factors"=length(unique(Factor)), "Factor"=Factor-1, "Y"=Y)
Parameters = list("X0"=-10, "log_SD0"=2, "log_SDZ"=2, "Z"=rep(0,Data$n_factor))
Random = c("Z")

# Build TMB object:
dyn.load(dynlib(Version))
Obj = MakeADFun(data=Data, parameters=Parameters, random=Random)  #

# Check that TMB is working properly:
Obj$fn(Obj$par)
  # This should return 313.4137.


Install VAST dependency, FishStatsUtils:

install_github("james-thorson/FishStatsUtils", INSTALL_opts="--no-staged-install")
require(FishStatsUtils)

Install VAST dependency, INLA:

install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
require(INLA)

Install the latest version of VAST, dowloaded from github: https://github.com/James-Thorson-NOAA/VAST.

install_local("~/Downloads/VAST-master")
require(VAST)

Test VAST using code from: https://github.com/James-Thorson-NOAA/VAST/wiki/Simple-example):

setwd("~/Desktop/VAST") 
# change for your requirements; this is where model results and plots will be saved

# load data set
# see `?load_example` for list of stocks with example data 
# that are installed automatically with `FishStatsUtils`. 
example = load_example(data_set="EBS_pollock")

# Make settings (turning off bias.correct to save time for example):
settings = make_settings(n_x=100, Region=example$Region, purpose="index", 
  strata.limits=example$strata.limits, bias.correct=FALSE)

# Run model
fit = fit_model("settings"=settings, "Lat_i"=example$sampling_data[,'Lat'], 
  "Lon_i"=example$sampling_data[,'Lon'], "t_i"=example$sampling_data[,'Year'], 
  "c_i"=rep(0,nrow(example$sampling_data)), "b_i"=example$sampling_data[,'Catch_KG'], 
  "a_i"=example$sampling_data[,'AreaSwept_km2'], "v_i"=example$sampling_data[,'Vessel'])

# Plot results
install.packages("rnaturalearthdata")
  require(rnaturalearthdata)
plot(fit)
cheryl-barnes commented 4 years ago

Please disregard "If, after completing the steps above, you still have compilation issues - consider installing Xcode 11.3 from https://developer.apple.com/download/more/" from my comment above.

Installing Xcode from Apple Developer seems to be causing (or at least not resolving) issues for people. If you go to install the Xcode CLI toolchain from Terminal and get a message about the software already being installed, run:

sudo rm -rf/Library/Developer/CommandLineTools

< and then >

xcode -select --install

If you follow the remaining steps above, all should be right in the world!

cheryl-barnes commented 4 years ago

If you are having installation issues with INLA, use the 'testing' version instead of the 'stable' version (this is recommended by the authors): install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)

Also, make sure that gfortran is up-to-date. I recently updated R (v4.0.0) and RStudio (v1.2.5042) and needed to use gfortran 8.2.

hhamazaki commented 4 years ago

I am having the same issue with Windows 10 machine. R4.02. Rtool4.0. TMB sample c;ode worked fine. Simple VAST example does not work

Making TMB object

Error in TMB::compile(paste0(Version, ".cpp")) : Compilation failed In addition: Warning messages: 1: In showSRID(uprojargs, format = "PROJ", multiline = "NO") : Discarded datum Unknown based on WGS84 ellipsoid in CRS definition 2: In showSRID(uprojargs, format = "PROJ", multiline = "NO") : Discarded datum Unknown based on WGS84 ellipsoid in CRS definition 3: In sp::spTransform(posTri, CRSobj = map_data@proj4string) : NULL target CRS comment, falling back to PROJ string

System check appears to be correct

system('where g++') C:\rtools40\mingw64\bin\g++.exe [

James-Thorson-NOAA commented 4 years ago

Hi all,

After lots of back-and-forth about these issues, I have decided to comment out the VamConfig[1]=3 feature (which constrained oscillations arising from species interactions in a VAM). This then eliminates all the macOS compiler errors that are documented above. The new Version = "VAST_v9_4_0" file in VAST release 3.5.3 should now compile on macOS.

Dan Cushing has already checked this fix on his machine, but could anyone else on this thread also try to re-install latest numeric release of VAST, and check whether the compiler errors are now fixed?

I'm closing the issue for now, but happy to re-open or hear other encouragement about it being fixed :)

cheryl-barnes commented 2 years ago

Note: CRAN R 4.0.0 builds and higher no longer use any custom compilers and thus this directory is no longer relevant. We now use Apple Xcode 10.1 and GNU Fortran 8.2 from https://github.com/fxcoudert/gfortran-for-macOS/releases. For more details on compiling R, please see also https://mac.R-project.org/tools/