List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:January 4 2001 10:24pm
Subject:Bug report (MacOS X Beta)
View as plain text  
Hi!

>>>>> "Kiwi" == Kiwi  <julien@stripped> writes:

Kiwi> I have found a bug in the source of MySQL when trying to use MySQL 3.23.29a and
> PHP 4.0.4 together (in order to use phpMyAdmin) under OS X Beta. I succesfully compiled
> and installed each tool alone, but I got the following problem when restarting apache: the
> symbol "_strtol" was multiply defined.

Kiwi> The std lib of OS X and the "libphp4.lo" (that links against libmysqlclient.a)
> both contained the symbol. The problem comes from the "libmysql/Makefile.in" file. This
> file is referring the source file "strto.*" instead of "strtol.*". The "strtol" function
> is then always compiled in the library, even if it is not needed.

Kiwi> The reference "strto.*" should be changed to "strtol.*" everywhere in the file
> except in the definition of "mystringsextra". This "strto.c" lets import correcty the file
> "strto.c" used in "strtol.c".

Kiwi> This issue should come from the file used to generate the Makefile.in.

I did a quick check of this:

(/my/mysql/libmysql) grep strto Makefile.in
mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo        strnlen.lo
strfill.lo is_prefix.lo                       int2str.lo str2int.lo strinstr.lo
strcont.lo                    strcend.lo                      bchange.lo bmove.lo
bmove_upp.lo longlong2str.lo                        strtoull.lo strtoll.lo llstr.lo      
                  ctype.lo $(LTCHARSET_OBJS)
mystringsextra = strto.c ctype_autoconf.c
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo strtoull.lo strtoll.lo \
(/my/mysql/libmysql)

I can't see any references to strto.* here ?

This may however be a problem that is not trivial to fix;  If strtol
isn't found in the system libraries (libc), then it must be included
in libmysqlclient.a, as otherwise no other clients will work (as they
are probably not linking with OS X)

If strol() is a real problem that can't be fixed by chaning the order
of how you specify your libraries, we may have to add a patch for
MacOS X to redefine strtol to my_strtol on this platform.

Regards,
Monty

Thread
Bug report (MacOS X Beta)Michael Widenius4 Jan
  • Re: Bug report (MacOS X Beta)Thimble Smith5 Jan
Re: Bug report (MacOS X Beta)Mr.Y.SHIVAKANT5 Jan