Re: Safemalloc error in custom storage engine
Hi Tim,
On Wed, Aug 01, 2007 at 04:12:56PM -0500, Timothy P Clark wrote:
> Thanks for your help, Guilhem. My responses are near the bottom. > > Guilhem Bichot <guilhem@mysql.com> wrote on 08/01/2007 03:23:17 PM:
> > > base example code. In fact, I've narrowed it down to the following line > in > > > my Makefile: > > > ha_myengine_la_LIBADD = ... -L$(top_builddir)/mysys/ -lmysys > > > > > > If I remove the linkage to the mysys library, all is well. However, I > > > originally added this linkage for a reason. I was using my_malloc for > > > memory allocations (as suggested in the MySQL Internals Coding > Guidelines), > > > and my .so refused to load because it couldn't resolve to _mymalloc. > Seeing > > > that _mymalloc was defined in libmysys.a, I figured that the best way > to > > > get around that problem was to link my storage engine to that library.
> CONF_COMMAND='../../source/mysql-5.1.19/configure > '--prefix=/gsa/rchgsa/home/t/i/timclark/install/mysql-5.1.19' > '--enable-thread-safe-client' '--enable-local-infile' '--with-debug=full' > '--build=powerpc-ibm-aix5.3.0.0' '--host=powerpc-ibm-aix5.3.0.0' > '--with-machine-type=power' '--with-named-z-libs=no' '--with-pic' > '--with-client-ldflags=-static' '--with-mysqld-ldflags=-static' > '--with-zlib-dir=bundled' '--with-big-tables' '--with-libedit' > '--with-archive-storage-engine' '--with-blackhole-storage-engine' > '--with-example-storage-engine' '--with-federated-storage-engine' > '--with-csv-storage-engine' '--with-extra-charsets=complex' > '--with-mysqld-ldflags=-Wl,-bE:mysqld.exp' 'CC=xlc_r -ma -qstrict > -qmaxmem=8192 -qfullpath -qdbxextra -qldbl128 -qalign=natural' 'CPPFLAGS=' > 'CXXFLAGS=' 'CXX=xlC_r -ma -qstrict -qmaxmem=8192 -qfullpath -qdbxextra > -qldbl128 -qalign=natural' 'LDFLAGS=-Wl,-brtl -Wl,-bexpall' > 'build_alias=powerpc-ibm-aix5.3.0.0' 'host_alias=powerpc-ibm-aix5.3.0.0''
> That makes sense, but I'm sure that the same configure file produced > Makefiles for both my storage engine and the rest of the mysql build. As > well, all of the Makefiles have CFLAGS and CXXFLAGS that include > -DSAFEMALLOC
Yes, looks like engine and libmysys and mysqld are consistently built.
No clue for the moment :/
The fact that just adding libmysys to the link command without
changing anything else in the code, provokes the problem, is beyond me.
How about filing a bug report at bugs.mysql.com, mentioning how you
build (the configure line above, your engine's Makefile.am), attaching
your stripped down engine code (the one which is exactly like
ha_example)?
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Guilhem Bichot
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Lead Software Engineer
/_/ /_/\_, /___/\___\_\___/ Bordeaux, France
<___/ www.mysql.com
--
MySQL Internals Mailing List
For list archives:
http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Thu Aug 2 12:46:50 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:06:24 EDT
|