-
Notifications
You must be signed in to change notification settings - Fork 991
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
data.table installation from source fails on Mac, symbol not found in flat namespace '___kmpc_barrier'
#6622
Comments
Does it work if you Line 128 in 546259d
(Interesting how it previously worked when compiling with |
Works in my case (macOS 14.6.1 M1). Thanks! |
Yes, it does! |
I'm not sure that it did--previous installations from source of data table on my mac have always started up with a message along the lines of "this installation was compiled without openmp support and is running in single-threaded mode, go complain to Apple" Here it is in full:
data.table 1.15.4 using 1 threads (see ?getDTthreads). Latest news: r-datatable.com This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode. |
Ok so on my R4.4 installation, we take a different branch and hit a similar error that seems resistant to the workaround:
Full output
Though this time the particular symbol we fail to find is |
Interesting. The flags seem correct according to the OpenMP on Mac page, but the workaround is apparently not needed and doesn't work with the Homebrew toolchain. Is this R build also from Homebrew? I suppose we'll have to update the It looks like the same workaround should work because the configure script only appends to the user-provided |
Well, doing this produces a third scenario for me, in which all of the checks fail.
|
--though it occurs to me that I do have some R makevars set, which could be affecting things
Although I don't see how they'd account for the difference between R4.2 and R4.4 |
Ah, it's probably the fact that R4.3 changed the default C(++) standard to C(++)17. R4.3 behaves the same as R4.4 for me. |
Sorry, forgot to mention that configure relies on R_HOME=`R RHOME`
being set.
|
( |
Thanks! What's the difference if you additionally set
PKG_CFLAGS=-fopenmp PKG_LIBS=-fopenmp before running sh -x configure?
|
|
(and attempting to actually install with those envars set yields the same error as before, |
Thank you for the information! If you need a workaround right now, try hard-coding the following instead of the call to export PKG_CFLAGS="${PKG_CFLAGS} -fopenmp"
export PKG_LIBS="${PKG_LIBS} -fopenmp"
export R_OPENMP_ENABLED=1 Hopefully we'll make a proper fix soon. |
Doesn't actually work for me. When I try to install it with R 4.4.1 or 4.4.3, it still gives the same error (can't find Fortunately I'm not actually blocked since the prebuilt binary installs fine on 4.4. |
This issue may be a result of #6418 causing openmp support to be detected, and data.table to be compiled, but not linked with -fopenmp.
Minimal reproducible example
Full output
Workaround
Sys.setenv(PKG_LIBS='-fopenmp')
before installing the package, as suggested by aitap below along with a possible package-level solution.Output of sessionInfo()
The text was updated successfully, but these errors were encountered: