Bug #37660 Build error for backup on Solaris
Submitted: 26 Jun 2008 10:00 Modified: 7 Aug 2008 15:31
Reporter: Oystein Grovlen Email Updates:
Status: Closed
Category:Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup OS:Sun Solaris
Assigned to: Oystein Grovlen Target Version:6.0
Triage: D3 (Medium)

[26 Jun 2008 10:00] Oystein Grovlen
Description:
Pushbuild during linking on Solaris fails with following error:

ccache gcc -g -DSAFE_MUTEX -m64 -O2 -g -mtune=k8 -DMY_ATOMIC_MODE_RWLOCKS
-fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -m64 -O2 -g -mtune=k8
-static-libgcc -o mysqld sql_lex.o sql_handler.o sql_partition.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 item_xmlfunc.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
sql_connect.o scheduler.o sql_parse.o set_var.o sql_yacc.o sql_base.o table.o
sql_select.o sql_insert.o sql_profile.o sql_prepare.o sql_error.o sql_locale.o
sql_update.o sql_delete.o uniques.o sql_do.o procedure.o sql_test.o log.o init.o derror.o
sql_acl.o unireg.o des_key_file.o log_event.o rpl_record.o log_event_old.o
rpl_record_old.o discover.o time.o opt_range.o opt_sum.o records.o filesort.o handler.o
ha_partition.o debug_sync.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 rpl_filter.o rpl_tblmap.o rpl_utility.o rpl_injector.o rpl_rli.o rpl_mi.o
rpl_reporting.o sql_union.o sql_derived.o sql_client.o stacktrace.o repl_failsafe.o
sql_olap.o sql_view.o gstream.o spatial.o sql_help.o sql_cursor.o tztime.o my_decimal.o
sp_head.o sp_pcontext.o sp_rcontext.o sp.o sp_cache.o parse_file.o sql_trigger.o
event_scheduler.o event_data_objects.o event_queue.o event_db_repository.o events.o
sql_plugin.o sql_binlog.o sql_builtin.o sql_tablespace.o partition_info.o sql_servers.o
sql_audit.o sha2.o ddl_blocker.o si_objects.o event_parse_data.o mini_client_errors.o
pack.o client.o my_time.o my_user.o -fexceptions  ./.libs/libndb.a -lnsl -lrt -lresolv
-lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread -lnsl -lrt
-lresolv -lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread
../extra/libevent/libevent.a ../storage/archive/libarchive.a
../storage/blackhole/libblackhole.a ../storage/csv/libcsv.a ../storage/falcon/libfalcon.a
../storage/federated/libfederated.a ../storage/heap/libheap.a
../storage/innobase/libinnobase.a ../storage/myisam/libmyisam.a
../storage/myisammrg/libmyisammrg.a ../storage/ndb/src/.libs/libndbclient.a
../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a
../strings/libmystrings.a ../zlib/.libs/libzlt.a -lrt -lresolv -lsocket -lnsl
/builds/wesolows/x86/gcc-3.4.3/lib/amd64/libstdc++.so
-L/builds/wesolows/gcc-build/i386-pc-solaris2.10.1/amd64/libstdc++-v3/src
-L/builds/wesolows/gcc-build/i386-pc-solaris2.10.1/amd64/libstdc++-v3/src/.libs -lm -lm
-lm -L/builds/wesolows/gcc-build/gcc/amd64 -L/lib/amd64 -L/usr/lib/amd64 -lgcc_s_amd64
-lgcc_s_amd64 -lm -lgcc_s_amd64 -lgcc_s_amd64 -ldl ../extra/yassl/src/.libs/libyassl.a
-lnsl -lrt -lresolv -lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread
-lthread -lnsl -lrt -lresolv -lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl
-lpthread -lthread ../extra/yassl/taocrypt/src/.libs/libtaocrypt.a -lnsl -lrt -lresolv
-lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread -lnsl -lrt
-lresolv -lsocket -lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread
backup/.libs/libbackup.a -lnsl -lrt -lresolv -lsocket -lpthread -lthread -lrt -lresolv
-lsocket -lnsl -lpthread -lthread -lnsl -lrt -lresolv -lsocket -lpthread -lthread -lrt
-lresolv -lsocket -lnsl -lpthread -lthread -lnsl -lrt -lresolv -lsocket -lpthread
-lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread -lnsl -lrt -lresolv -lsocket
-lpthread -lthread -lrt -lresolv -lsocket -lnsl -lpthread -lthread -lnsl -lrt -lresolv
-lsocket -lpthread -lthread -lrt -lresolv -lgen -lsocket -lnsl -lm -lmtmalloc -lpthread
-lthread -Wl,-R -Wl,/builds/wesolows/x86/gcc-3.4.3/lib/amd64 -Wl,-R
-Wl,/builds/wesolows/x86/gcc-3.4.3/lib/amd64
Undefined			first referenced
 symbol  			    in file
backup::Table_ref::describe(char*, unsigned long)
constbackup/.libs/libbackup.a(stream.o)
ld: fatal: Symbol referencing errors. No output written to mysqld
collect2: ld returned 1 exit status
make[3]: *** [mysqld] Error 1
make[3]: Leaving directory
`/export/home/pushbuild/pb/bzr_mysql-6.0-backup/12/mysql-6.0.6-alpha-pb12/sql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/export/home/pushbuild/pb/bzr_mysql-6.0-backup/12/mysql-6.0.6-alpha-pb12/sql'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/export/home/pushbuild/pb/bzr_mysql-6.0-backup/12/mysql-6.0.6-alpha-pb12/sql'
make: *** [all-recursive] Error 1

How to repeat:
Build on Solaris (not as trivial as it sounds)

Suggested fix:
Implementation of Table_ref::describe is defined inline in a separate header file
(backup_engine.h) from the declaration of the class in api_types.h.  This create problems
for files that import the declaration, but not the implementation.  (Since the function is
inline it is not included in object files).  The easiest way to fix this is "un-inline"
the implementation and move it to a .cc file.
[27 Jun 2008 12:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/48637

2645 Oystein Grovlen	2008-06-27
      BUG#37660 Build error for backup on Solaris.
      Implementation of Table_ref::describe was defined inline in a separate he ader file
      (backup_engine.h) from the declaration of the class in api_types.h.  This created
problems
      for files that import the declaration, but not the implementation.  (Since the
function is
      inline it is not included in object files).  To fix this, I "un-inlined"      the
implementation and moved it to backup/kernel.cc.
[27 Jun 2008 12:59] Rafal Somla
Ok to push this.
[27 Jun 2008 13:20] Chuck Bell
Patch approved.
[27 Jun 2008 13:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/48642

2645 Oystein Grovlen	2008-06-27
      BUG#37660 Build error for backup on Solaris.
      Implementation of Table_ref::describe was defined inline in a separate he ader file
      (backup_engine.h) from the declaration of the class in api_types.h.  This created
problems
      for files that import the declaration, but not the implementation.  (Since the
function is
      inline it is not included in object files).  To fix this, I "un-inlined"      the
implementation and moved it to backup/kernel.cc.
[27 Jun 2008 14:35] Oystein Grovlen
Patch has been pushed to mysql-6.0-backup
[7 Aug 2008 15:31] Paul DuBois
Bug does not appear in any released version. No changelog entry needed.