tags:

views:

355

answers:

3

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.
+1  A: 

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.

Greg Hewgill
+1  A: 

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.

Jack M.
A: 

It could be that your OpenSP library was compiled by a different C++ compiler than you are currently trying to use.

Peter Eisentraut