Bug #9714 Freebsd 5.3, libsupc++ problem
Submitted: 7 Apr 2005 12:43 Modified: 28 Apr 2005 2:21
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version: OS:
Assigned to: Magnus Blåudd CPU Architecture:Any

[7 Apr 2005 12:43] Magnus Blåudd
Description:
03794: gcc -g -O -DDBUG_ON -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -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_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 slave03795: .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 sql_olap.o sql_view.o gstream.o spatial.o sql_help.o protocol_cursor.o tztime.o my_time.o my_decimal.o sp_head.o sp_pcontext.o sp_rcontext.o sp.o sp_cache.o parse_file.o sql_trigger.o ha_example.o ha_archive.o ha_tina.o ha_blackhole.o ha_federated.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 ../innobas03796: e/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 ../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 -lcrypt -lm -lsupc++ -lpthread
03797: /usr/lib/libsupc++.a(eh_throw.o)(.text.__cxa_throw+0x1a): In function `__cxa_throw':
03798: : undefined reference to `__cxxabiv1::__unexpected_handler'
03799: /usr/lib/libsupc++.a(eh_throw.o)(.text.__cxa_throw+0x22): In function `__cxa_throw':
03800: : undefined reference to `__cxxabiv1::__terminate_handler'
03801: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt9terminatev+0x8): In function `std::terminate()':
03802: : undefined reference to `__cxxabiv1::__terminate_handler'
03803: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt10unexpectedv+0x8): In function `std::unexpected()':
03804: : undefined reference to `__cxxabiv1::__unexpected_handler'
03805: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt13set_terminatePFvvE+0x4): In function `std::set_terminate(void (*)())':
03806: : undefined reference to `__cxxabiv1::__terminate_handler'
03807: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt13set_terminatePFvvE+0xd): In function `std::set_terminate(void (*)())':
03808: : undefined reference to `__cxxabiv1::__terminate_handler'
03809: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt14set_unexpectedPFvvE+0x4): In function `std::set_unexpected(void (*)())':
03810: : undefined reference to `__cxxabiv1::__unexpected_handler'
03811: /usr/lib/libsupc++.a(eh_terminate.o)(.text._ZSt14set_unexpectedPFvvE+0xd): In function `std::set_unexpected(void (*)())':
03812: : undefined reference to `__cxxabiv1::__unexpected_handler'
03813: gmake[4]: *** [mysqld] Error 1
03814: gmake[4]: Leaving directory `/usr/home/mysqldev/bsd53/mysql-5.0.4-beta/sql'
03815: gmake[3]: *** [all-recursive] Error 1
03816: gmake[3]: Leaving directory `/usr/home/mysqldev/bsd53/mysql-5.0.4-beta/sql'
03817: gmake[2]: *** [all] Error 2
03818: gmake[2]: Leaving directory `/usr/home/mysqldev/bsd53/mysql-5.0.4-beta/sql'
03819: gmake[1]: *** [all-recursive] Error 1
03820: gmake[1]: Leaving directory `/usr/home/mysqldev/bsd53/mysql-5.0.4-beta'
03821: gmake: *** [all] Error 2
03822: 
03823: error: Couldn't execute command, error: 2
03824: 2005-04-07 03:14:05  ABORT compile + link

How to repeat:
Compile on bsd53

Suggested fix:
Use alternate method for linking  stage
[7 Apr 2005 12:48] Magnus Blåudd
Disable linking with lubsupc++ on all freebsd. Future solution would probably be to let AC_ macros generate a small test program to check if this problem exists on the current platform. Will make that for next release.

See  article: http://www.geocrawler.com/archives/3/254/2003/3/450/10409564/
[7 Apr 2005 12:58] Magnus Blåudd
Added a fix that uses the old link flags on all freebsd.
[15 Apr 2005 10:38] 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/internals/24047
[19 Apr 2005 13:01] 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/internals/24142
[27 Apr 2005 9: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/internals/24354
[27 Apr 2005 20:00] Magnus Blåudd
Removed linking with libsupc++ and removed all local static variables as well.
Pushed to 5.0.6
[28 Apr 2005 2:21] Paul DuBois
Noted in 5.0.6 changelog.