r-lib / clock

A Date-Time Library for R
https://clock.r-lib.org
Other
97 stars 4 forks source link

An error occurs with quarterly-year-quarter-day.o #308

Closed zhzhou closed 1 year ago

zhzhou commented 1 year ago

In my computer, the following error occurs repeatly.

I use Ubuntu18.04, R 4.2.2, cpp11 0.4.3, rlang 1.0.6, vctrs 0.5.0 and tzdb 0.3.0.

install.packages("~/zzh/Forecasting/clock-0.6.1.tar.gz", repos = NULL, type = "source") Installing package into ‘/home/wifi/R/x86_64-pc-linux-gnu-library/4.2’ (as ‘lib’ is unspecified) Warning in untar2(tarfile, files, list, exdir, restore_times) : skipping pax global extended headers

  • installing source package ‘clock’ ... using staged installation libs g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c cpp11.cpp -o cpp11.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c duration.cpp -o duration.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c enums.cpp -o enums.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c format.cpp -o format.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c gregorian-year-day.cpp -o gregorian-year-day.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c gregorian-year-month-day.cpp -o gregorian-year-month-day.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c gregorian-year-month-weekday.cpp -o gregorian-year-month-weekday.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c iso-year-week-day.cpp -o iso-year-week-day.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c naive-time.cpp -o naive-time.o g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -I'/usr/lib/R/site-library/tzdb/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-ZLat0n/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c quarterly-year-quarter-day.cpp -o quarterly-year-quarter-day.o g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-7/README.Bugs for instructions. /usr/lib/R/etc/Makeconf:178: recipe for target 'quarterly-year-quarter-day.o' failed make: *** [quarterly-year-quarter-day.o] Error 4 ERROR: compilation failed for package ‘clock’
  • removing ‘/home/wifi/R/x86_64-pc-linux-gnu-library/4.2/clock’ Warning in install.packages : installation of package ‘/home/wifi/zzh/Forecasting/clock-0.6.1.tar.gz’ had non-zero exit status
DavisVaughan commented 1 year ago

I think it is likely you just ran out of memory while compiling https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus

How much RAM do you have on your computer?

I've managed to compile clock on a rather weak windows computer with 8gb of ram, so this is a little surprising

zhzhou commented 1 year ago

I think it is likely you just ran out of memory while compiling https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus

How much RAM do you have on your computer?

I've managed to compile clock on a rather weak windows computer with 8gb of ram, so this is a little surprising

Hi,

Thanks for your replay.

The system is ran with 12GB. Is there any operation that can provide more detailed error information? Or is dependence missed?

DavisVaughan commented 1 year ago

Do you happen to have an .Renviron file with MAKEFLAGS=-j8 or something similar? usethis::edit_r_environ() will likely open your .Renviron file

DavisVaughan commented 1 year ago

Have you also tried compiling it when R / RStudio is the only application open on your computer?

zhzhou commented 1 year ago

There is nothing in the .Renviron. I restart the system and just open RStudio. The problem is stll there.

DavisVaughan commented 1 year ago

This is definitely strange because that error typically means you ran out of RAM along the way, but the GitHub Actions Linux runners that we build on only have 7gb of RAM and it has always worked fine https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

DavisVaughan commented 1 year ago

I haven't seen this reported by anyone else, so in an effort to keep the Issues page a useful place for package maintenance, I'm going to close this