Bug #13388 Unsatisfied symbol: Rotate_log_event::is_valid()
Submitted: 21 Sep 2005 20:26 Modified: 24 May 2006 18:01
Reporter: Patrick Briggs Email Updates:
Status: Unsupported Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.1.14 OS:HP/UX (HP-UX 11.11)
Assigned to: CPU Architecture:Any

[21 Sep 2005 20:26] Patrick Briggs
When attempting to compile MySQL-4.1.14 on HP-UX 11i with GCC-4.0.1 compiler, the compile fails with the error:

/usr/ccs/bin/ld: Unsatisfied symbols:
   Rotate_log_event::is_valid()     (first referenced in slave.o) (data)
collect2: ld returned 1 exit status

This occurs in a linking step in the directory mysql-4.1.14/sql

g++ -O3 -DDBUG_OFF -O3 -march=2.0 -fno-implicit-templates -fno-exceptions -fno-rtti -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -o mysqld sql_lex.o sql_handler.o item.o item_sum.o item_buff.o item_func.o item_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o item_subselect.o item_row.o item_geofunc.o field.o strfunc.o key.o sql_class.o sql_list.o net_serv.o protocol.o sql_state.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_prepare.o sql_error.o sql_update.o sql_delete.o uniques.o sql_do.o procedure.o item_uniq.o sql_test.o log.o log_event.o init.o derror.o sql_acl.o unireg.o des_key_file.o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innodb.o ha_isam.o ha_isammrg.o ha_ndbcluster.o sql_db.o sql_table.o sql_rename.o sql_crypt.o sql_load.o mf_iocache.o field_conv.o sql_show.o sql_udf.o sql_analyse.o sql_cache.o slave.o sql_repl.o sql_union.o sql_derived.o client.o sql_client.o mini_client_errors.o pack.o stacktrace.o repl_failsafe.o gstream.o spatial.o sql_help.o protocol_cursor.o tztime.o my_time.o ha_example.o ha_archive.o ha_tina.o ha_blackhole.o  ../innobase/usr/libusr.a ../innobase/srv/libsrv.a ../innobase/dict/libdict.a ../innobase/que/libque.a ../innobase/srv/libsrv.a ../innobase/ibuf/libibuf.a ../innobase/row/librow.a ../innobase/pars/libpars.a ../innobase/btr/libbtr.a ../innobase/trx/libtrx.a ../innobase/read/libread.a ../innobase/usr/libusr.a ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a ../innobase/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a ../innobase/fut/libfut.a ../innobase/fil/libfil.a ../innobase/lock/liblock.a ../innobase/mtr/libmtr.a ../innobase/page/libpage.a ../innobase/rem/librem.a ../innobase/thr/libthr.a ../innobase/sync/libsync.a ../innobase/data/libdata.a ../innobase/mach/libmach.a ../innobase/ha/libha.a ../innobase/dyn/libdyn.a ../innobase/mem/libmem.a ../innobase/sync/libsync.a ../innobase/ut/libut.a ../innobase/os/libos.a ../innobase/ut/libut.a -lrt ../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 -lpthread -lcrypt -lnsl -lm -lpthread
/usr/ccs/bin/ld: Unsatisfied symbols:
   Rotate_log_event::is_valid()     (first referenced in slave.o) (data)
collect2: ld returned 1 exit status
make[4]: *** [mysqld] Error 1
make[4]: Leaving directory `/home/tec3712/software/mysql-4.1.14/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tec3712/software/mysql-4.1.14/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/tec3712/software/mysql-4.1.14/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tec3712/software/mysql-4.1.14'
make: *** [all] Error 2

How to repeat:
Use an HP-UX 11i O/S system with GCC-4.0.1 C compile binaries provided by the HP-UX Software Porting Archive Center http://hpux.cs.utah.edu/

Configure MySQL-4.1.14 with the following options:

./configure --prefix=/opt/mysql --enable-thread-safe-client --enable-local-infile

Run make...

Results in the compiler/linker error described.
[22 Sep 2005 8:21] Valeriy Kravchuk
Have you tried to compile with other GCC versions? I'd like to know, is it a GCC 4-specific issue or general problem on HP-UX.
[22 Sep 2005 17:19] Patrick Briggs
It looks like it is a problem with GCC-4.0.1 because when I tried GCC-3.4.4 binaries, it finally compiled ok.  I thought I already tried that, but I guess not.  When I tried 3.4.1 GCC, it would hang on sort.c and I've have to CTRL-C to get out of it.  So I think I assumed 3.4.4 would do the same thing and wouldn't work.
[22 Sep 2005 17:49] Valeriy Kravchuk
So, it looks like a GCC bug, and we do not really provide support for build process for platforms that have our official binaries available. Our binaries on HP-UX 11.11 are built using HP's own compiler. Looks like you have to figure out the proper version and options yourself. Sorry.
[24 May 2006 14:33] Vito Robar
I had the same problems on HP-UX 11.11 with gcc 4.0.2 and 4.1.0. I solved
the problem with gcc 4.1.0 the following way:

after configure, edit the file sql/Makefile and change all occurencies of
optimizing options -O3 to -O2.
Run make and it should compile successfully.
[24 May 2006 18:01] Patrick Briggs
This problem doesn't manifest itself when compiling MySQL 5.0.21 code.  I've since switched to 5.0.x.  The HP-UX 11.11 binaries provided by MySQL didn't include shared libraries, which makes them useless when compiling PHP to use with MySQL.