Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19108 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48371 invoked by uid 1010); 21 Sep 2005 12:23:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48356 invoked from network); 21 Sep 2005 12:23:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2005 12:23:00 -0000 X-Host-Fingerprint: 212.32.183.87 87.183.32.ip.nordiq.net Received: from ([212.32.183.87:28316] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 22/93-19329-3A051334 for ; Wed, 21 Sep 2005 08:22:59 -0400 Message-ID: <22.93.19329.3A051334@pb1.pair.com> To: internals@lists.php.net Date: Wed, 21 Sep 2005 14:22:45 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <7E.DD.19329.1D431334@pb1.pair.com> In-Reply-To: <7E.DD.19329.1D431334@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.32.183.87 Subject: Re: Missing symbol upon loading module From: david.olsson@vimio.com (David Olsson) 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