jlmelville / uwot

An R package implementing the UMAP dimensionality reduction method.
https://jlmelville.github.io/uwot/
GNU General Public License v3.0
322 stars 31 forks source link

Error on installing uwot under Microsoft R-4.1.2 #124

Open yingyin2019 opened 7 months ago

yingyin2019 commented 7 months ago

Hi, I'm trying to install uwot on my PC R-4.1.2. error message as following

devtools::install_github("jlmelville/uwot") Downloading GitHub repo jlmelville/uwot@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: Rcpp (1.0.11.6 -> 1.0.12) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3 -- R CMD build ----------------------------------------------------------------------------------------------------- v checking for file 'C:\Users\Administrator\AppData\Local\Temp\Rtmp0CF9cz\remotes6ed0454f3667\jlmelville-uwot-cd38605/DESCRIPTION' (437ms)

i hope someone may kindly help with my issue. regards, Ying

yingyin2019 commented 7 months ago

I also try to install it using source file, still get the same error ,

install.packages("E:/uwot_0.2.2.tar.gz", repos = NULL, type = "source")

  • installing source package 'uwot' ... package 'uwot' successfully unpacked and MD5 sums checked using non-staged installation ** libs

*** arch - i386 "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I../inst/include/ -I'C:/Program Files/R/R-4.1.2/library/dqrng/include' -I'C:/Program Files/R/R-4.1.2/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.2/library/RcppAnnoy/include' -I'C:/Program Files/R/R-4.1.2/library/RcppProgress/include' -DRCPP_NO_RTTI -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I../inst/include/ -I'C:/Program Files/R/R-4.1.2/library/dqrng/include' -I'C:/Program Files/R/R-4.1.2/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.2/library/RcppAnnoy/include' -I'C:/Program Files/R/R-4.1.2/library/RcppProgress/include' -DRCPP_NO_RTTI -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c connected_components.cpp -o connected_components.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I../inst/include/ -I'C:/Program Files/R/R-4.1.2/library/dqrng/include' -I'C:/Program Files/R/R-4.1.2/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.2/library/RcppAnnoy/include' -I'C:/Program Files/R/R-4.1.2/library/RcppProgress/include' -DRCPP_NO_RTTI -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c nn_parallel.cpp -o nn_parallel.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I../inst/include/ -I'C:/Program Files/R/R-4.1.2/library/dqrng/include' -I'C:/Program Files/R/R-4.1.2/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.2/library/RcppAnnoy/include' -I'C:/Program Files/R/R-4.1.2/library/RcppProgress/include' -DRCPP_NO_RTTI -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c perplexity.cpp -o perplexity.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I../inst/include/ -I'C:/Program Files/R/R-4.1.2/library/dqrng/include' -I'C:/Program Files/R/R-4.1.2/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.2/library/RcppAnnoy/include' -I'C:/Program Files/R/R-4.1.2/library/RcppProgress/include' -DRCPP_NO_RTTI -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c r_uwot.cpp -o r_uwot.o r_uwot.cpp: In member function 'std::unique_ptr UmapFactory::create_optimizer(Rcpp::List)': r_uwot.cpp:137:19: error: 'make_unique' is not a member of 'std' return std::make_unique(alpha, beta1, beta2, eps, ^~~ r_uwot.cpp:137:19: note: 'std::make_unique' is defined in header ''; did you forget to '#include '? r_uwot.cpp:31:1: +#include

r_uwot.cpp:137:19: return std::make_unique(alpha, beta1, beta2, eps, ^~~ r_uwot.cpp:137:41: error: expected primary-expression before '>' token return std::make_unique(alpha, beta1, beta2, eps, ^ r_uwot.cpp:137:50: warning: left operand of comma operator has no effect [-Wunused-value] return std::make_unique(alpha, beta1, beta2, eps, ^~~~~ r_uwot.cpp:137:57: warning: right operand of comma operator has no effect [-Wunused-value] return std::make_unique(alpha, beta1, beta2, eps, ^~~~~ r_uwot.cpp:137:64: warning: right operand of comma operator has no effect [-Wunused-value] return std::make_unique(alpha, beta1, beta2, eps, ^~~ r_uwot.cpp:138:63: warning: right operand of comma operator has no effect [-Wunused-value] head_embedding.size()); ^ r_uwot.cpp:145:19: error: 'make_unique' is not a member of 'std' return std::make_unique(alpha); ^~~ r_uwot.cpp:145:19: note: 'std::make_unique' is defined in header ''; did you forget to '#include '? r_uwot.cpp:145:40: error: expected primary-expression before '>' token return std::make_unique(alpha); ^ make: *** [C:/PROGRA~1/R/R-41~1.2/etc/i386/Makeconf:245: r_uwot.o] Error 1 ERROR: compilation failed for package 'uwot'

jlmelville commented 6 months ago

@yingyin2019 please upgrade R to the latest version (4.4.0). R 4.3.3 might also work.