Open pvsundar opened 1 year ago
Same error on Ubuntu 22.04 and RStudio 2023.03.1 Build 419
Shoot. I hope this isn't something I introduced with my pull request @AllanCameron. I will say that a colleague of mine also wasn't able to install on Windows even before my PR. FWIW – I am able to install PDFR on OSX.
@gorkang @pvsundar Can you try again but set dependencies = TRUE
for pkg_install()
just to make sure that isn’t the issue?
Using pak::pkg_install("AllanCameron/PDFR", dependencies = TRUE)
got this:
pak::pkg_install("AllanCameron/PDFR", dependencies = TRUE)
#> ℹ Loading metadata database
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#> ✔ Loading metadata database ... done
#>
#>
#>
#> → Will install 1 package.
#> → Will install 1 package.
#> → Will download 1 package with unknown size.
#> → Will download 1 package with unknown size.
#> + PDFR 0.1.0 [bld][cmp][dl] (GitHub: 9d9806c)
#> + PDFR 0.1.0 [bld][cmp][dl] (GitHub: 9d9806c)
#> ℹ Getting 1 pkg with unknown size
#> ℹ Getting 1 pkg with unknown size
#> ✔ Cached copy of PDFR 0.1.0 (source) is the latest build
#> ✔ Cached copy of PDFR 0.1.0 (source) is the latest build
#> ℹ Packaging PDFR 0.1.0
#> ℹ Packaging PDFR 0.1.0
#> ✔ Packaged PDFR 0.1.0 (848ms)
#> ✔ Packaged PDFR 0.1.0 (848ms)
#> ℹ Building PDFR 0.1.0
#> ℹ Building PDFR 0.1.0
#> ✖ Failed to build PDFR 0.1.0
#> ✖ Failed to build PDFR 0.1.0
#> Error: ! error in pak subprocess
#> Caused by error in `stop_task_build(state, worker)`:
#> ! Failed to build source package 'PDFR'
#> Full installation output:
#> * installing *source* package ‘PDFR’ ...
#> ** using non-staged installation via StagedInstall field
#> ** libs
#> g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/testthat/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-LhKvHL/r-base-4.2.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -pedantic -c RcppExports.cpp -o RcppExports.o
#> g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/testthat/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-LhKvHL/r-base-4.2.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -pedantic -c adobetounicode.cpp -o adobetounicode.o
#> g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/Rcpp/include' -I'/home/emrys/R/x86_64-pc-linux-gnu-library/4.2/testthat/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-LhKvHL/r-base-4.2.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -pedantic -c box.cpp -o box.o
#> In file included from box.cpp:13:
#> box.h: In constructor ‘Box::Box(std::vector<float>)’:
#> box.h:119:40: error: ‘runtime_error’ is not a member of ‘std’
#> 119 | if (floats.size() != 4) throw std::runtime_error("Box needs four floats");
#> | ^~~~~~~~~~~~~
#> box.h: In member function ‘float Box::Edge(int) const’:
#> box.h:145:27: error: ‘runtime_error’ is not a member of ‘std’
#> 145 | default: throw std::runtime_error("Invalid box index");
#> | ^~~~~~~~~~~~~
#> make: *** [/usr/lib/R/etc/Makeconf:178: box.o] Error 1
#> ERROR: compilation failed for package ‘PDFR’
#> * removing ‘/tmp/RtmpBNNwTD/pkg-lib3200739754bf/PDFR’
Created on 2023-04-04 with reprex v2.0.2
Thanks @gorkang. I have a Windows machine at work I can use to to figure out the issue (a good excuse to get more familiar with Rcpp and C++) sometime in the next few weeks. I'll share an update here and open a pull request if I make any progress, @AllanCameron.
I tried installing my fork on a Windows machine this afternoon and I'm getting the same error pointing to an issue with box.cpp
. With my very limited understanding of Rcpp and C++, I don't think I'll be able to address this issue but hopefully @AllanCameron may find the opportunity to come back to it in the future.
I am using the latest release of R Studio on a Surface Pro 7. Windows 10. RStudio 2023.03.0+386 "Cherry Blossom" Release (3c53477afb13ab959aeb5b34df1f10c237b256c3, 2023-03-09) for Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.03.0+386 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36
install.packages("pak") Installing package into 'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2' (as 'lib' is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/pak_0.4.0.zip' Content type 'application/zip' length 11106824 bytes (10.6 MB) downloaded 10.6 MB
package 'pak' successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\sbalakrishnan\AppData\Local\Temp\Rtmp6bsTg6\downloaded_packages