dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

Build failed: ‘median’ was not declared in this scope #74

Closed MatteaE closed 5 years ago

MatteaE commented 5 years ago

R 3.4.4, Kubuntu 16.04.05. The error is: reductions.cpp:226:35: error: ‘median’ was not declared in this scope The full log of command install.packages("imager") is attached. buildLog.txt

dahtah commented 5 years ago

This is a strange one - can you please update Rcpp, try again, and report back?

MatteaE commented 5 years ago

When I run update.packages() I get [...] Warning: package 'Rcpp' in library '/usr/lib/R/site-library' will not be updated [...] Should I use another command?

In fact I just got the github version of imager, which compiles perfectly.

dahtah commented 5 years ago

It means Rcpp was installed as an apt package, and stored in the system-wide library, which only root can change. In this case it's easier to use the CRAN PPA to keep things up-to-date, see https://cran.r-project.org/bin/linux/ubuntu/#installation.