odelmarcelle / sentopics

GNU General Public License v3.0
7 stars 2 forks source link

installation failure, Error unable to collate and parse R files #1

Closed ongch closed 2 years ago

ongch commented 2 years ago

Dear OdelMarcelle, I've attempted to install current and previous (0.6.2 & 0.6.1) versions from CRAN and using tar.gz all of which resulted in the above error message. I have also re-installed the pre-requisite & suggested associated packages. I am using R 4.0.4 and installing via R Studio.

Below is the installation messages. Any suggestion would be appreciated. Thanks. Chris

"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -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-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c fast_rdist.cpp -o fast_rdist.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c math_func.cpp -o math_func.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c model.cpp -o model.o "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c polya_fit_simple.cpp -o polya_fit_simple.o C:/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o sentopics.dll tmp.def RcppExports.o fast_rdist.o math_func.o model.o polya_fit_simple.o -fopenmp -LC:/PROGRA~1/R/R-40~1.4/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-40~1.4/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-40~1.4/bin/i386 -lR installing to C:/Program Files/R/R-4.0.4/library/00LOCK-sentopics/00new/sentopics/libs/i386

arch - x64 "C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o "C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c fast_rdist.cpp -o fast_rdist.o "C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c math_func.cpp -o math_func.o "C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c model.cpp -o model.o "C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.4/include" -DNDEBUG -I'C:/Program Files/R/R-4.0.4/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.4/library/RcppArmadillo/include' -I'C:/Program Files/R/R-4.0.4/library/RcppProgress/include' -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c polya_fit_simple.cpp -o polya_fit_simple.o C:/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o sentopics.dll tmp.def RcppExports.o fast_rdist.o math_func.o model.o polya_fit_simple.o -fopenmp -LC:/PROGRA~1/R/R-40~1.4/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-40~1.4/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-40~1.4/bin/x64 -lR installing to C:/Program Files/R/R-4.0.4/library/00LOCK-sentopics/00new/sentopics/libs/x64 R Error in parse(outFile) : C:/Users/ongc.9/AppData/Local/Temp/RtmpMXvlvk/R.INSTALLa31057ec40e7/sentopics/R/models.R:139:86: unexpected '>' 138: zero <- setdiff(1:x$L2, as.integer(x$vocabulary$lexicon[i])) 139: zeros <- sapply(zero, function(j) j + (1:x$L1 - 1) x$L2, USE.NAMES = FALSE) |> ^ ERROR: unable to collate and parse R files for package 'sentopics'

odelmarcelle commented 2 years ago

Thank you for reporting the issue! It looks like I misspecified the package's requirements.

I required R version 4.0 or later for the package but I used the newer base pipe |> introduced by R version 4.1. This is the cause of the error.

I modified the code to remove the usage of |> and ensure compatibility with previous versions of R. You can download the patched version of sentopics from GitHub using

library(devtools)
install_github("odelmarcelle/sentopics")

or wait until I upload the modified package on CRAN in the following days.

ongch commented 2 years ago

Hi odelmarcelle, Thanks for the quick response. Confirming that I am now able to install sentopics with R4.04.

If you like I can also provide some feedback on the usefulness of the package with my use-case. Thanks again.

odelmarcelle commented 2 years ago

Sure! Any feedback is of course very welcome :slightly_smiling_face: