ICL、OS X.4/5 和 Unix 合规性 ($UNIX2003)
我正在尝试为一位想要将其包含在 Photoshop 插件中的客户编译我们的库的 Mac 版本,但他在将我们的库链接到他的应用程序中时遇到问题。更详细的信息:他的插件是针对 CS4 Photoshop SDK 构建的,这意味着 Mac OS 基础 SDK 应该是 10.4。我的lib是静态的,使用Intel编译器11.1编译,基础SDK也设置为10.4。
我针对我编写的一个小型测试应用程序测试了我的库,它编译并运行良好(在 10.5 上)。为了复制我客户的环境,该应用程序是使用 gcc 编译的,并使用 10.4 基础 SDK。虽然这对我来说很好,但我的客户无法链接到我的库。问题如下:未定义的符号: “_fputs$UNIX2003”,引用自: libMyLib.a(libm_error.o) 中的_write_message
当我用gcc编译我的lib时,所有其他项目设置都相同,没问题,他可以生成可执行文件。当我用 ICL 编译时,它就崩溃了。难道ICL 11.1不兼容10.4?在 Fortran 编译器论坛上,我找到了以下答案:“从提供的输出来看,Xcode 默认为 Mac OS X 10.4,11.1 编译器不支持。” (http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/68647/) 这是否意味着 ICL 11.1 无法在 10.4 上运行,或者它生成的代码无法在 10.4 上运行?
在以下页面上 (http://software.intel.com/en-us/articles/performance-tools-for-software-developers-compatibility-of-intel-compiler-for- mac-os-x-and-xcode/),它还说 ICL 11.1 与 10.4 不兼容(同样的问题:兼容性是什么意思?)。但是,它说 ICL 10.1 是,所以我尝试了。但现在,出于同样的原因,即使是我自己的测试应用程序也无法链接(未定义的函数$UNIX2003)。
有谁知道问题是什么以及如何解决它?或者有办法解决它吗?
提前致谢,
PS
:如果有人知道这是什么意思,那就加分: ld:在可滑动图像中不允许在 libMyLib.a(Cholesky.o) 的 _Cholesky 中使用绝对寻址(可能是 -mdynamic-no-pic)。使用“-read_only_relocs抑制”启用文本重新定位
I'm trying to compile a Mac version of our lib for a customer that wants to include it in a Photoshop plugin, and he is having trouble linking our lib into his app. More detailed info: His plugin is built against the CS4 Photoshop SDK, which means the Mac OS base SDK should be 10.4. My lib is a static one, compiled with the Intel compiler 11.1 and the base SDK is also set as 10.4.
I tested my lib against a small test app I wrote, and it compiles and works fine (on 10.5). To replicate my customer's environment, the app is compiled with gcc, and uses the 10.4 base SDK. While its fine for me, my customer cannot manage to link with my lib. The problem is the following: Undefined symbols:
"_fputs$UNIX2003", referenced from:
_write_message in libMyLib.a(libm_error.o)
When I compile my lib with gcc,and all other project settings the same, its fine, he can generate an executable. As soon as I compile with ICL, it breaks down. Could it be that ICL 11.1 is not compatible with 10.4? On the Fortran compiler forum, I found the following answer:"From the output provided it appears Xcode defaulted to Mac OS X 10.4, which the 11.1 compilers do not support." (http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/68647/)
Does that mean ICL 11.1 does not run on 10.4, or that the code it generates doesn't work on 10.4??
On the following page (http://software.intel.com/en-us/articles/performance-tools-for-software-developers-compatibility-of-intel-compiler-for-mac-os-x-and-xcode/), it also says that ICL 11.1 is not compatible with 10.4 (again same question: what does compatibility mean?). However, it says that ICL 10.1 is, so I tried. But now, even my own test app does not link, for the same reason (undefined function$UNIX2003).
Does anybody know what is the problem, and how to fix it? Or a way to work around it?
Thanks in advance,
A
PS: bonus point if somebody knows what this one means:
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _Cholesky from libMyLib.a(Cholesky.o) not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所以答案是:使用 ICL 10.1 进行编译,而不是 11.1。 10.1 使用的 Intel 库均不包含对 $UNIX2003 例程的引用。
希望它对某人有帮助。
一个
So the answer is: compile with ICL 10.1, not 11.1. None of the Intel libs used by 10.1 contain references to $UNIX2003 routines.
Hope it helps somebody.
A
最终,您将需要从英特尔获得英特尔产品支持,但如果您想销售实际可用的 Mac 软件,那么您可能应该只使用与其他人相同的工具链,然后忘记它。
Ultimately, you're going to need to get Intel product support from Intel, but if you want to sell Mac software that actually works then you should probably just use the same toolchain as everyone else and forget about it.