Bug #42256 Compilation error
Submitted: 22 Jan 2009 0:42 Modified: 27 Apr 2018 11:34
Reporter: Jos Gut­errez de la Concha Mart­ne Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.0.75 OS:Linux
Assigned to: CPU Architecture:Any

[22 Jan 2009 0:42] Jos Gut­errez de la Concha Mart­ne
Description:
mysql fails to compile when debug is enabled

my system is centos-5.2 and gcc is gcc version 4.1.2 20071124

gcc -g -O -DDBUG_ON -DSAFE_MUTEX -rdynamic -o dbug_analyze dbug_analyze.o  libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm -lpthread
libdbug.a(dbug.o): In function `dbug_flush':
/opt/src/mysql-5.0.75/dbug/dbug.c:2264: undefined reference to `safe_mutex_unlock'
libdbug.a(dbug.o): In function `code_state':
/opt/src/mysql-5.0.75/dbug/dbug.c:334: undefined reference to `safe_mutex_init'
libdbug.a(dbug.o): In function `_db_unlock_file_':
/opt/src/mysql-5.0.75/dbug/dbug.c:2281: undefined reference to `safe_mutex_unlock'
libdbug.a(dbug.o): In function `_db_lock_file_':
/opt/src/mysql-5.0.75/dbug/dbug.c:2272: undefined reference to `safe_mutex_lock'
libdbug.a(dbug.o): In function `DBUGCloseFile':
/opt/src/mysql-5.0.75/dbug/dbug.c:1955: undefined reference to `safe_mutex_lock'
libdbug.a(dbug.o): In function `_db_end_':
/opt/src/mysql-5.0.75/dbug/dbug.c:1520: undefined reference to `safe_mutex_lock'
/opt/src/mysql-5.0.75/dbug/dbug.c:1531: undefined reference to `safe_mutex_unlock'
libdbug.a(dbug.o): In function `_db_dump_':
/opt/src/mysql-5.0.75/dbug/dbug.c:1200: undefined reference to `safe_mutex_lock'
libdbug.a(dbug.o): In function `_db_return_':
/opt/src/mysql-5.0.75/dbug/dbug.c:1047: undefined reference to `safe_mutex_lock'
/opt/src/mysql-5.0.75/dbug/dbug.c:1068: undefined reference to `safe_mutex_lock'
libdbug.a(dbug.o): In function `_db_enter_':
/opt/src/mysql-5.0.75/dbug/dbug.c:1000: undefined reference to `safe_mutex_lock'
libdbug.a(dbug.o): In function `_db_doprnt_':
/opt/src/mysql-5.0.75/dbug/dbug.c:1154: undefined reference to `safe_mutex_lock'
collect2: ld returned 1 exit status

How to repeat:
./configure --with-debug --without-test --without-example && make
[22 Jan 2009 10:17] Valeriy Kravchuk
I was able to build without problems on RHEL 5.1 with the same gcc 4.1.2 and libtool 1.5.22. What version of libtool do you have? 

Please, try to run "make clean" before "make", just to be sure this is a clean re-compilation.
[23 Feb 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Apr 2018 11:34] Yngve Svendsen
Posted by developer:
 
Obsolete MySQL version and bug not reproducible.