Closed salvob41 closed 5 years ago
I had this issue and I haven't upgraded to Catalina yet. I solved it by installing r-macos-rtools: https://github.com/rmacoslib/r-macos-rtools
@salvob41 can you confirm following the instructions for macOS here solve your issue?
@MichaelChirico no, it does not fix it. It gives that error when I type:
install.packages("data.table")
@salvob41 is there any chance you just clicked Michael's link and did what it said at the top? If so you need to scroll down. The full link the specific section of that page is: https://github.com/Rdatatable/data.table/wiki/Installation#openmp-enabled-compiler-for-mac There is quite a lot of information online if you copy and paste the error message into Google.
@mattdowle yes, Thank you! I should have read it more carefully. The part you sent me installed correctly, although it gave me a huge amount of warnings like these:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:320:57: note:
insert '_Nonnull' if the pointer should never be null
...int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:323:18: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
void psort(void *__base, size_t __nel, size_t __width,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:323:18: note:
insert '_Nullable' if the pointer may be null
void psort(void *__base, size_t __nel, size_t __width,
^
_Nullable
a bit too much for an installation maybe?
Great. Glad it worked.
I copied and pasted the latest warnings and notes into Google and it returned a ton of results unrelated to R or data.table. Lots of mentions of it in the Python ecosystem. stdlib.h
, psort
and _Nonnull
are related to the C library and don't appear in data.table source code. if you have a message that mentions a data.table source file, then please do let us know. But from the snippet you've posted, it looks like a MacOS problem unrelated to R or data.table. MacOS causes us the most issues these days. We literally have zero problems like this for a few years now on Linux and Windows -vs- problem after problem on MacOS.
I believe that using gcc compiler rather than clang compiler (MacOS default) may solve most, if not all, of such issues.
Update Thursday, 22nd of March 2018: I have to add -fopenmp to both clang and clang++ variables in my makevars to be able to build data.table package correctly. This is not exactly what the Data Table wiki recommends. I update the section about the Data Table Package accordingly.
Trying to install the package in macOS Catalina, gives:
Confirmed also here: https://cran.r-project.org/web/checks/check_results_data.table.html
Any workaround ?