Skip to content

Package Not Installing for Mac / R 4.5.2 #6

@wooyongp

Description

@wooyongp

The Issue

The issue I have is that I cannot install the package for Mac.
In this issue, I documented the specific error message that I had on my MacBook Pro 16-inch with M4 Pro chip and Tahoe 24.2.
I also added Gemini's quick diagnosis on this problem, although its suggested fixes did not work.

Error Message

In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Matrix<double, -1, 1>>, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, -1, 1>>, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, -1, 1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Matrix<double, -1, 1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/PlainObjectBase.h:728:17: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, 1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  728 |       internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
      |                 ^
./Eigen/src/Core/PlainObjectBase.h:537:7: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1>>::_set_noalias<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>>' requested here
  537 |       _set_noalias(other);
      |       ^
./Eigen/src/Core/Matrix.h:379:9: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1>>::PlainObjectBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>>' requested here
  379 |       : Base(other.derived())
      |         ^
mcnnm_R.cpp:1162:23: note: in instantiation of function template specialization 'Eigen::Matrix<double, -1, 1>::Matrix<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1>>>>' requested here
 1162 |   VectorXd Avg_RMSE = Avg_MSE.array().sqrt();
      |                       ^
In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Matrix<double, -1, -1>>, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, -1, -1>>, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, -1, -1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Matrix<double, -1, -1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/PlainObjectBase.h:728:17: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, -1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  728 |       internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
      |                 ^
./Eigen/src/Core/PlainObjectBase.h:537:7: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1>>::_set_noalias<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>>' requested here
  537 |       _set_noalias(other);
      |       ^
./Eigen/src/Core/Matrix.h:379:9: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1>>::PlainObjectBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>>' requested here
  379 |       : Base(other.derived())
      |         ^
mcnnm_R.cpp:1248:23: note: in instantiation of function template specialization 'Eigen::Matrix<double, -1, -1>::Matrix<Eigen::CwiseUnaryOp<Eigen::internal::scalar_sqrt_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, -1>>>>' requested here
 1248 |   MatrixXd Avg_RMSE = Avg_MSE.array().sqrt();
      |                       ^
In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Matrix<double, -1, -1>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, -1, -1>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, -1, -1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Matrix<double, -1, -1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/PlainObjectBase.h:728:17: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, -1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  728 |       internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
      |                 ^
./Eigen/src/Core/PlainObjectBase.h:537:7: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1>>::_set_noalias<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>>' requested here
  537 |       _set_noalias(other);
      |       ^
./Eigen/src/Core/Matrix.h:379:9: note: in instantiation of function template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1>>::PlainObjectBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>>' requested here
  379 |       : Base(other.derived())
      |         ^
mcnnm_R.cpp:1287:16: note: in instantiation of function template specialization 'Eigen::Matrix<double, -1, -1>::Matrix<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double>, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, -1>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>, const Eigen::Map<Eigen::Matrix<double, -1, -1>>>>' requested here
 1287 |   MatrixXd H = (MatrixXd::Constant(mask_.rows(),mask_.cols(),1.0) - mask_).cwiseProduct(mask_);
      |                ^
In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/AssignEvaluator.h:804:3: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  804 |   call_assignment_no_alias(dst, src, func);
      |   ^
./Eigen/src/Core/AssignEvaluator.h:782:3: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  782 |   call_assignment(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());
      |   ^
./Eigen/src/Core/Assign.h:66:13: note: in instantiation of function template specialization 'Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
   66 |   internal::call_assignment(derived(), other.derived());
      |             ^
./Eigen/src/Core/Block.h:341:5: note: in instantiation of function template specialization 'Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  341 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:161:5: note: in instantiation of function template specialization 'Eigen::internal::BlockImpl_dense<Eigen::Matrix<double, -1, -1>, -1, 1, true>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  161 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:111:5: note: in instantiation of function template specialization 'Eigen::BlockImpl<Eigen::Matrix<double, -1, -1>, -1, 1, true, Eigen::Dense>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  111 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
mcnnm_R.cpp:1316:23: note: in instantiation of function template specialization 'Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<const Eigen::Map<Eigen::Matrix<double, -1, -1>>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
 1316 |       mat_norm.col(i) = mat_.col(i) / col_norms(i);
      |                       ^
In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/AssignEvaluator.h:804:3: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>, Eigen::internal::assign_op<double, double>>' requested here
  804 |   call_assignment_no_alias(dst, src, func);
      |   ^
./Eigen/src/Core/AssignEvaluator.h:782:3: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  782 |   call_assignment(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());
      |   ^
./Eigen/src/Core/Assign.h:66:13: note: in instantiation of function template specialization 'Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>' requested here
   66 |   internal::call_assignment(derived(), other.derived());
      |             ^
./Eigen/src/Core/Block.h:341:5: note: in instantiation of function template specialization 'Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>' requested here
  341 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:161:5: note: in instantiation of function template specialization 'Eigen::internal::BlockImpl_dense<Eigen::Matrix<double, -1, -1>, 1>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>' requested here
  161 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:111:5: note: in instantiation of function template specialization 'Eigen::BlockImpl<Eigen::Matrix<double, -1, -1>, 1, -1, false, Eigen::Dense>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>' requested here
  111 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
mcnnm_R.cpp:1328:20: note: in instantiation of function template specialization 'Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1>>>>' requested here
 1328 |       H_new.row(i) = H_new.row(i) / row_H_scales(i);
      |                    ^
In file included from mcnnm_R.cpp:4:
In file included from ./Eigen/Dense:1:
In file included from ./Eigen/Core:420:
./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
   86 |     MayLinearVectorize = bool(MightVectorize) && MayLinearize && DstHasDirectAccess
      |                                                               ^
./Eigen/src/Core/AssignEvaluator.h:607:20: note: in instantiation of template class 'Eigen::internal::copy_using_evaluator_traits<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  607 |   typedef typename AssignmentTraits::PacketType PacketType;
      |                    ^
./Eigen/src/Core/AssignEvaluator.h:739:10: note: in instantiation of template class 'Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>, Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>, Eigen::internal::assign_op<double, double>>' requested here
  739 |   Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
      |          ^
./Eigen/src/Core/AssignEvaluator.h:879:5: note: in instantiation of function template specialization 'Eigen::internal::call_dense_assignment_loop<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  879 |     call_dense_assignment_loop(dst, src, func);
      |     ^
./Eigen/src/Core/AssignEvaluator.h:836:46: note: in instantiation of member function 'Eigen::internal::Assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>::run' requested here
  836 |   Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
      |                                              ^
./Eigen/src/Core/AssignEvaluator.h:804:3: note: in instantiation of function template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>, Eigen::internal::assign_op<double, double>>' requested here
  804 |   call_assignment_no_alias(dst, src, func);
      |   ^
./Eigen/src/Core/AssignEvaluator.h:782:3: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  782 |   call_assignment(dst, src, internal::assign_op<typename Dst::Scalar,typename Src::Scalar>());
      |   ^
./Eigen/src/Core/Assign.h:66:13: note: in instantiation of function template specialization 'Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
   66 |   internal::call_assignment(derived(), other.derived());
      |             ^
./Eigen/src/Core/Block.h:341:5: note: in instantiation of function template specialization 'Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  341 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl_dense)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:161:5: note: in instantiation of function template specialization 'Eigen::internal::BlockImpl_dense<Eigen::Matrix<double, -1, -1>, -1, 1, true>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  161 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
./Eigen/src/Core/Block.h:111:5: note: in instantiation of function template specialization 'Eigen::BlockImpl<Eigen::Matrix<double, -1, -1>, -1, 1, true, Eigen::Dense>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
  111 |     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
      |     ^
./Eigen/src/Core/util/Macros.h:839:53: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_OPERATORS'
  839 | #define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
      |                                                     ^
./Eigen/src/Core/util/Macros.h:823:108: note: expanded from macro 'EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR'
  823 |     EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
      |                                                                                                            ^
mcnnm_R.cpp:1339:20: note: in instantiation of function template specialization 'Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>::operator=<Eigen::CwiseBinaryOp<Eigen::internal::scalar_quotient_op<double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, -1, 1>>>>' requested here
 1339 |       H_new.col(i) = H_new.col(i) / col_H_scales(i);
      |                    ^
116 warnings and 1 error generated.
make: *** [mcnnm_R.o] Error 1
ERROR: compilation failed for package ‘MCPanel’
* removing ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/MCPanel’

Gemini's Diagnosis and Guideline(did not solve the issue)

This error is a common headache for R users on modern Macs (ARM64/Apple Silicon). The MCPanel package is a powerful tool for causal inference and matrix completion, but it contains an older, "bundled" version of the Eigen C++ library.

Modern compilers (like the Clang version included with recent macOS updates) are much stricter than they used to be. They treat certain older C++ patterns—specifically how the bundled Eigen library handles boolean conversions—as fatal errors rather than just warnings.

Why is this happening?

The specific warning in your log: ./Eigen/src/Core/AssignEvaluator.h:86:63: warning: converting the enum constant to a boolean [-Wint-in-bool-context]

...is occurring because the bundled version of Eigen in MCPanel hasn't been updated to match the C++ standards required by your current version of R (4.5) and your Mac's compiler. Because MCPanel is no longer frequently updated, these "compatibility" flags are usually the only way to get it running on modern hardware.

Here are the steps to bypass this and get the package installed.

Solution 1: Use Permissive Compiler Flags (Recommended)

You can tell R to be less "picky" during the compilation process by temporarily lowering the strictness of the compiler. Run this directly in your R console:

# 1. Set temporary environment variables to ignore the strict check
Sys.setenv(SAFE_CPPFLAGS = "-Wno-int-in-bool-context -Wno-narrowing")

# 2. Attempt the installation again with flags passed to the compiler
devtools::install_github("susanathey/MCPanel", 
                         args = c("--no-multiarch"),
                         INSTALL_opts = c("--no-multiarch"))

Solution 2: Ensure System Dependencies are Met

install.packages(c("Rcpp", "RcppEigen"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions