Nevermind. The config.m4 was messed up so that the module never linked against libstd++ which, of course, caused som missing symbols.

Best regards
David Olsson


David Olsson wrote:
I have a PHP extension written in C++ which I use for parsing and building WbXml documents. I have tested building and using it on a 32 bit x86 system running the following:

PHP 4.3.10
GCC 3.3.5
Gentoo Linux 2.6.10-r4

Everything works fine on this configuration. I do however need the extension to run on a x86 64 bits machine using the following configuration:

PHP 4.4.0
GCC 3.2.3
RedHat Enterprise Linux 3 2.4.21-15

Everything compiles fine, no errors. When PHP tries to load the module however, I get the following error:

PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/extensions/php_wbxml.so' - /usr/local/php4/extensions/php_wbxml.so: undefined symbol: __gxx_personality_v0 in Unknown on line 0

The name of the module is, obviously, php_wbxml.so. What does this error mean? I have tried to explicitly link against libsupc++ (which, from what I can gather, should include the __gxx_personality_v0 symbol) but the same error remains.

I have moved other modules without problems between the two systems but this one doesn't seem to work.

Here's the config.m4 I am using:

PHP_ARG_ENABLE(php_wbxml, whether to enable WbXml support,
[--enable-php_wbxml  Enable WbXml support])

if test "$PHP_PHP_WBXML" = "yes"; then
    PHP_REQUIRE_CXX()
    PHP_ADD_LIBRARY(stdc++, 1, PHP_WBXML_SHARED_LIBADD)
    AC_DEFINE(HAVE_PHP_WBXML, 1, [whether you have WbXml])
PHP_NEW_EXTENSION(php_wbxml, php_wbxml.cpp TextXmlDocument.cpp tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp WbXmlDocument.cpp XmlAttribute.cpp XmlDocument.cpp XmlElement.cpp XmlHandle.cpp XmlNode.cpp XmlText.cpp, $ext_shared)
fi

VERY grateful for any tips on how to proceed.

Best regards
David Olsson

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to