为什么 SGML::Parser::OpenSP 找不到符号 __ZTI15SGMLApplication?
我试图从 cpan shell 中“安装 SGML::Parser::OpenSP”,但在第一次“make test”时失败。 如果我进入构建目录并运行 make test,我也会得到同样的错误。
我相信下面的输出是相关部分。 请注意,当 perl 到达新库的“use”行时,未找到符号。 那里列出的文件存在并且可读。 当我运行 unix 命令“nm”时,它确实显示该符号。
我不知道如何处理未找到符号错误。 如果这很重要的话,我不会以管理员/根身份运行。 这是在 mac 上,10.4.11 我的谷歌搜索发现了一些提示,如果调用 gcc 而不是 g++,则可能会发生这种情况,但我相信设置正确。
还可能是什么,我该如何修复?
以下是运行 make test 的摘录:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basic...........1/4
# Failed test 'use SGML::Parser::OpenSP;'
# at t/01basic.t line 14.
# Tried to use 'SGML::Parser::OpenSP'.
# Error: Can't load '/Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle' for module SGML::Parser::OpenSP: dlopen(/Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle, 2): Symbol not found: __ZTI15SGMLApplication
# Referenced from: /Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle
# Expected in: dynamic lookup
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
I'm trying to "install SGML::Parser::OpenSP" from the cpan shell, but it fails on the first "make test". I also get the same error if I go into the build directory and run make test.
I believe this bit of the output below is the relevant part. Note the Symbol not found when perl gets to the "use" line for the new library. The file listed there exists and is readable. When I run the unix command "nm" it does show the symbol.
I don't know what to make of the symbol not found error. I'm not running as admin/root if that matters. This is on a mac, 10.4.11 My googling turned up some hints that this can happen if gcc is called instead of g++, but I believe that is set up correctly.
What else could it be, and how can I try to fix?
Here's the excerpt from running make test:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basic...........1/4
# Failed test 'use SGML::Parser::OpenSP;'
# at t/01basic.t line 14.
# Tried to use 'SGML::Parser::OpenSP'.
# Error: Can't load '/Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle' for module SGML::Parser::OpenSP: dlopen(/Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle, 2): Symbol not found: __ZTI15SGMLApplication
# Referenced from: /Users/joshgold/.cpan/build/SGML-Parser-OpenSP-0.994/blib/arch/auto/SGML/Parser/OpenSP/OpenSP.bundle
# Expected in: dynamic lookup
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的 OpenSP 库可能是由与您当前尝试使用的不同的 C++ 编译器编译的。
It could be that your OpenSP library was compiled by a different C++ compiler than you are currently trying to use.
这不一定是您问题的答案,但我使用 MacPorts 在操作系统上安装 Perl 内容取得了巨大成功X. 它比尝试使用 CPAN 更顺利,因为它知道它是为 OS X 安装的,并且会适当地修补模块。 绝对推荐。
This isn't necessarily an answer to your question, but I've had great success using MacPorts for installing Perl stuff on OS X. It's much smoother than trying to use CPAN because it knows that it's installing for OS X and will patch modules appropriately. Definitely recommended.
抢,
您是否确保安装了 OpenJade 和/或 OpenSP? 我在默认安装的 OSX 中看不到它们,但它确实存在于我的 FreeBSD 构建服务器上。
我建议首先确保这些已安装。 它们在 SGML 的 CPAN 页面上链接::解析器::OpenSP。
Rob,
Have you ensured that OpenJade and/or OpenSP are installed? I don't see them on my default install of OSX, but it does exist on my FreeBSD build server.
I'd suggest starting with making sure those are installed. They're linked off the CPAN page for SGML::Parser::OpenSP.