我有一個包含導入列表的R包,從未遇到加載最新版本的問題。我剛剛將data.table
添加到列表中,現在無法加載該包。R:由於丟失符號而無法加載data.table _omp_set_num_threads
OS:MACOS塞拉利昂10.12.5/6
GCC:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
進口
aws.s3,
data.table,
googledrive,
httr,
jsonlite,
lubridate,
plyr
RMixpanel,
rmongodb,
RPresto,
stringi,
stringr,
uuid
錯誤
openmp-utils.c:50:5: warning: implicit declaration of function 'omp_set_num_threads' is invalid in C99 [-Wimplicit-function-declaration]
omp_set_num_threads(1);
^
1 warning generated.
...
Error: package or namespace load failed for ‘data.table’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/3.4/site-library/data.table/libs/datatable.so':
dlopen(/usr/local/lib/R/3.4/site-library/data.table/libs/datatable.so, 6): Symbol not found: _omp_set_num_threads
Referenced from: /usr/local/lib/R/3.4/site-library/data.table/libs/datatable.so
Expected in: flat namespace in /usr/local/lib/R/3.4/site-library/data.table/libs/datatable.so
Error: loading failed
我也試過移動plyr
要高於data.table
,但得到相同的錯誤。任何我想念的東西的想法?
您剛剛升級到了CRAN上的1.10.4-1嗎?在新的R會話中,'test.data.table()'是否工作?懷疑這是一個安裝/升級問題。 –
當你使用'parallel'包進行fork時,會調用這一行。你在使用'parallel'包嗎?這是我在這個補丁中已經改變的東西,所以我很可能會被指責。我們可以看到您的完整安裝輸出,看看它是否在安裝時發現openMP。 –
我現在看到。我的錯。當OpenMP不可用時,我沒有在#ifdef中包裝呼叫。很難測試這樣的事情,因爲我們不得不卸載OpenMP來測試它。 –