0

问题

我有一个从 firebreath 创建的浏览器插件在 mac osx 10.8 上运行良好。但是我在 mac osx 10.7 上从 Chrome 收到“无法加载 UploaderPlugin(我的插件的名称)”错误。

我的插件项目中包含几个外部库。经过几个小时的工作,我发现当我从项目中删除 libcurl 库时,错误消失了,并且每次尝试包含 libcurl 库时都会出现相同的错误。

所以很明显该错误与 libcurl 库有关。由于 libcurl 依赖于 openssl 和 zlib。我再次从源代码编译了这三个库,但同样的错误仍未解决。

来自控制台的错误消息

13-10-10 下午12:56:33.500 Google Chrome Helper EH: Error loading /Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin: dlopen(/Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin, 262): Symbol not found: _CAST_ecb_encrypt 引用自:/Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin 预期在:/ /Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin 中的 usr/lib/libSystem.B.dylib

13-10-10 下午12:56:33.501 [0x0-0x2a82a8].com.google.Chrome: [10071:2819:1010/125633:ERROR:webplugin_delegate_proxy.cc(390)] PluginMsg_Init 返回 false

13-10-10 下午12:56:33.501 [0x0-0x2a82a8].com.google.Chrome: [10071:2819:1010/125633:ERROR:webplugin_impl.cc(258)] 无法初始化插件


从错误消息中判断,我可以看到主要问题是找不到符号 _CAST_ecb_encrypt。我用谷歌搜索它并没有任何问题。

环境

mac os x 10.8 + chrome 28.0.1500.71(工作正常)

mac os x 10.7 + chrome 29.0.1547.22 beta(收到错误消息)

喷火版本:1.7

libcurl 版本:7.26.0

openssl 版本:1.0.1c

zlib 版本:1.2.7

战神版本:1.10.0

任何形式的建议将不胜感激。如果您需要更详细的信息,请随时通知我。

4

1 回答 1

0

It actually may or may not be directly related to libcurl; it could be something that curl is causing to be linked in because of how you're linking it. My first guess would be that you need to set your deployment target to 10.7; if you build on 10.8, by default the target and SDK you will use are the 10.8 target and 10.8 sdk. usually you can safely use the 10.8 sdk to build for 10.7, but you may need to set the deployment target.

You can do that by adding -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 to your prep script:

../firebreath/prepmac.sh ./projectDir ./buildDir -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8
于 2013-10-10T19:47:02.060 回答