I am attempting to install lidR version 4.1.1. I currently have lidR version 4.0.4 loaded on R version 4.2.2 on a Mac OS Sonoma.
After selecting “yes” for downloading from sourced the package which needs compilation, it appears to download the binaries, but than has the following issue/error:
*ld: warning: -single_module is obsolete
ld: warning: -multiply_defined is obsolete
ld: warning: search path ‘/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0’ not found
ld: warning: search path ‘/usr/local/gfortran/lib’ not found
ld: library ‘gfortran’ not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lidR.so] Error 1
ERROR: compilation failed for package ‘lidR’
removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/lidR’
restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/lidR’
Warning in install.packages :
installation of package ‘lidR’ had non-zero exit status*
I have tried to trouble shooting by updating/checking Xcode and gdal using terminal/homebrew. I have also tried to make sure terra, sf, stars, and rgl are up to date and have the newest versions loaded. I’ve also used install.packages(“lidR”, dependencies = TRUE). So far that doesn’t seem to have resolved the issue. As I understand it, version 4.0.4 relies on the retired packages maptools, rgdal, and rgeos (which is why I think 4.0.4 is currently able to run on my computer).
Any advice is appreciate! Happy to follow up with more detail.