tiagodc / TreeLS

R functions for processing individual tree TLS point clouds
GNU General Public License v3.0
82 stars 27 forks source link

Trouble Installing version 2.0.2 with R version 4.1.2 on Windows 10 #49

Closed no-resones closed 2 years ago

no-resones commented 2 years ago

Hi, hoping someone could kindly give a bit of assistance.

I keep running into the same error when trying to install TreeLS:

make: *** [C:/PROGRA~1/R/R-41~1.2/etc/x64/Makeconf:245: algorithms.o] Error 1
   ERROR: compilation failed for package 'TreeLS'
-  removing 'C:/Users/USERXX~1/AppData/Local/Temp/RtmpqKQbuw/Rinstde85c311c3/TreeLS'
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'TreeLS' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed

I've tried now with R versions 4.1.2 and 4.0.2 through RStudio 2021.09.2+382 "Ghost Orchid" Release to no avail. Additionally, I tried on a separate laptop and experienced the same issue. I have got RTools40 and checked that it is on the path. I have installed devtools and then followed the command to install as detailed in the documentation.

I'm extremely new to R so might need a bit of help in understanding how to get information that may help with troubleshooting this issue.

Thanks for any help!

npuletti commented 2 years ago

I have the same problem

R version 4.1.2 (2021-11-01) -- "Bird Hippie" Platform x86_64-w64-mingw32/x64 (64-bit)

amarcozzi commented 2 years ago

I'm also getting the same error

make: *** [/usr/lib/R/etc/Makeconf:177: algorithms.o] Error 1
   ERROR: compilation failed for package ‘TreeLS’
─  removing ‘/tmp/RtmpN3qT64/Rinst22742240060e71/TreeLS’
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'TreeLS' from GitHub:
  System command 'R' failed, exit status: 1, stdout & stderr were printed

with the following specifications:

R version 4.1.2 (2021-11-01) -- "Bird Hippie" Platform: x86_64-pc-linux-gnu (64-bit)

no-resones commented 2 years ago

The only workaround I've found so far is to install this archived .zip of the package and install it locally. You may come across some other dependencies that are required at points however.

https://mran.microsoft.com/snapshot/2020-09-11/web/packages/TreeLS/index.html

amarcozzi commented 2 years ago

Thanks for your help no-resones. I'm getting the same error as before. Maybe it's the same issue and I wasn't able to to see it, but I'm seeing this error now:

lgorithms.cpp: In function ‘std::vector<double> nmCylinderInit(std::vector<std::vector<double> >&)’:
algorithms.cpp:346:18: error: ‘PI’ was not declared in this scope
  346 |   double theta = PI/2;
      |                  ^~
bi0m3trics commented 2 years ago

I had to replace his PI with M_PI (per this) everywhere (e.g., methods.cpp, r_interface.cpp, utils.cpp, and algorithims.cpp) to get his code to compile on my univ. lab machines running windows and 4.1.2 and not get that error. My home windows machine it wasn't necessary.

Edit - I should have said, I have a fork in my repo where you might be able to install it from with these and a couple other changes. Also, I'm not game to address the issues created in the original repo (so please don't ask) but I do have enough students using TreeLS that I try and keep it working.

amarcozzi commented 2 years ago

Thanks so much @bi0m3trics! I applied your fix to my local code base and I was able to build the package successfully. I'm not sure what the author's procedure for contributions is, but I created a pull request with @bi0m3trics solution here: https://github.com/tiagodc/TreeLS/pull/50. Feel free to reach out if that pull request doesn't meet your contribution guidelines.

bi0m3trics commented 2 years ago

You're welcome. @amarcozzi . Also, as you can see, there was an active pull request already (I've yet to do it with my fork) and this package doesn't seem to be maintained anymore, and the author is largely unresponsive. :(

p.s. I've got four undergrads actively working on what I want to see in a TLS/MLS package as a stopgap and replacement for my longer-term needs. Once that's finished (this semester?) we'll be sharing and we can see if it fills the hole.

p.p.s I saw you were in Missoula and were (once?) a lolo hotshot. You know my good old friend Shawn Faiella?

amarcozzi commented 2 years ago

Shawn took over the superintendent role during my first year with the crew. He's a great leader. What a small world! If you know of any other firefighters with a knack for computers send them our way. I'd love to see more people with fire experience entering research positions.

Thank you again for your help, and I look forward to seeing your TLS package.

bi0m3trics commented 2 years ago

Yay. you have no idea how happy "He's a great leader" make me...

samshott commented 2 years ago

Hey all,

Just a forestry student interested in remote sensing here, trying to find a new way to play with an influx of LiDAR data available to me.

I've been trying to get some version of TreeLS to work for a many hours now, and I've just had no luck. I've tried installing through @bi0m3trics fork (thank you @bi0m3trics) with dependencies. uninstalling and reinstalling R, Rstudio, and Rtools40 multiple times. CHanging directories, but for some reason I keep getting a pages and pages of what I believe are errors, seemingly focused on the RcppEigen package. The final issue output I get is this:

::type' {aka 'vector(2) double'} [-Wignored-attributes] make: *** [C:/PROGRA~1/R/R-41~1.3/etc/i386/Makeconf:245: algorithms.o] Error 1 ERROR: compilation failed for package 'TreeLS' removing 'C:/Users/samer/Documents/R/win-library/4.1/TreeLS' Warning message: In i.p(...) : installation of package ‘C:/Users/__/AppData/Local/Temp/RtmpmEjWI0/file24547a964ea6/TreeLS_2.0.4.tar.gz’ had non-zero exit status

tiagodc commented 2 years ago

Hi everyone... TreeLS should be back online. Try out the devtools or remotes installer and it should work:

devtools::install_github('tiagodc/TreeLS')

Thank you all who kept using the package throughout my absence and especially the ones who took over supporting roles (shout-out to @bi0m3trics and @amarcozzi)!

The compilation error was fixed in commit bee0868.

The last couple years have been tough on many aspects, but I'll try to keep TreeLS afloat from now on. Can't guarantee any feature updates in the near future, but I'll make sure that at least the users are able to install and use it.

Cheers, Tiago