Jean-Romain / lidRplugins

Extra functions and algorithms for lidR package
42 stars 15 forks source link

Installation Error: lidR/Point.h: No such file or directory #13

Closed azh2 closed 3 years ago

azh2 commented 3 years ago

I am getting the following fatal error which is preventing package compilation, I received the same error trying to build the package manually in RStudio:

C_lastree_hamraz.cpp:2:10: fatal error: lidR/Point.h: No such file or directory

include <lidR/Point.h>

      ^~~~~~~~~~~~~~

compilation terminated.

See Below:

> remotes::install_github("Jean-Romain/lidRplugins")

Downloading GitHub repo Jean-Romain/lidRplugins@HEAD
Skipping 1 packages not available: EBImage
...

Note: EBImage is available in R 4.0+ using BiocManager::install("EBImage")

cont(...)
√  checking for file 'C:\Users\user\AppData\Local\Temp\RtmpmKqKUg\remotes33c412ff29\Jean-Romain-lidRplugins-b2699de/DESCRIPTION' (360ms)
-  preparing 'lidRplugins': (734ms)
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'lidRplugins_0.3.0.tar.gz'

Installing package into ‘C:/Users/user/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'lidRplugins' ...
** using staged installation
** libs

*** arch - i386
"C:/rtools40/mingw32/bin/"g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.3/include" -DNDEBUG  -I'C:/Users/user/Documents/R/win-library/4.0/BH/include' -I'C:/Users/user/Documents/R/win-library/4.0/Rcpp/include' -I'C:/Users/user/Documents/R/win-library/4.0/RcppArmadillo/include' -I'C:/Users/user/Documents/R/win-library/4.0/lidR/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c C_lastree_hamraz.cpp -o C_lastree_hamraz.o
**C_lastree_hamraz.cpp:2:10: fatal error: lidR/Point.h: No such file or directory*
 #include <lidR/Point.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [C:/PROGRA~1/R/R-40~1.3/etc/i386/Makeconf:229: C_lastree_hamraz.o] Error 1
ERROR: compilation failed for package 'lidRplugins'
* removing 'C:/Users/user/Documents/R/win-library/4.0/lidRplugins'
Error: Failed to install 'lidRplugins' from GitHub:
  (converted from warning) installation of package ‘C:/Users/user/AppData/Local/Temp/RtmpmKqKUg/file33c46fc75fe3/lidRplugins_0.3.0.tar.gz’ had non-zero exit status

Traceback:

> traceback()
7: stop(remote_install_error(remotes[[i]], e))
6: value[[3L]](cond)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
4: tryCatchList(expr, classes, parentenv, handlers)
3: tryCatch(res[[i]] <- install_remote(remotes[[i]], ...), error = function(e) {
       stop(remote_install_error(remotes[[i]], e))
   })
2: install_remotes(remotes, auth_token = auth_token, host = host, 
       dependencies = dependencies, upgrade = upgrade, force = force, 
       quiet = quiet, build = build, build_opts = build_opts, build_manual = build_manual, 
       build_vignettes = build_vignettes, repos = repos, type = type, 
       ...)
1: remotes::install_github("Jean-Romain/lidRplugins")

Session Info:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] ps_1.5.0          fansi_0.4.1       prettyunits_1.1.1 rprojroot_2.0.2   withr_2.4.0       crayon_1.3.4     
 [7] assertthat_0.2.1  R6_2.5.0          git2r_0.28.0      cli_2.2.0         curl_4.3          remotes_2.2.0    
[13] rstudioapi_0.13   callr_3.5.1       tools_4.0.3       glue_1.4.2        yaml_2.2.1        compiler_4.0.3   
[19] processx_3.4.5    pkgbuild_1.2.0  
azh2 commented 3 years ago

Need lidR 3.1.0 (Not available on CRAN)

remotes::install_github("Jean-Romain/lidR")
Jean-Romain commented 3 years ago

lidR 3.1.0 is on its way on CRAN and will be available on windows within few days