problem lo ading php extension: undefined reference to __gxx_ personalit y_v0
| From: | Nathan Ridge | Date: | Wed, 02 May 2012 06:45:41 +0000 |
| Subject: | problem lo ading php extension: undefined reference to __gxx_ personalit y_v0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-317734@lists.php.net to get a copy of this message | ||
Hi,
I'm having trouble loading a PHP extension that I made.
When starting PHP, I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20090626/libtg.so' - /usr/lib/php5/20090626/libtg.so: undefined symbol:
__gxx_personality_v0 in Unknown on line 0
libtg.so is my extension. It is a wrapper around a C++ library, made
using SWIG (http://www.swig.org/).
I know __gxx_personality_v0 is a symbol from libstdc++, but my extension,
libtg.so, is linked to libstdc++. I have confirmed this using ldd:
$ ldd libtg.so
linux-vdso.so.1 => (0x00007fff5f932000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f3fc937c000)
libm.so.6 => /lib/libm.so.6 (0x00007f3fc90f9000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f3fc8ee2000)
libc.so.6 => /lib/libc.so.6 (0x00007f3fc8b5f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3fc98fc000)
Any ideas as to why PHP is not finding this symbol, or how I can further
diagnose the problem?
Thanks,
Nate