[Rcpp-devel] RcppEigen-related compilation error for Windows i386

Evan Biederstedt evan.biederstedt at gmail.com
Sat Sep 19 16:14:41 CEST 2020

Hello there

I'm in the process uploading an R package to CRAN, which is a relatively
simple interface to a C++ library: https://github.com/kharchenkolab/N2R

The windows binaries just became available for RcppSpdLog, so I wanted to
check how it installed on windows before CRAN submission.

The package currently installs on Linux and Mac OS, but when I check with
`devtools::check_win_devel()`, I'm getting a Windows-related error.

The error appears to be related to RcppEigen, not the C++ library---this
feels like something easily fixable, but I'm a bit nonplussed how to fix


warning: ignoring attributes on template argument
'Eigen::internal::packet_traits<int>::type' {aka '__vector(2) long
long int'} [-Wignored-attributes]
   return internal::first_aligned<int(unpacket_traits<DefaultPacketType>::alignment),Derived>(m);

make: *** [D:/RCompile/recent/R/etc/i386/Makeconf:244: n2knn.o] Error 1
ERROR: compilation failed for package 'N2R'
* removing 'd:/RCompile/CRANguest/R-devel/lib/N2R'
* restoring previous 'd:/RCompile/CRANguest/R-devel/lib/N2R'


"'Eigen::internal::packet_traits<int>::type' {aka '__vector(2) long long
int'} [-Wignored-attributes]" appears to be a somewhat standard warning,
but I'm not sure how to resolve
which is causing the compilation error.

I've tried with C++11 and C++14; same result. I've seen some discussion
elsewhere that this could be related to the -fopenmp flags here:
Perhaps there's something here which clashes with RcppEigen on windows?

Any help is appreciated. Here is the CRAN builds:

Best, Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20200919/73e968d3/attachment.html>

More information about the Rcpp-devel mailing list