Undefined symbol _increment_page_get_statistics

Bug #666223 reported by Alexander Skwar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
New
Undecided
Unassigned
Percona-XtraDB
Invalid
Undecided
Unassigned

Bug Description

Trying to compile mariadb-5.2.2-gamma on a Solaris 10 Sparc system using Solaris Studio 12.2 compiler. It fails:

[...]
/opt/csw/bin/bash ../libtool --preserve-dup-deps --tag=CXX --mode=link /opt/solstudio12.2/bin/CC -mt -xunroll=2 -xprefetch=auto -xprefetch_level=3 -fsimple=1 -fns=no -noex -xO5 -xmemalign=8s -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -xarch=sparcima -xcache=64/64/2:5120/256/10 -xchip=sparc64vii -DHAVE_RWLOCK_T -R/opt/local/readline/lib -L/opt/local/readline/lib -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 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 event_parse_data.o opt_table_elimination.o create_options.o mini_client_errors.o pack.o client.o my_time.o my_user.o client_plugin.o libndb.la ../storage/myisam/libmyisam.a ../storage/archive/libarchive.a ../storage/blackhole/libblackhole.a ../storage/csv/libcsv.a ../storage/federatedx/libfederatedx.a ../storage/heap/libheap.a ../storage/maria/libaria.a ../storage/myisammrg/libmyisammrg.a ../storage/pbxt/src/libpbxt.a ../storage/xtradb/libxtradb.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -ldl -lmtmalloc -lpthread -lthread -lposix4 -lsocket -lnsl -lm -lpthread -lthread -lrt
libtool: link: /opt/solstudio12.2/bin/CC -mt -xunroll=2 -xprefetch=auto -xprefetch_level=3 -fsimple=1 -fns=no -noex -xO5 -xmemalign=8s -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -xarch=sparcima -xcache=64/64/2:5120/256/10 -xchip=sparc64vii -DHAVE_RWLOCK_T -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 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 event_parse_data.o opt_table_elimination.o create_options.o mini_client_errors.o pack.o client.o my_time.o my_user.o client_plugin.o -L/opt/local/readline/lib ./.libs/libndb.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../storage/myisam/libmyisam.a ../storage/archive/libarchive.a ../storage/blackhole/libblackhole.a ../storage/csv/libcsv.a ../storage/federatedx/libfederatedx.a ../storage/heap/libheap.a ../storage/maria/libaria.a ../storage/myisammrg/libmyisammrg.a ../storage/pbxt/src/libpbxt.a ../storage/xtradb/libxtradb.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -lz -ldl -lmtmalloc -lpthread -lthread -lposix4 -lsocket -lnsl -lm -lpthread -lthread -lrt -mt -R/opt/local/readline/lib
Undefined first referenced
 symbol in file
_increment_page_get_statistics ../storage/xtradb/libxtradb.a(libxtradb_a-buf0buf.o)
ld: fatal: Symbol referencing errors. No output written to mysqld
gmake[3]: *** [mysqld] Error 2
gmake[3]: Leaving directory `/export/home/user/Source/mariadb-5.2.2-gamma/build.32bit.20101025-105329.Optimized/sql'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/export/home/user/Source/mariadb-5.2.2-gamma/build.32bit.20101025-105329.Optimized/sql'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/export/home/user/Source/mariadb-5.2.2-gamma/build.32bit.20101025-105329.Optimized/sql'
gmake: *** [all-recursive] Error 1

You can find the configure call in the attached cfg.sh and at http://paste.pocoo.org/show/280342/ file; log of all the output: http://paste.pocoo.org/show/280341/
Command used for compiling (basically "make"): http://paste.pocoo.org/show/280343/ - log: http://paste.pocoo.org/show/280344/

Revision history for this message
Alexander Skwar (a.skwar) wrote :
Revision history for this message
Sergei Golubchik (sergii) wrote :

I don't see how it could have happened. The function _increment_page_get_statistics is defined as "inline void" in buf0buf.c and it is used only in buf0buf.c - as far as I can see it is perfectly well defined.

May be there's something special in how Sun Studio 12.2 treats inline functions, or may be one of your numerous CC command line switches caused it.

Anyway, I've added Percona-XtraDB to the list of affected projects to let XtraDB developers to look at it.

If you need an quick workaround - try a simpler CC command line, or remove inline from the _increment_page_get_statistics declaration in buf0buf.c

Revision history for this message
Alexander Skwar (a.skwar) wrote :

mariadb-5.1.50 fails with the same error message (using the "complicated" CFLAGS and using the original sources, ie. without removing the inline statement).

mysql-5.1.51 works, though (using the complicated CFLAGS).

Revision history for this message
Colin MacKenzie (nospam2-colinmackenzie) wrote :

I also encounter this same error compiling Percona Server-51-5.1.50 on Solaris 10 x86_64, using a simple configure line:

./configure --with-server-suffix=-percona --enable-thread-safe-client --with-plugins=partition,innodb_plugin

uname follows:
SunOS iqdsol 5.10 Generic_141445-09 i86pc i386 i86pc

I solved using the suggested fix of removing inline from the function in buf0buf.c

Revision history for this message
Stewart Smith (stewart) wrote :

All development of XtraDB has moved under the Percona Server project - https://launchpad.net/percona-server - If this bug can be reproduced against current Percona Server, please file this bug against percona-server (you can simply do so by using the "Also affects project" link above).

Thanks,
Stewart Smith
Director of Server Development
Percona.

Changed in percona-xtradb:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.