Bug #2461 Compile error: Undef Symbol "test_thr_alarm"
Submitted: 20 Jan 2004 8:39 Modified: 4 Feb 2004 16:26
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.0.17 OS:Other (SCO Unix 5.0.4)
Assigned to: Michael Widenius CPU Architecture:Any

[20 Jan 2004 8:39] [ name withheld ]
Description:
I have compiled many MySQL version with this setup, most recently 4.0.15.  I am using GCC 2.95.2, and the precompiled FSU Pthreads from mysql.com.  I use "./configure --prefix=/usr/local/mysql --disable-shared" During compilation, I get the following error:

gcc -O3 -DDBUG_OFF -DSCO -o test_thr_alarm -DDEFAULT_BASEDIR=\"/usr/local/mysql\
" -DDATADIR=\"/usr/local/mysql/var\" -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"
 -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DHAVE_CONFIG_H -I./../include -I..
/include -I.. -I. -O3 -DDBUG_OFF -DSCO -DMAIN ./test_thr_alarm.c  libmysys.a ../
dbug/libdbug.a ../strings/libmystrings.a -lgthreads -lsocket -lgthreads -lcrypt
-lm -lgthreads -lsocket -lgthreads
Undefined                       first referenced
 symbol                             in file
pthread_key_delete                  libmysys.a(my_thr_init.o)
test_thr_alarm: fatal error: Symbol referencing errors. No output written to tes
t_thr_alarm
collect2: ld returned 1 exit status
make[2]: *** [test_thr_alarm] Error 1
make[2]: Leaving directory `/appl/ray/mysql-4.0.17/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/appl/ray/mysql-4.0.17'
make: *** [all] Error 2

How to repeat:
# ./configure --prefix=/usr/local/mysql --disable-shared
# make

error will occur during compilation.
[20 Jan 2004 9:51] Boyd Gerber
FSU-threads does not support pthread_key_delete in pthread.c which is the thread library used with SCO OpenServer.
[4 Feb 2004 16:26] Michael Widenius
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:

I have now fixed this for MySQL 4.0.18 by adding a test if pthread_key_delete() exists.

Regards,
Monty