Bug #21336 Can't load udf_example.so, symbol _ZdlPv not defined
Submitted: 29 Jul 2006 1:38 Modified: 29 Jul 2006 10:38
Reporter: Kent Boortz Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: User-defined functions ( UDF ) Severity:S3 (Non-critical)
Version: OS:
Assigned to: Kent Boortz CPU Architecture:Any

[29 Jul 2006 1:38] Kent Boortz
On some FreeBSD installations, build and running test case "udf" will
fail with

  udf                            [ fail ]

  At line 18: query 'CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so"'
  failed: 1126: Can't open shared library 'udf_example.so'
  (errno: 0 /home/kent/mysql-5.1/sql/.libs/udf_example.so: Undefined symbol "_ZdlPv")

The problem is that the symbol "_ZdlPv" is defined in "libstdc++.so".
The normal gcc built binaries on the download page uses CXX=gcc to
compile the C++ source "udf_example.cc", and this will include a
reference to this symbol, but not a reference to the library.

How to repeat:
Build with CXX=gcc on FreeBSD 5.1 and gcc 3.2.2,
and run the test case "udf".

Suggested fix:
There is no need for "udf_example.cc" to be C++ source.
[29 Jul 2006 2:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


ChangeSet@1.2222, 2006-07-29 04:41:50+02:00, kent@mysql.com +3 -0
  udf_example.c, udf.test, Makefile.am:
    Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)