dahtah / imager

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

Can't compile using RStudio on Windows 10 #123

Open DmitryKishkinev opened 4 years ago

DmitryKishkinev commented 4 years ago

This is what I see in RStudio 1.2.5033 terminal (Windows 10, R version 3.6.2)

shell("R CMD build imager")

  • checking for file 'imager/DESCRIPTION' ... OK
  • preparing 'imager':
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • installing the package to build vignettes

  • installing source package 'imager' ... ** using staged installation

WARNING: this package has a configure script It probably needs manual configuration


** libs C:/RBuildTools/3.5/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.2/include" -DNDEBUG -I../inst/include -DSTRICT_R_HEADERS -Dcimg_use_r -DCIMG_COMPILING -Dcimg_use_fftw3_singlethread -Dcimg_use_tiff -Dcimg_use_rng -Dcimg_verbosity=1 -fpermissive -I/include -I/include -fopenmp -I"C:/Users/dmitr/OneDrive/Documents/R/win-library/3.6/Rcpp/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o In file included from RcppExports.cpp:4:0: ../inst/include/imager.h:4:0: warning: "STRICT_R_HEADERS" redefined

define STRICT_R_HEADERS

^

:0:0: note: this is the location of the previous definition In file included from ../inst/include/imager.h:26:0, from RcppExports.cpp:4: ../inst/include/CImg.h:298:20: error: operator '!=' has no left operand #if cimg_use_openmp!=0 ^ ../inst/include/CImg.h:311:48: error: operator '&&' has no right operand #if defined(cimg_abort_test) && cimg_use_openmp!=0 ^ ../inst/include/CImg.h:476:20: fatal error: tiffio.h: No such file or directory #include "tiffio.h" ^ compilation terminated. make: *** [C:/PROGRA~1/R/R-36~1.2/etc/x64/Makeconf:215: RcppExports.o] Error 1 ERROR: compilation failed for package 'imager' * removing 'C:/Users/dmitr/AppData/Local/Temp/RtmpWedDDA/Rinst2d1c401e7f3a/imager' ----------------------------------- ERROR: package installation failed Warning message: In shell("R CMD build imager") : 'R CMD build imager' execution failed with error code 1
ShotaOchi commented 4 years ago

Where did you get imager from? The master branch of dahtah/imager is unstable now. You can get the package source of the stable version from https://cran.r-project.org/src/contrib/imager_0.42.1.tar.gz

Additionally, you have to put tiffio.h in the include path.

DmitryKishkinev commented 4 years ago

Where did you get imager from? The master branch of dahtah/imager is unstable now. You can get the package source of the stable version from https://cran.r-project.org/src/contrib/imager_0.42.1.tar.gz

Additionally, you have to put tiffio.h in the include path.

Ok will try cran version (tried from github before)

Where and how should I put tiffio.h? What is the include path (sorry never heard of)?

ShotaOchi commented 4 years ago

Building imager on Windows is painful. I suggest working on Linux if you are not familiar with C/C++.

DmitryKishkinev commented 4 years ago

ok will try the whole procedure at Ubuntu.

nevertheless how could i include tiffio.h in path on windows? thanks

ShotaOchi commented 4 years ago

Learn C/C++ if you want to build imager on Windows. Don't forget this repository is not for education.