“无法找到-lSystem”使用 Makefile 与 Intel Fortran 进行编译时出现警告

发布于 2025-01-14 02:43:28 字数 729 浏览 3 评论 0原文

我正在尝试使用 Makefile 和 Intel Fortran 编译器构建一个简单的 Fortran 程序,并最终将其与 BLAS 和 LAPACK 链接。 从命令行构建程序,

如果我使用ifort xxx.f90 -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib

则构建会成功,不会出现任何问题。但是,当我在 Makefile 中尝试相同的操作时,即

runme:
    ifort -c ./src/debug/main_debug.f90
    ifort -o runme *.o -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
    rm -f *.o *.mod

链接器无法找到系统库。

ipo: warning #11109: unable to find -lSystem in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ipo: warning #11109: unable to find -lpthread in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd

这是在 MacOS 12.2.1 上。

I'm trying to build a simple Fortran program using a Makefile and the Intel Fortran compiler and to link it against BLAS and LAPACK eventually. If I build the program from the command line using

ifort xxx.f90 -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib

then the building succeeds without issues. However, when I try the same but in a Makefile, namely

runme:
    ifort -c ./src/debug/main_debug.f90
    ifort -o runme *.o -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
    rm -f *.o *.mod

The linker is not able to find the System library.

ipo: warning #11109: unable to find -lSystem in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ipo: warning #11109: unable to find -lpthread in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd

This is on MacOS 12.2.1.

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

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

发布评论

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