On Thu, Apr 01, 1999 at 02:13:54PM -0600, William R. Mattil scribbled:
> Hello All,
>
> I am trying to compile Msql-Mysql-modules-1.2014 one an AIX box (4.2.1)
> using gcc version 2.8.1. The error recieved is:
>
> ld: 0711-317 ERROR: Undefined symbol: .__udivdi3
>
> and compilation stops. Whats curious is that this compiles okay under
> gcc version 2.7.2 (If I recall correctly) but then mysql itself fails to
> compile under 2.7.2 So I seem to be caught between a rock and a hard
> spot. Does anyone have any ideas as to how best resolve this ??
>
Ahhh..... This sounds Awfully familiar.
First, make sure that MySQL, Perl and the module are built with gcc,
preferably with egcs.
If that does not work, it's time to do things by hand. On my HPUX system,
I had to build the shared library by hand. A little while ago, Monty switched
to using a package called libtool to build the libraries. The package uses
ld for the final build of the library. The problem is that ld does not copy
all the functions needed by a gcc/egcs built binary into the final lib. One
must use gcc to build the library.
I whipped up a quick little shell script to rebuild the library:
LIBS="libmysql.lo net.lo password.lo get_password.lo errmsg.lo my_init.lo my_static.lo
my_malloc.lo my_realloc.lo my_create.lo my_delete.lo my_tempnam.lo my_open.lo
mf_casecnv.lo my_read.lo my_write.lo errors.lo my_error.lo my_lib.lo my_getwd.lo
my_div.lo mf_pack.lo my_messnc.lo mf_dirname.lo mf_wcomp.lo typelib.lo safemalloc.lo
my_alloc.lo getopt.lo getopt1.lo getvar.lo mf_format.lo mf_path.lo mf_unixpath.lo
my_fopen.lo mf_loadpath.lo my_pthread.lo my_thr_init.lo thr_mutex.lo mulalloc.lo
string.lo default.lo my_compress.lo array.lo my_once.lo strmov.lo strxmov.lo strnmov.lo
strmake.lo strend.lo strfill.lo ct_init.lo is_prefix.lo int2str.lo str2int.lo strinstr.lo
strcont.lo strcend.lo bchange.lo bmove.lo bmove_upp.lo ctype-latin1.lo dbug.lo"
LIB_OUT=.libs/libmysqlclient.sl.6.0
gcc -shared -fPIC -o $LIB_OUT $LIBS
It's ugly and probably not 100% portable, but you get the idea.
Once I finish my more pressing projects, I'll see if I can get libtool to
do what I want.
Chris...
--
What's the point?
An NT server can be run by an idiot, and usually is.
PGP fingerprint: 063FCE320681C336 78C164FC9B2F91EA