-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation Problem: Failed to build PDFR 0.1.0 #6
Comments
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. |
Using 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 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.2.3 (2023-03-15)
#> os Ubuntu 22.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_US:en
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Atlantic/Canary
#> date 2023-04-04
#> pandoc 2.19.2 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.6.1 2023-03-23 [1] CRAN (R 4.2.3)
#> digest 0.6.31 2022-12-11 [1] RSPM (R 4.2.0)
#> evaluate 0.20 2023-01-17 [1] RSPM (R 4.2.0)
#> fastmap 1.1.1 2023-02-24 [1] RSPM (R 4.2.0)
#> fs 1.6.1 2023-02-06 [1] RSPM (R 4.2.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
#> htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.2.3)
#> knitr 1.42 2023-01-25 [1] CRAN (R 4.2.1)
#> lifecycle 1.0.3 2022-10-07 [1] RSPM (R 4.2.0)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
#> pak 0.4.0 2023-01-15 [1] RSPM (R 4.2.0)
#> purrr 1.0.1 2023-01-10 [1] RSPM (R 4.2.0)
#> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0)
#> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0)
#> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0)
#> R.utils 2.12.2 2022-11-11 [1] RSPM (R 4.2.0)
#> reprex 2.0.2 2022-08-17 [1] RSPM (R 4.2.0)
#> rlang 1.1.0 2023-03-14 [1] RSPM (R 4.2.0)
#> rmarkdown 2.21 2023-03-26 [1] RSPM (R 4.2.0)
#> rstudioapi 0.14 2022-08-22 [1] RSPM (R 4.2.0)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0)
#> styler 1.9.1 2023-03-04 [1] RSPM (R 4.2.0)
#> vctrs 0.6.1 2023-03-22 [1] CRAN (R 4.2.3)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0)
#> xfun 0.38 2023-03-24 [1] CRAN (R 4.2.3)
#> yaml 2.3.7 2023-01-23 [1] RSPM (R 4.2.0)
#>
#> [1] /home/emrys/R/x86_64-pc-linux-gnu-library/4.2
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
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 |
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
ℹ Getting 1 pkg with unknown size
✔ Got PDFR 0.1.0 (source) (2.07 MB)
✔ Downloaded 1 package (2.07 MB)in 1.9s
ℹ Packaging PDFR 0.1.0
✔ Packaged PDFR 0.1.0 (17.9s)
ℹ Building 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:
** using non-staged installation via StagedInstall field
** libs
g++ -std=gnu++11 -I"C:/PROGRA
1/R/R-421.3/include" -DNDEBUG -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/testthat/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.og++ -std=gnu++11 -I"C:/PROGRA
1/R/R-421.3/include" -DNDEBUG -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/testthat/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -Wall -pedantic -fdiagnostics-color=always -c adobetounicode.cpp -o adobetounicode.og++ -std=gnu++11 -I"C:/PROGRA
1/R/R-421.3/include" -DNDEBUG -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/sbalakrishnan/AppData/Local/R/win-library/4.2/testthat/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -Wall -pedantic -fdiagnostics-color=always -c box.cpp -o box.oIn file included from box.cpp:13
box.h:n constructor 'Box::Box(std::vector)
box.h:119:40:error: runtime_erroris not a member of 'std
119 | if (floats.size() != 4) throw std::runtime_error needs four floats");
| ^~~~~~~~~~~~~
box.h:n member function 'float Box::Edge(int) const
box.h:145:27:error: runtime_erroris not a member of 'std
145 | default: throw std::runtime_erroralid box index");
| ^~~~~~~~~~~~~
make: *** [C:/PROGRA
1/R/R-421.3/etc/x64/Makeconf:260: box.o] Error 1ERROR: compilation failed for package 'PDFR'
Type .Last.error to see the more details.
The text was updated successfully, but these errors were encountered: