{"action":"created","issue":{"url":"https://api.github.com/repos/Rdatatable/data.table/issues/1692","repository_url":"https://api.github.com/repos/Rdatatable/data.table","labels_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1692/labels{/name}","comments_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1692/comments","events_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1692/events","html_url":"https://github.com/Rdatatable/data.table/issues/1692","id":153527391,"number":1692,"title":"openMP Mac install not working","user":{"login":"bhive01","id":394973,"avatar_url":"https://avatars.githubusercontent.com/u/394973?v=3","gravatar_id":"","url":"https://api.github.com/users/bhive01","html_url":"https://github.com/bhive01","followers_url":"https://api.github.com/users/bhive01/followers","following_url":"https://api.github.com/users/bhive01/following{/other_user}","gists_url":"https://api.github.com/users/bhive01/gists{/gist_id}","starred_url":"https://api.github.com/users/bhive01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhive01/subscriptions","organizations_url":"https://api.github.com/users/bhive01/orgs","repos_url":"https://api.github.com/users/bhive01/repos","events_url":"https://api.github.com/users/bhive01/events{/privacy}","received_events_url":"https://api.github.com/users/bhive01/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-05-06T20:01:58Z","updated_at":"2016-08-03T17:02:53Z","closed_at":"2016-05-06T21:04:52Z","body":"I've been trying to get timing comparisons of various file IO functions today and managed to get everything working except the OpenMP implementation of fwrite(). When I run fwrite() in my benchmark I get the following:\r\n\r\n```r\r\nlibrary(data.table)\r\n\r\nset.seed(3-29-16)\r\n\r\nrows <- 100000\r\n\r\nx <- data.frame(ints = round(runif(rows, -100, 100)), stringsAsFactors = FALSE)\r\nx$floats <- runif(rows, -100, 100)\r\nx$bools <- sample(c(TRUE, FALSE), rows, replace = TRUE)\r\nx$dates <- as.POSIXct(runif(rows, 100000000, 1459293171), origin = \"1970-01-01\")\r\nx$categories <- as.factor(sample(c(LETTERS, 0:9), rows, replace = TRUE))\r\nx$strings <- replicate(rows, paste0(sample(letters, sample(1:10, 1), replace = TRUE), collapse = \"\"))\r\n\r\nDTCSV =fwrite(x, \"x.DT.csv\")\r\n#Your platform/environment has not detected OpenMP support. fwrite() will still work, but slower in single threaded mode.\r\n```\r\n\r\nI followed the instructions here: https://github.com/Rdatatable/data.table/wiki/Installation\r\nCreated a Makevar file in ~/.R/ with the following flags: \r\n```bash\r\ncat ~/.R/Makevars\r\nCC=clang-omp -fopenmp\r\nCXX=clang-omp++ -fopenmp\r\n```\r\nRunning the script above after installation and creation of Makevar file gives the above message. \r\n\r\nWhen I tried to reinstall Rcpp or data.table from source (hoping that it would compile against the OpenMP capable compilier) I get an error. \r\n\r\n```r\r\ninstall.packages(\"data.table\", type = \"source\",\r\n     repos = \"https://Rdatatable.github.io/data.table\")\r\n\r\ntrying URL 'https://Rdatatable.github.io/data.table/src/contrib/data.table_1.9.7.tar.gz'\r\nContent type 'application/octet-stream' length 2721566 bytes (2.6 MB)\r\n==================================================\r\ndownloaded 2.6 MB\r\n\r\n* installing *source* package ‘data.table’ ...\r\n** libs\r\nclang-omp -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c assign.c -o assign.o\r\nIn file included from assign.c:1:\r\nIn file included from ./data.table.h:1:\r\n/Library/Frameworks/R.framework/Resources/include/R.h:45:12: fatal error: 'stdlib.h' file not found\r\n#  include <stdlib.h> /* Not used by R itself, but widely assumed in packages */\r\n           ^\r\n1 error generated.\r\n\r\nThe downloaded source packages are in\r\n\t‘/private/var/folders/zg/hy0k4g312536_4l1qc1w27640000gn/T/RtmpXM09oF/downloaded_packages’\r\nmake: *** [assign.o] Error 1\r\nERROR: compilation failed for package ‘data.table’\r\n* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table’\r\n* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table’\r\nWarning message:\r\nIn install.packages(\"data.table\", type = \"source\", repos = \"https://Rdatatable.github.io/data.table\") :\r\n  installation of package ‘data.table’ had non-zero exit status\r\n\r\n#############################\r\ninstall.packages(\"Rcpp\", type = \"source\")\r\ntrying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.4.tar.gz'\r\nContent type 'application/x-gzip' length 2402065 bytes (2.3 MB)\r\n==================================================\r\ndownloaded 2.3 MB\r\n\r\n* installing *source* package ‘Rcpp’ ...\r\n** package ‘Rcpp’ successfully unpacked and MD5 sums checked\r\n** libs\r\nclang-omp++ -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Date.cpp -o Date.o\r\nIn file included from Date.cpp:31:\r\nIn file included from ../inst/include/Rcpp.h:27:\r\nIn file included from ../inst/include/RcppCommon.h:29:\r\nIn file included from ../inst/include/Rcpp/r/headers.h:48:\r\nIn file included from ../inst/include/Rcpp/platform/compiler.h:100:\r\n/usr/local/Cellar/clang-omp/2015-04-01/libexec/bin/../include/c++/v1/cmath:301:10: fatal error: 'math.h' file not found\r\n#include <math.h>\r\n         ^\r\n1 error generated.\r\nmake: *** [Date.o] Error 1\r\nERROR: compilation failed for package ‘Rcpp’\r\n* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’\r\n\r\nThe downloaded source packages are in\r\n\t‘/private/var/folders/zg/hy0k4g312536_4l1qc1w27640000gn/T/RtmpXM09oF/downloaded_packages’\r\nWarning message:\r\nIn install.packages(\"Rcpp\", type = \"source\") :\r\n  installation of package ‘Rcpp’ had non-zero exit status\r\n* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp’\r\n\r\n```\r\n\r\nI googled around and found that g++-5 on homebrew comes with openMP so I tapped it. Rcpp compiles, but then data.table does not. \r\n\r\n```bash\r\ncat ~/.R/Makevars\r\nCC=g++-5 -fopenmp\r\nCXX=g++-5 -fopenmp\r\n```\r\n\r\n```r\r\ninstall.packages(\"Rcpp\", type = \"source\")\r\ntrying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.4.tar.gz'\r\nContent type 'application/x-gzip' length 2402065 bytes (2.3 MB)\r\n==================================================\r\ndownloaded 2.3 MB\r\n\r\n* installing *source* package ‘Rcpp’ ...\r\n** package ‘Rcpp’ successfully unpacked and MD5 sums checked\r\n** libs\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Date.cpp -o Date.o\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Module.cpp -o Module.o\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Rcpp_init.cpp -o Rcpp_init.o\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c api.cpp -o api.o\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c attributes.cpp -o attributes.o\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c barrier.cpp -o barrier.o\r\ng++-5 -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation\r\ninstalling to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/libs\r\n** R\r\n** inst\r\n** preparing package for lazy loading\r\n** help\r\n*** installing help indices\r\n** building package indices\r\n** installing vignettes\r\n** testing if installed package can be loaded\r\n* DONE (Rcpp)\r\n\r\nThe downloaded source packages are in\r\n\t‘/private/var/folders/zg/hy0k4g312536_4l1qc1w27640000gn/T/RtmpXM09oF/downloaded_packages’\r\n\r\n\r\n############################\r\n\r\ninstall.packages(\"data.table\", type = \"source\",\r\n     repos = \"https://Rdatatable.github.io/data.table\")\r\ntrying URL 'https://Rdatatable.github.io/data.table/src/contrib/data.table_1.9.7.tar.gz'\r\nContent type 'application/octet-stream' length 2721566 bytes (2.6 MB)\r\n==================================================\r\ndownloaded 2.6 MB\r\n\r\n* installing *source* package ‘data.table’ ...\r\n** libs\r\ng++-5 -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c assign.c -o assign.o\r\nIn file included from assign.c:1:0:\r\ndata.table.h:73:29: error: two or more data types in declaration of 'parameter'\r\n SEXP which(SEXP x, Rboolean bool);\r\n                             ^\r\nassign.c: In function 'int _selfrefok(SEXP, Rboolean, Rboolean)':\r\nassign.c:115:26: error: invalid conversion from 'void*' to 'SEXP {aka SEXPREC*}' [-fpermissive]\r\n     p = R_ExternalPtrAddr(v);\r\n                          ^\r\n\r\nThe downloaded source packages are in\r\n\t‘/private/var/folders/zg/hy0k4g312536_4l1qc1w27640000gn/T/RtmpXM09oF/downloaded_packages’\r\nWarning message:\r\nIn install.packages(\"data.table\", type = \"source\", repos = \"https://Rdatatable.github.io/data.table\") :\r\n  installation of package ‘data.table’ had non-zero exit status\r\nassign.c: In function 'Rboolean selfrefok(SEXP, Rboolean)':\r\nassign.c:137:44: error: cannot convert 'bool' to 'Rboolean' in return\r\n     return(_selfrefok(x, FALSE, verbose)==1);\r\n                                            ^\r\nassign.c: In function 'Rboolean selfrefnamesok(SEXP, Rboolean)':\r\nassign.c:140:43: error: cannot convert 'bool' to 'Rboolean' in return\r\n     return(_selfrefok(x, TRUE, verbose)==1);\r\n                                           ^\r\nassign.c: In function 'SEXPREC* alloccol(SEXP, R_len_t, Rboolean)':\r\nassign.c:195:17: error: expected unqualified-id before 'class'\r\n     SEXP names, class;\r\n                 ^\r\nassign.c:199:5: error: expected primary-expression before 'class'\r\n     class = getAttrib(dt, R_ClassSymbol);\r\n     ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:200:16: error: expected primary-expression before 'class'\r\n     if (isNull(class)) error(\"dt passed to alloccol has no class attribute. Please report result of traceback() to datatable-help.\");\r\n                ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:303:21: note: in definition of macro 'TYPEOF'\r\n #define TYPEOF(x) ((x)->sxpinfo.type)\r\n                     ^\r\nassign.c:200:9: note: in expansion of macro 'isNull'\r\n     if (isNull(class)) error(\"dt passed to alloccol has no class attribute. Please report result of traceback() to datatable-help.\");\r\n         ^\r\nassign.c:200:16: error: expected ')' before 'class'\r\n     if (isNull(class)) error(\"dt passed to alloccol has no class attribute. Please report result of traceback() to datatable-help.\");\r\n                ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:303:21: note: in definition of macro 'TYPEOF'\r\n #define TYPEOF(x) ((x)->sxpinfo.type)\r\n                     ^\r\nassign.c:200:9: note: in expansion of macro 'isNull'\r\n     if (isNull(class)) error(\"dt passed to alloccol has no class attribute. Please report result of traceback() to datatable-help.\");\r\n         ^\r\nassign.c:200:133: error: expected ')' before ';' token\r\n     if (isNull(class)) error(\"dt passed to alloccol has no class attribute. Please report result of traceback() to datatable-help.\");\r\n                                                                                                                                     ^\r\nassign.c:200:133: error: expected ')' before ';' token\r\nassign.c:200:133: error: expected ')' before ';' token\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c: In function 'SEXPREC* alloccolwrapper(SEXP, SEXP, SEXP)':\r\nassign.c:227:76: error: invalid conversion from 'int' to 'Rboolean' [-fpermissive]\r\n     SEXP ans = PROTECT(alloccol(dt, INTEGER(newncol)[0], LOGICAL(verbose)[0]));\r\n                                                                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:661:31: note: in definition of macro 'PROTECT'\r\n #define PROTECT(s) Rf_protect(s)\r\n                               ^\r\nassign.c:193:6: note:   initializing argument 3 of 'SEXPREC* alloccol(SEXP, R_len_t, Rboolean)'\r\n SEXP alloccol(SEXP dt, R_len_t n, Rboolean verbose)\r\n      ^\r\nassign.c: In function 'Rboolean isDatatable(SEXP)':\r\nassign.c:252:10: error: expected primary-expression before 'class'\r\n     SEXP class = getAttrib(x, R_ClassSymbol);\r\n          ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:253:28: error: expected primary-expression before 'class'\r\n     for (int i=0; i<length(class); i++) {\r\n                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1222:30: note: in definition of macro 'length'\r\n #define length(x)  Rf_length(x)\r\n                              ^\r\nassign.c:254:36: error: expected primary-expression before 'class'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:254:20: note: in expansion of macro 'CHAR'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:254:25: note: in expansion of macro 'STRING_ELT'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                         ^\r\nassign.c:254:36: error: expected ')' before 'class'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:254:20: note: in expansion of macro 'CHAR'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:254:25: note: in expansion of macro 'STRING_ELT'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                         ^\r\nassign.c:254:80: error: expected ')' before ';' token\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) return(TRUE);\r\n                                                                                ^\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c:254:80: error: expected ')' before ';' token\r\nassign.c: In function 'SEXPREC* selfrefokwrapper(SEXP, SEXP)':\r\nassign.c:272:63: error: invalid conversion from 'int' to 'Rboolean' [-fpermissive]\r\n     return ScalarInteger(_selfrefok(x,FALSE,LOGICAL(verbose)[0]));\r\n                                                               ^\r\nassign.c:104:12: note:   initializing argument 3 of 'int _selfrefok(SEXP, Rboolean, Rboolean)'\r\n static int _selfrefok(SEXP x, Rboolean checkNames, Rboolean verbose) {\r\n            ^\r\nassign.c: In function 'SEXPREC* assign(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':\r\nassign.c:285:93: error: expected unqualified-id before 'class'\r\n     SEXP targetcol, RHS, names, nullint, thisvalue, thisv, targetlevels, newcol, s, colnam, class, tmp, colorder, key, index, a;\r\n                                                                                             ^\r\nassign.c:287:39: error: invalid conversion from 'int' to 'Rboolean' [-fpermissive]\r\n     Rboolean verbose = LOGICAL(verb)[0], anytodelete=FALSE, isDataTable=FALSE;\r\n                                       ^\r\nassign.c:297:5: error: expected primary-expression before 'class'\r\n     class = getAttrib(dt, R_ClassSymbol);\r\n     ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:298:16: error: expected primary-expression before 'class'\r\n     if (isNull(class)) error(\"Input passed to assign has no class attribute. Must be a data.table or data.frame.\");\r\n                ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:303:21: note: in definition of macro 'TYPEOF'\r\n #define TYPEOF(x) ((x)->sxpinfo.type)\r\n                     ^\r\nassign.c:298:9: note: in expansion of macro 'isNull'\r\n     if (isNull(class)) error(\"Input passed to assign has no class attribute. Must be a data.table or data.frame.\");\r\n         ^\r\nassign.c:298:16: error: expected ')' before 'class'\r\n     if (isNull(class)) error(\"Input passed to assign has no class attribute. Must be a data.table or data.frame.\");\r\n                ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:303:21: note: in definition of macro 'TYPEOF'\r\n #define TYPEOF(x) ((x)->sxpinfo.type)\r\n                     ^\r\nassign.c:298:9: note: in expansion of macro 'isNull'\r\n     if (isNull(class)) error(\"Input passed to assign has no class attribute. Must be a data.table or data.frame.\");\r\n         ^\r\nassign.c:298:115: error: expected ')' before ';' token\r\n     if (isNull(class)) error(\"Input passed to assign has no class attribute. Must be a data.table or data.frame.\");\r\n                                                                                                                   ^\r\nassign.c:298:115: error: expected ')' before ';' token\r\nassign.c:298:115: error: expected ')' before ';' token\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:303:24: error: expected primary-expression before 'class'\r\n     for (i=0; i<length(class); i++) {   // There doesn't seem to be an R API interface to inherits(), but manually here isn't too bad.\r\n                        ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1222:30: note: in definition of macro 'length'\r\n #define length(x)  Rf_length(x)\r\n                              ^\r\nassign.c:304:36: error: expected primary-expression before 'class'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:304:20: note: in expansion of macro 'CHAR'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:304:25: note: in expansion of macro 'STRING_ELT'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                         ^\r\nassign.c:304:36: error: expected ')' before 'class'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:304:20: note: in expansion of macro 'CHAR'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                    ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:304:25: note: in expansion of macro 'STRING_ELT'\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                         ^\r\nassign.c:304:73: error: expected ')' before ';' token\r\n         if (strcmp(CHAR(STRING_ELT(class, i)), \"data.table\") == 0) break;\r\n                                                                         ^\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nassign.c:304:73: error: expected ')' before ';' token\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:306:18: error: expected primary-expression before 'class'\r\n     if (i<length(class))\r\n                  ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1222:30: note: in definition of macro 'length'\r\n #define length(x)  Rf_length(x)\r\n                              ^\r\nassign.c:309:28: error: expected primary-expression before 'class'\r\n         for (i=0; i<length(class); i++) {\r\n                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1222:30: note: in definition of macro 'length'\r\n #define length(x)  Rf_length(x)\r\n                              ^\r\nassign.c:310:40: error: expected primary-expression before 'class'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                                        ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:310:24: note: in expansion of macro 'CHAR'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                        ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:310:29: note: in expansion of macro 'STRING_ELT'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                             ^\r\nassign.c:310:40: error: expected ')' before 'class'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                                        ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:41: note: in definition of macro 'DATAPTR'\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                         ^\r\nassign.c:310:24: note: in expansion of macro 'CHAR'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                        ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:310:29: note: in expansion of macro 'STRING_ELT'\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                             ^\r\nassign.c:310:77: error: expected ')' before ';' token\r\n             if (strcmp(CHAR(STRING_ELT(class, i)), \"data.frame\") == 0) break;\r\n                                                                             ^\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nassign.c:310:77: error: expected ')' before ';' token\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:312:25: error: expected primary-expression before 'class'\r\n         if (i == length(class)) error(\"Input is not a data.table, data.frame or an object that inherits from either.\");\r\n                         ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1222:30: note: in definition of macro 'length'\r\n #define length(x)  Rf_length(x)\r\n                              ^\r\nassign.c:350:17: error: 'tmp' was not declared in this scope\r\n         PROTECT(tmp = chmatch(cols, names, 0, FALSE));\r\n                 ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:661:31: note: in definition of macro 'PROTECT'\r\n #define PROTECT(s) Rf_protect(s)\r\n                               ^\r\nassign.c:598:54: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]\r\n                             if (isReal(thisvalue)) s3=\"; may have truncated precision\"; else s3=\"\";\r\n                                                      ^\r\nassign.c:598:96: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]\r\n                             if (isReal(thisvalue)) s3=\"; may have truncated precision\"; else s3=\"\";\r\n                                                                                                ^\r\nassign.c:607:5: error: 'key' was not declared in this scope\r\n     key = getAttrib(dt,install(\"sorted\"));\r\n     ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:611:17: error: 'tmp' was not declared in this scope\r\n         PROTECT(tmp = allocVector(STRSXP, LENGTH(cols)));\r\n                 ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:661:31: note: in definition of macro 'PROTECT'\r\n #define PROTECT(s) Rf_protect(s)\r\n                               ^\r\nassign.c:625:11: error: assignment of function 'char* index(const char*, int)'\r\n     index = getAttrib(dt,install(\"index\"));\r\n           ^\r\nassign.c:625:11: error: cannot convert 'SEXP {aka SEXPREC*}' to 'char*(const char*, int)' in assignment\r\nassign.c:626:18: error: comparison between distinct pointer types 'char* (*)(const char*, int)' and 'SEXP {aka SEXPREC*}' lacks a cast [-fpermissive]\r\n     if (index != R_NilValue) {\r\n                  ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:300:25: error: request for member 'attrib' in 'index', which is of non-class type 'char*(const char*, int)'\r\n #define ATTRIB(x) ((x)->attrib)\r\n                         ^\r\nassign.c:627:13: note: in expansion of macro 'ATTRIB'\r\n         s = ATTRIB(index);\r\n             ^\r\nassign.c:629:13: error: 'a' was not declared in this scope\r\n             a = TAG(s);\r\n             ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c:666:17: error: 'colorder' was not declared in this scope\r\n         PROTECT(colorder = duplicate(cols));\r\n                 ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:661:31: note: in definition of macro 'PROTECT'\r\n #define PROTECT(s) Rf_protect(s)\r\n                               ^\r\nassign.c: At global scope:\r\nassign.c:876:42: error: expected ',' or '...' before 'new'\r\n SEXP setcharvec(SEXP x, SEXP which, SEXP new)\r\n                                          ^\r\nIn file included from data.table.h:3:0,\r\n                 from assign.c:1:\r\nassign.c: In function 'SEXPREC* setcharvec(SEXP, SEXP, SEXP)':\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:303:22: error: expected type-specifier before ')' token\r\n #define TYPEOF(x) ((x)->sxpinfo.type)\r\n                      ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:1374:22: note: in expansion of macro 'TYPEOF'\r\n #define isString(s) (TYPEOF(s) == STRSXP)\r\n                      ^\r\nassign.c:881:10: note: in expansion of macro 'isString'\r\n     if (!isString(new)) error(\"'new' must be a character vector\");\r\n          ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:338:44: error: expected type-specifier before ')' token\r\n # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)\r\n                                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:337:26: note: in expansion of macro 'SHORT_VEC_LENGTH'\r\n # define IS_LONG_VEC(x) (SHORT_VEC_LENGTH(x) == R_LONG_VEC_TOKEN)\r\n                          ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:21: note: in expansion of macro 'IS_LONG_VEC'\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                     ^\r\nassign.c:882:9: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n         ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:55: error: expected type-specifier before ',' token\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                                                       ^\r\nassign.c:882:9: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n         ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:338:44: error: expected type-specifier before ')' token\r\n # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)\r\n                                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:79: note: in expansion of macro 'SHORT_VEC_LENGTH'\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                                                                               ^\r\nassign.c:882:9: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n         ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:338:44: error: expected type-specifier before ')' token\r\n # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)\r\n                                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:337:26: note: in expansion of macro 'SHORT_VEC_LENGTH'\r\n # define IS_LONG_VEC(x) (SHORT_VEC_LENGTH(x) == R_LONG_VEC_TOKEN)\r\n                          ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:21: note: in expansion of macro 'IS_LONG_VEC'\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                     ^\r\nassign.c:882:110: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n                                                                                                              ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:55: error: expected type-specifier before ',' token\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                                                       ^\r\nassign.c:882:110: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n                                                                                                              ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:338:44: error: expected type-specifier before ')' token\r\n # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)\r\n                                            ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:344:79: note: in expansion of macro 'SHORT_VEC_LENGTH'\r\n # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x))\r\n                                                                               ^\r\nassign.c:882:110: note: in expansion of macro 'LENGTH'\r\n     if (LENGTH(new)!=LENGTH(which)) error(\"'new' is length %d. Should be the same as length of 'which' (%d)\",LENGTH(new),LENGTH(which));\r\n                                                                                                              ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:382:42: error: expected type-specifier before ')' token\r\n #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1)\r\n                                          ^\r\n/Library/Frameworks/R.framework/Resources/include/Rinternals.h:389:35: note: in expansion of macro 'DATAPTR'\r\n #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i]\r\n                                   ^\r\nassign.c:886:32: note: in expansion of macro 'STRING_ELT'\r\n         SET_STRING_ELT(x, w-1, STRING_ELT(new, i));\r\n                                ^\r\nmake: *** [assign.o] Error 1\r\nERROR: compilation failed for package ‘data.table’\r\n* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table’\r\n* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table’\r\n```"},"comment":{"url":"https://api.github.com/repos/Rdatatable/data.table/issues/comments/237299529","html_url":"https://github.com/Rdatatable/data.table/issues/1692#issuecomment-237299529","issue_url":"https://api.github.com/repos/Rdatatable/data.table/issues/1692","id":237299529,"user":{"login":"botanize","id":6433981,"avatar_url":"https://avatars.githubusercontent.com/u/6433981?v=3","gravatar_id":"","url":"https://api.github.com/users/botanize","html_url":"https://github.com/botanize","followers_url":"https://api.github.com/users/botanize/followers","following_url":"https://api.github.com/users/botanize/following{/other_user}","gists_url":"https://api.github.com/users/botanize/gists{/gist_id}","starred_url":"https://api.github.com/users/botanize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/botanize/subscriptions","organizations_url":"https://api.github.com/users/botanize/orgs","repos_url":"https://api.github.com/users/botanize/repos","events_url":"https://api.github.com/users/botanize/events{/privacy}","received_events_url":"https://api.github.com/users/botanize/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T17:02:53Z","updated_at":"2016-08-03T17:02:53Z","body":"The brew clang-omp formula has been moved to the bone-yard (deleted). It looks like llvm is the replacement formula (https://github.com/Homebrew/homebrew-core/issues/3266). Anyone have Mac build tips for llvm?"}}
{"actor":{"display_login":"botanize"}}