Bug #7135 Problem with UDFs on QNX
Submitted: 9 Dec 2004 16:38 Modified: 13 Dec 2004 20:58
Reporter: Jani Tolonen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S2 (Serious)
Version:4.1 OS:Other (QNX)
Assigned to: Lenz Grimmer CPU Architecture:Any

[9 Dec 2004 16:38] Jani Tolonen
Description:
Some problems in 4.1.7 MySQL / QNX release, which need to be fixed in
the future builds:

1) Use qcc instead of gcc
2) configure has several occassions of nto-qnx, while it should be
nto-qnx*. This is probably a bug in aclocal.
3) Use --enable-shared=yes
4) Use -Wl -E options when linking.

After this, it should be possible to compile and use the sql/udf_example.cc
on QNX 6.2.1 or higher.

A note: In QNX 6.3.0 the linker is broken. Upgrade to latest service pack
to get this fixed.

How to repeat:
1) Open 4.1.7 source, do configure, make, make install
2) cd sql; make udf_example.so
3) Start mysqld and try to create one of the functions defined in
udf_example.cc.

If you have a faulty built, it will either result in a core dump or
unknown symbol -errors.

Suggested fix:
See description.
[9 Dec 2004 16:46] Lenz Grimmer
Future QNX binaries will now be compiled with "qcc" instead of "gcc". The compile flags
"-Wl -E" have been added to the compile options.

To fix the aclocal bug, the autotools/libtool on the central build machine need to be updated.
This is planned, but not finished yet (we will actually move the building of the source tarball
to a different machine)
[9 Dec 2004 21:52] Robert Rutherford
The new compile options should actually be "-Wl,-E" (with the comma!) not "-Wl -E" as described here.
[10 Dec 2004 7:06] Lenz Grimmer
Robert, thanks a lot noticing this! I now updated CFLAGS/CXXFLAGS to use "-Wl,-E" instead...
[13 Dec 2004 20:58] Lenz Grimmer
We have now moved the building of the source tarball to a new build machine with up-to-date autoconf/automake/libtool packages. This resolves problem 2) and thus fixes all issues reported. By the way, using "--enable-shared" is not required to generate a dynamically linked mysqld binary. It just enables building the mysql client libraries as shared libraries in addition to the static ones.