proxyC icon indicating copy to clipboard operation
proxyC copied to clipboard

Compilation fails on Fedora

Open koheiw opened this issue 9 months ago • 0 comments

The package does not compile on Fedora with clang due to suspected a compiler's bug.

In file included from /data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo:669:
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:5766:3: error: call to 'apply' is ambiguous
 5766 |   op_type::apply(*this, X);
      |   ^~~~~~~~~~~~~~
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Row_meat.hpp:569:12: note: in instantiation of function template specialization 'arma::Mat<double>::operator=<arma::SpOp<arma::SpMat<double>, arma::spop_square>, arma::op_sp_sum>' requested here
  569 |   Mat<eT>::operator=(X.get_ref());
      |            ^
linear.cpp:135:14: note: in instantiation of function template specialization 'arma::Row<double>::operator=<arma::mtSpReduceOp<double, arma::SpOp<arma::SpMat<double>, arma::spop_square>, arma::op_sp_sum>>' requested here
  135 |         sum1 = sum(square(mt1), 0);
      |              ^
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/op_sp_sum_meat.hpp:27:12: note: candidate function [with T1 = arma::SpOp<arma::SpMat<double>, arma::spop_square>]
   27 | op_sp_sum::apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, T1, op_sp_sum>& in)
      |            ^
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/op_sp_sum_meat.hpp:89:12: note: candidate function [with T1 = arma::SpMat<double>]
   89 | op_sp_sum::apply(Mat<typename T1::elem_type>& out, const mtSpReduceOp<typename T1::elem_type, SpOp<T1, spop_square>, op_sp_sum>& in)
      |            ^
1 error generated.

See https://github.com/RcppCore/RcppArmadillo/issues/465#issuecomment-2826347137

koheiw avatar Apr 24 '25 06:04 koheiw