Hi, I tried unsuccessfully to install the v1.12.0 (13 Jan 2019) data.table
package in Trisquel GNU/Linux system. I have the sessionInfo information at the bottom of this issue.
Please see the installation log below:
> install.packages("data.table")
Installing package into ‘/x86_64-pc-linux-gnu-library/library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.12.0.tar.gz'
Content type 'application/x-gzip' length 3311096 bytes (3.2 MB)
==================================================
downloaded 3.2 MB
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c assign.c -o assign.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c between.c -o between.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c bmerge.c -o bmerge.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c chmatch.c -o chmatch.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c dogroups.c -o dogroups.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fastmean.c -o fastmean.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fcast.c -o fcast.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fmelt.c -o fmelt.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c forder.c -o forder.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c frank.c -o frank.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fread.c -o fread.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c freadR.c -o freadR.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c froll.c -o froll.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c frollR.c -o frollR.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c frolladaptive.c -o frolladaptive.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fsort.c -o fsort.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fwrite.c -o fwrite.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c fwriteR.c -o fwriteR.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c gsumm.c -o gsumm.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c ijoin.c -o ijoin.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c init.c -o init.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c inrange.c -o inrange.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c nqrecreateindices.c -o nqrecreateindices.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c openmp-utils.c -o openmp-utils.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c quickselect.c -o quickselect.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c rbindlist.c -o rbindlist.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c reorder.c -o reorder.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c shift.c -o shift.o
ccache gcc -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -std=gnu99 -c subset.c -o subset.o
subset.c: In function ‘subsetVectorRaw’:
subset.c:36:105: error: stray ‘#’ in program
PARLOOP(NA_INTEGER)
^
subset.c:36:106: error: unknown type name ‘pragma’
PARLOOP(NA_INTEGER)
^
subset.c:36:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_INTEGER)
^
subset.c:36:16: error: ‘i’ undeclared (first use in this function)
PARLOOP(NA_INTEGER)
^
subset.c:36:16: note: each undeclared identifier is reported only once for each function it appears in
subset.c:36:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_INTEGER)
^
subset.c:36:24: error: expected statement before ‘)’ token
subset.c:42:124: error: stray ‘#’ in program
PARLOOP(INT64_MIN)
^
subset.c:42:125: error: unknown type name ‘pragma’
PARLOOP(INT64_MIN)
^
subset.c:42:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected ‘;’ before ‘)’ token
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected statement before ‘)’ token
subset.c:46:106: error: stray ‘#’ in program
PARLOOP(NA_REAL)
^
subset.c:46:107: error: unknown type name ‘pragma’
PARLOOP(NA_REAL)
^
subset.c:46:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected statement before ‘)’ token
subset.c:76:105: error: stray ‘#’ in program
PARLOOP(NA_CPLX)
^
subset.c:76:106: error: unknown type name ‘pragma’
PARLOOP(NA_CPLX)
^
subset.c:76:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_CPLX)
^
subset.c:76:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_CPLX)
^
subset.c:76:24: error: expected statement before ‘)’ token
subset.c:81:99: error: stray ‘#’ in program
PARLOOP(0)
^
subset.c:81:100: error: unknown type name ‘pragma’
PARLOOP(0)
^
subset.c:81:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(0)
^
subset.c:81:24: error: expected ‘;’ before ‘)’ token
PARLOOP(0)
^
subset.c:81:24: error: expected statement before ‘)’ token
make: *** [subset.o] Error 1
ERROR: compilation failed for package ‘data.table’
Output of sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Trisquel GNU/Linux Belenos (7.0)
Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] graphics grDevices datasets stats utils methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2
Hello,
I am also having trouble installing data.table in Linux with the following error:
gcc -std=gnu99 -I"/share/ClusterShare/software/contrib/seyyaz/R-v3.5.1/lib64/R/include" -DNDEBUG -I/share/ClusterShare/software/contrib/seyyaz/zlib-1.2.11/include -I/share/ClusterShare/software/contrib/seyyaz/bzip2-1.0.6/include -I/share/ClusterShare/software/contrib/seyyaz/xz-5.2.4/include -I/share/ClusterShare/software/contrib/seyyaz/pcre-8.42/include -I//share/ClusterShare/software/contrib/seyyaz/curl-7.63.0/include -fopenmp -fpic -g -O2 -c forder.c -o forder.o
forder.c: In function 'range_str':
forder.c:296: error: expected end of line before 'update'
make: *** [forder.o] Error 1
ERROR: compilation failed for package 'data.table'
* removing '/share/ClusterShare/software/contrib/seyyaz/R_libs/data.table'
* restoring previous '/share/ClusterShare/software/contrib/seyyaz/R_libs/data.table'
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.8 (Final)
Matrix products: default
BLAS: /share/ClusterShare/software/contrib/seyyaz/R-v3.5.1/lib64/R/lib/libRblas.so
LAPACK: /share/ClusterShare/software/contrib/seyyaz/R-v3.5.1/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] usethis_1.4.0 devtools_2.0.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 ps_1.3.0 prettyunits_1.0.2 rprojroot_1.3-2
[5] withr_2.1.2 digest_0.6.18 crayon_1.3.4 assertthat_0.2.0
[9] R6_2.3.0 backports_1.1.3 magrittr_1.5 rlang_0.3.1
[13] cli_1.0.1 curl_3.3 fs_1.2.6 remotes_2.0.2
[17] callr_3.1.1 desc_1.2.0 tools_3.5.1 glue_1.3.0
[21] pkgload_1.0.2 compiler_3.5.1 processx_3.2.1 pkgbuild_1.0.2
[25] BiocManager_1.30.4 sessioninfo_1.1.1 memoise_1.1.0
please report also version of your compilers, something like gcc --version
Mine was gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17). I have also compiled one version with gcc-7.3.0 and it gives an error too
It seems to be related to CentOS. I had the same issue as s-yazar on a brand new R install.
The problem was solved by upgrading gcc to 4.9.0.
@Huitziii thanks for feedback. Still it is strange that @s-yazar is getting error on gcc-7.3 while for you upgrade to gcc-4.9 resolved the problem. We don't have environment on hand to reproduce that issue at the moment.
Hi @jangorecki,
I went back and recompiled R 3.5.1 with gcc-7.3 again. This time installed data.table without a problem. Not sure what has caused the earlier error.
@s-yazar thanks for feedback.
So as of now @s-yazar and @Huitziii compilation error has been solved by upgrading compiler.
@iembry are you able to upgrade your compiler?
@iembry please lets us know if upgrading compiler resolved the problem, if not I will re-open this issue.
I ran into the same issue on a RedHat system running gcc v4.4.7 - I installed devtoolset-2
as described here: https://unix.stackexchange.com/a/125621 since the 'standard' RedHat gcc on this distro is still v4.4.7, so yum update didn't do anything (I also had to download and install the GPG key as listed in this comment)
devtoolset-2
contains a bunch of stuff, including a newer gcc v4.8.2, enable that environment:
source scl_source enable devtoolset-2
and then you have gcc v4.8.2, and then the installation of data.table v1.1.2.0 worked.
@philippbayer thanks for feedback
@jangorecki I'm sorry for my super delayed response, but no, I am not able to upgrade my compiler until I upgrade my computer and upgrade my distribution. I have a much older version of gcc compiler, but I don't remember which version it is right now.
Is it possible for you to place a gcc compiler > version on the CRAN page for data.table?
Thank you.
Shipping a version of data table which won't compile on a fully updated version of the latest redhat OS seems like a pretty unfriendly move. Making people install a new compiler from a non core repository for a brand new install isn't a great experience.
Is there really no patch which would allow the code to still work under gcc 4.4.7?
@s-andrews according to https://access.redhat.com/solutions/19458 recent one is RHEL7 and is shipped with gcc 4.8.x. What is your OS version?
According to comment above it compiles well on gcc 4.8.2. Note that 4.8.2 is almost 6 years old.
At the same time our R dependency is at least R 3.1 which is 5 years old. So we can say that we are more backward compatible with gcc than R.
@iembry sorry for late response, I missed your comment before. I am not sure if it is feasible as gcc is not necessary to compile data.table, there are many others compilers, thus listing just gcc in DESCRIPTION doesn't look appropriate.
@jangorecki Sorry, I'm being an idiot. The server I was on is apparently still running Redhat 6, which I have no problem in not being supported. It's great that it still works out of the box on 7.
@jangorecki It's OK about your delayed response. I understand your point about gcc not being the only compiler. Thank you for responding back.
I'm getting the same error when installing data.table. Here's the output of sessionInfo()
:
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 8 (jessie)
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3
My gcc version is gcc (Debian 4.9.2-10+deb8u2) 4.9.2, which should be fine according to the comments above.
I'd try updating gcc, but I don't have root permissions.
Could you provide install log output?
Here's the output (it's pretty much the same as in the original post):
> install.packages("data.table", repos="http://cran.cnr.berkeley.edu/")
Installing package into ‘/home/jcasti15/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/data.table_1.12.2.tar.gz'
Content type 'application/x-gzip' length 3343698 bytes (3.2 MB)
==================================================
downloaded 3.2 MB
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c assign.c -o assign.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c between.c -o between.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c bmerge.c -o bmerge.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c chmatch.c -o chmatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c dogroups.c -o dogroups.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fastmean.c -o fastmean.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fcast.c -o fcast.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fmelt.c -o fmelt.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c forder.c -o forder.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c frank.c -o frank.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fread.c -o fread.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c freadR.c -o freadR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c froll.c -o froll.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c frollR.c -o frollR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c frolladaptive.c -o frolladaptive.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fsort.c -o fsort.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fwrite.c -o fwrite.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c fwriteR.c -o fwriteR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c gsumm.c -o gsumm.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c ijoin.c -o ijoin.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c inrange.c -o inrange.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c nqrecreateindices.c -o nqrecreateindices.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c openmp-utils.c -o openmp-utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c quickselect.c -o quickselect.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c rbindlist.c -o rbindlist.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c reorder.c -o reorder.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c shift.c -o shift.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=
format-security -D_FORTIFY_SOURCE=2 -g -c subset.c -o subset.o
subset.c: In function ‘subsetVectorRaw’:
subset.c:36:105: error: stray ‘#’ in program
PARLOOP(NA_INTEGER)
^
subset.c:36:106: error: unknown type name ‘pragma’
PARLOOP(NA_INTEGER)
^
subset.c:36:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_INTEGER)
^
subset.c:36:16: error: ‘i’ undeclared (first use in this function)
PARLOOP(NA_INTEGER)
^
subset.c:36:16: note: each undeclared identifier is reported only once for each function it appears in
subset.c:36:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_INTEGER)
^
subset.c:36:24: error: expected statement before ‘)’ token
subset.c:42:124: error: stray ‘#’ in program
PARLOOP(INT64_MIN)
^
subset.c:42:125: error: unknown type name ‘pragma’
PARLOOP(INT64_MIN)
^
subset.c:42:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected ‘;’ before ‘)’ token
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected statement before ‘)’ token
subset.c:46:106: error: stray ‘#’ in program
PARLOOP(NA_REAL)
^
subset.c:46:107: error: unknown type name ‘pragma’
PARLOOP(NA_REAL)
^
subset.c:46:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected statement before ‘)’ token
subset.c:81:105: error: stray ‘#’ in program
PARLOOP(NA_CPLX)
^
subset.c:81:106: error: unknown type name ‘pragma’
PARLOOP(NA_CPLX)
subset.c:81:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_CPLX)
^
subset.c:81:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_CPLX)
^
subset.c:81:24: error: expected statement before ‘)’ token
subset.c:86:99: error: stray ‘#’ in program
PARLOOP(0)
^
subset.c:86:100: error: unknown type name ‘pragma’
PARLOOP(0)
^
subset.c:86:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(0)
^
subset.c:86:24: error: expected ‘;’ before ‘)’ token
PARLOOP(0)
^
subset.c:86:24: error: expected statement before ‘)’ token
/usr/lib/R/etc/Makeconf:163: recipe for target 'subset.o' failed
make: *** [subset.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/home/jcasti15/R/x86_64-pc-linux-gnu-library/3.5/data.table’
The downloaded source packages are in
‘/tmp/RtmpGCrGt9/downloaded_packages’
According to @jc-castillo issue has been reproduced with gcc 4.9.2 on Debian jessie. As of now we want to depend on gcc 4.8.2+, thus re-opening.
Anyone has an idea if there is any way to dump gcc version to console at the start of package installation? It might happen that newer gcc is installed but due to machine configuration older gcc is being used for installing package. Would be useful to double check this.
@jangorecki
issue has been reproduced with gcc 4.9.2 on Debian jessie. As of now we want to depend on gcc 4.8.2+, thus re-opening.
If the issue is reproduced with gcc 4.9.2, why do we want to depend on an even earlier version of gcc (4.8.2+) ?
From multiple past reports we observed that 4.8.2+ was recent enough. There is only this single report that doesn't fit here. Before stating dependency on 4.9.2 (or later) it would be best to double check which version is actually used during installation.
@jc-castillo can you confirm your output of gcc --version
please to double-check. See @jangorecki's comment above.
~/.R/Makevars
could eventually override gcc --version
during installation from R, could you please check that also? if you don't have this file it should be fine then.
@mattdowle does Makevars affects configure scripts already? or just pkg src compilation? we could maybe add a print from configure script so debugging such issues will be easier having gcc version in 00install.out.
@jangorecki gcc --version
printed in configure
sounds good. Needs to wrapped so that if gcc is not available it doesn't cause configure
to fail. The user may be using a different compiler and not have gcc
installed. R-exts section 1.2 mentions R CMD config
which may be helpful to emit from configure
too.
@jc-castillo could you please re-try to install latest devel version in the same environment it failed before? we added extra output for gcc version to ensure which version is being used by R process to compile package sources.
I am closing this issue and the only thing to investigate was report by @jc-castillo and he is not responding anymore. Installation now prints gcc version, so we can more precisely debug which gcc version is being used during compilation. @jc-castillo please let us know if this issue still affects you, we can always re-open this issue.
When installing data.table for the current r-devel I'm also having the same issue in GNU/Linux Mint 17.3 Cinnamon 64-bit.
Below is my output:
install.packages("data.table")
Installing package into ‘/usr/local/lib/R-devel/lib/R/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.dcc.uchile.cl/src/contrib/data.table_1.12.8.tar.gz'
Content type 'application/x-gzip' length 4948391 bytes (4.7 MB)
==================================================
downloaded 4.7 MB
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** using staged installation
zlib 1.2.8 is available ok
** libs
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c assign.c -o assign.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c between.c -o between.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c bmerge.c -o bmerge.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c chmatch.c -o chmatch.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c cj.c -o cj.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c coalesce.c -o coalesce.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c dogroups.c -o dogroups.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fastmean.c -o fastmean.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fcast.c -o fcast.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fifelse.c -o fifelse.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fmelt.c -o fmelt.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c forder.c -o forder.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c frank.c -o frank.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fread.c -o fread.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c freadR.c -o freadR.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c froll.c -o froll.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c frollR.c -o frollR.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c frolladaptive.c -o frolladaptive.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fsort.c -o fsort.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fwrite.c -o fwrite.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c fwriteR.c -o fwriteR.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c gsumm.c -o gsumm.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c ijoin.c -o ijoin.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c init.c -o init.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c inrange.c -o inrange.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c nafill.c -o nafill.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c nqrecreateindices.c -o nqrecreateindices.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c openmp-utils.c -o openmp-utils.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c quickselect.c -o quickselect.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c rbindlist.c -o rbindlist.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c reorder.c -o reorder.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c shift.c -o shift.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c subset.c -o subset.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c transpose.c -o transpose.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c types.c -o types.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c uniqlist.c -o uniqlist.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c utils.c -o utils.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c vecseq.c -o vecseq.o
ccache gcc -I"/usr/local/lib/R-devel/lib/R/include" -DNDEBUG -I/usr/local/include -fopenmp -fpic -ggdb -pipe -std=gnu99 -Wall -pedantic -c wrappers.c -o wrappers.o
subset.c: In function ‘subsetVectorRaw’:
subset.c:36:105: error: stray ‘#’ in program
PARLOOP(NA_INTEGER)
^
subset.c:36:106: error: unknown type name ‘pragma’
PARLOOP(NA_INTEGER)
^
subset.c:36:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_INTEGER)
^
subset.c:36:16: error: ‘i’ undeclared (first use in this function)
PARLOOP(NA_INTEGER)
^
subset.c:36:16: note: each undeclared identifier is reported only once for each function it appears in
subset.c:36:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_INTEGER)
^
subset.c:36:24: error: expected statement before ‘)’ token
subset.c:42:124: error: stray ‘#’ in program
PARLOOP(INT64_MIN)
^
subset.c:42:125: error: unknown type name ‘pragma’
PARLOOP(INT64_MIN)
^
subset.c:42:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected ‘;’ before ‘)’ token
PARLOOP(INT64_MIN)
^
subset.c:42:24: error: expected statement before ‘)’ token
subset.c:46:106: error: stray ‘#’ in program
PARLOOP(NA_REAL)
^
subset.c:46:107: error: unknown type name ‘pragma’
PARLOOP(NA_REAL)
^
subset.c:46:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_REAL)
^
subset.c:46:24: error: expected statement before ‘)’ token
subset.c:80:105: error: stray ‘#’ in program
PARLOOP(NA_CPLX)
^
subset.c:80:106: error: unknown type name ‘pragma’
PARLOOP(NA_CPLX)
^
subset.c:80:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(NA_CPLX)
^
subset.c:80:24: error: expected ‘;’ before ‘)’ token
PARLOOP(NA_CPLX)
^
subset.c:80:24: error: expected statement before ‘)’ token
subset.c:85:99: error: stray ‘#’ in program
PARLOOP(0)
^
subset.c:85:100: error: unknown type name ‘pragma’
PARLOOP(0)
^
subset.c:85:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parallel’
PARLOOP(0)
^
subset.c:85:24: error: expected ‘;’ before ‘)’ token
PARLOOP(0)
^
subset.c:85:24: error: expected statement before ‘)’ token
make: *** [subset.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/usr/local/lib/R-devel/lib/R/library/data.table’
The downloaded source packages are in
‘/tmp/RtmpPBv7Mi/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("data.table") :
installation of package ‘data.table’ had non-zero exit status
My gcc version is:
gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
@hzambran looks like maybe related to OpenMP? Can you try to install the current dev version? The log there should include a diagnostic about your OpenMP installation
@hzambran could you please disable ccache
and use gcc
directly during installation? and then provide output.
Thanks for your reply.
I'm not an expert with the compilation, so could you please tell me how can I disable ccache
and use gcc
directly during installation?
I also tried with the current dev version of data.table, but I got the same error.
Most helpful comment
@jangorecki Sorry, I'm being an idiot. The server I was on is apparently still running Redhat 6, which I have no problem in not being supported. It's great that it still works out of the box on 7.