Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Can't compile using RStudio on Windows 10 #123

Open
DmitryKishkinev opened this issue Feb 18, 2020 · 5 comments
Open

Can't compile using RStudio on Windows 10 #123

DmitryKishkinev opened this issue Feb 18, 2020 · 5 comments

Comments

@DmitryKishkinev
Copy link

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:/PROGRA1/R/R-361.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:/PROGRA1/R/R-361.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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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

@DmitryKishkinev
Copy link
Author

ok will try the whole procedure at Ubuntu.

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

@ShotaOchi
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants