可以从来源:dylib libomp.dynlib构建的MacOS版本

发布于 2025-02-09 07:55:18 字数 3430 浏览 2 评论 0原文

确保通往卷曲的路径使用具有SFTP协议的自制版本之后,我正在尝试从源安装RCURL,因为默认macOS(12.3.1)不包括该协议:

> Sys.getenv("PATH")
[1] "/opt/homebrew/Cellar/curl/7.83.1/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

我收到两个LD警告,然后是致命的。错误。第一个似乎是与libomp.dynlib的版本一起,然后导致第二秒忽略了自制的卷曲lib,然后是未能加载rcurl的致命错误。

myUTF8.c:58:34: warning: variable 'use_wcs' set but not used [-Wunused-but-set-variable]
   Rboolean oct_or_hex = FALSE, use_wcs = FALSE;
                                ^
myUTF8.c:58:14: warning: variable 'oct_or_hex' set but not used [-Wunused-but-set-variable]
   Rboolean oct_or_hex = FALSE, use_wcs = FALSE;
            ^
2 warnings generated.
clang -mmacosx-version-min=10.13 -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 -lomp -o RCurl.so base64.o curl.o curlInit.o curl_base64.o enums.o json.o memoryManagement.o myUTF8.o -L/opt/homebrew/Cellar/curl/7.83.1/lib -lcurl -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: dylib (/usr/local/lib/libomp.dylib) was built for newer macOS version (12.0) than being linked (10.13)
ld: warning: ignoring file /opt/homebrew/Cellar/curl/7.83.1/lib/libcurl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so':
 dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so, 0x0006): symbol not found in flat namespace '_curl_easy_cleanup'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RCurl’
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.0 (2022-04-22)
 os       macOS Monterey 12.3.1
 system   x86_64, darwin17.0
 ui       AQUA
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Denver
 date     2022-06-21
 pandoc   NA

这是源尝试中安装的整个输出(对不起,必须使用图像,因为我不在字符中):

”在此处输入图像描述”

I'm trying to install RCurl from source after making sure the path to curl is using the homebrew version that has sftp protocol, as the default MacOS (12.3.1) does not include that protocol:

> Sys.getenv("PATH")
[1] "/opt/homebrew/Cellar/curl/7.83.1/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

I get two ld warnings and then a fatal error. The first seems to be with the version of libomp.dynlib, which then leads to a second where it ignores the homebrew curl lib, then the fatal error where it fails to load Rcurl.

myUTF8.c:58:34: warning: variable 'use_wcs' set but not used [-Wunused-but-set-variable]
   Rboolean oct_or_hex = FALSE, use_wcs = FALSE;
                                ^
myUTF8.c:58:14: warning: variable 'oct_or_hex' set but not used [-Wunused-but-set-variable]
   Rboolean oct_or_hex = FALSE, use_wcs = FALSE;
            ^
2 warnings generated.
clang -mmacosx-version-min=10.13 -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 -lomp -o RCurl.so base64.o curl.o curlInit.o curl_base64.o enums.o json.o memoryManagement.o myUTF8.o -L/opt/homebrew/Cellar/curl/7.83.1/lib -lcurl -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: dylib (/usr/local/lib/libomp.dylib) was built for newer macOS version (12.0) than being linked (10.13)
ld: warning: ignoring file /opt/homebrew/Cellar/curl/7.83.1/lib/libcurl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so':
 dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so, 0x0006): symbol not found in flat namespace '_curl_easy_cleanup'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RCurl’
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.0 (2022-04-22)
 os       macOS Monterey 12.3.1
 system   x86_64, darwin17.0
 ui       AQUA
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Denver
 date     2022-06-21
 pandoc   NA

Here is the entire output of the installation from source attempt (sorry had to use image, as I was out of characters):

enter image description here
enter image description here
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文