I'm trying to compile mysql 4.0.17 on Interix 3.5 (w2k with SFU 3.5). Things go quite good once i added _ALL_SOURCE, but i get a weird linking problem: g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -D_ALL_SOURCE -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 field.o key.o sql_class.o sql_list.o net_serv.o net_pkg.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o convert.o set_var.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.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 time.o opt_range.o opt_sum.o opt_ft.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 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 mini_client.o mini_client_errors.o stacktrace.o repl_failsafe.o sql_olap.o ../innobase/usr/libusr.a ../innobase/odbc/libodbc.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/com/libcom.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 ../isam/libnisam.a ../merge/libmerge.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 -ldl -lcrypt -lm item_timefunc.o(.text+0x246e):item_timefunc.cc: undefined reference to `__static_initialization_and_destruction_0(int, int)' item_timefunc.o(.text+0x248e):item_timefunc.cc: undefined reference to `__static_initialization_and_destruction_0(int, int)' convert.o(.text+0xfe):convert.cc: undefined reference to `__static_initialization_and_destruction_0(int, int)' log.o(.text+0x31be):log.cc: undefined reference to `__static_initialization_and_destruction_0(int, int)' log.o(.text+0x31de):log.cc: undefined reference to `__static_initialization_and_destruction_0(int, int)' collect2: ld returned 1 exit status I looked in other objects, and some of them also have this symbol, but in those other objects this symbol is always defined inside the object (not external). Compiling the intermediate steps also clearly shows this: grep static_init *.s item_strfunc.s: .def __Z41__static_initialization_and_destruction_0ii; .scl 3; .type 32; .endef item_strfunc.s:__Z41__static_initialization_and_destruction_0ii: item_strfunc.s: call __Z41__static_initialization_and_destruction_0ii item_strfunc.s: call __Z41__static_initialization_and_destruction_0ii item_timefunc.s: call __Z41__static_initialization_and_destruction_0ii item_timefunc.s: call __Z41__static_initialization_and_destruction_0ii item_timefunc.s: .def __Z41__static_initialization_and_destruction_0ii; .scl 3; .type 32; .endef (item_strfunc.s is fine, item_timefunc.s not). >From what i found looking for this symbol on google, these are internal functions created by g++ during the compile stage. Why would g++ use them but not defined them in these objects? Is this supposed to be possible? And if so, where should i link these functions against at mysqld link time? What should i do to fix this? thanks, -seb. bash-2.05b$ gcc -v Reading specs from /opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/specs Configured with: : (reconfigured) : (reconfigured) /dev/fs/C/gnu2.intel/egcs.source//configure --verbose --prefix=/opt/gcc.3.3 --disable-shared --with-stabs --enable-nls --with-local-prefix=/opt/gcc.3.3 --with-gnu-as --with-gnu-ld --enable-targets=i586-pc-interix3 --enable-threads=posix Thread model: posix gcc version 3.3