Bug #4239 latest 4.1.2 bk source failed to build on Mac OS X 10.3
Submitted: 21 Jun 2004 23:51 Modified: 23 Jun 2004 12:58
Reporter: Gene Diveglia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.1.2 bk OS:MacOS (Mac OS X 10.3.4)
Assigned to: Dmitry Lenev CPU Architecture:Any

[21 Jun 2004 23:51] Gene Diveglia
Description:
For the past several days, the bk sources for 4.1.2 have failed to build on OS X 10.3.4.  The following 
show the problem area:

make  all-recursive
Making all in share
make[4]: Nothing to be done for `all'.
source='tztime.cc' object='tztime.o' libtool=no \
depfile='.deps/tztime.Po' tmpdepfile='.deps/tztime.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-4.1.2-alpha\"" 
-DDATADIR="\"/usr/local/mysql-4.1.2-alpha/var\"" -DSHAREDIR="\"/usr/local/mysql-4.1.2-alpha/
share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../ndb/include -I../ndb/include/
ndbapi -I../include -I../regex -I.     -g -O -DSAFE_MUTEX    -fno-implicit-templates -fno-exceptions 
-fno-rtti -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE 
-DSIGNALS_DONT_BREAK_READ  -c -o tztime.o `test -f 'tztime.cc' || echo './'`tztime.cc
/bin/sh ../libtool --preserve-dup-deps --mode=link g++  -g -O -DSAFE_MUTEX    -fno-implicit-
templates -fno-exceptions -fno-rtti -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE 
-DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ    -o mysql_tzinfo_to_sql  tztime.o ../
myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/
libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a   -lz -lm  
mkdir .libs
g++ -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti 
-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE 
-DSIGNALS_DONT_BREAK_READ -o mysql_tzinfo_to_sql tztime.o -Wl,-bind_at_load  ../myisam/
libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../
dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -lm
ld: Undefined symbols:
_main
_THR_MALLOC
_THR_THD
open_tables(THD*, st_table_list*, unsigned*)
sql_print_error(char const*, ...)
localtime_to_TIME(st_time*, tm*)
my_system_gmt_sec(st_time const*, long*, bool*)
mysql_lock_tables(THD*, st_table**, unsigned)
close_thread_tables(THD*, bool, bool)
mysql_unlock_tables(THD*, st_mysql_lock*)
THD::store_globals()
THD::THD[in-charge]()
String::realloc(unsigned)
_global_system_variables
make[4]: *** [mysql_tzinfo_to_sql] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

How to repeat:

./configure --with-ndbcluster --enable-thread-safe-client

make

cd
[22 Jun 2004 17:27] Gene Diveglia
Suggested fix:

The build is failing when attempting to create the linked executable mysql_tzinfo_to_sql.  It appears 
that the unreferenced symbol errors that are causing the build to fail are caused by the failure of the 
build process to define TZINFO2SQL during the compilation of the object file tztime.cc.  Manually 
compiling tzinfo.cc with this define eliminates the unreferenced symbols and executable successfully 
builds.  Makefile.am appears to contain the necessary information to include the above define during 
the build process.  However, I'm not sure why it fails to do so.  It would also seem that tztime.o would 
need to be rebuilt later without this define for inclusion in the mysqld executable.
[22 Jun 2004 17:39] Jonas Oreland
This can be fixed by upgrading automake/autconf (I upgraded to 1.8/2.59).
There is however a fix pending to be pushed (so that you don't have to upgrade automake/autconf)
[22 Jun 2004 17:39] Lenz Grimmer
Thanks for the report. Dmitri, I think this one is already solved by now,
correct?
[23 Jun 2004 12:58] Dmitry Lenev
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

ChangeSet 1.1958.1.1 2004/06/23 13:07:00 dlenev@brandersnatch.localdomain
  Final solution to mysql_tzinfo_to_sql problem.