Bug #10330 compile-pentuim-*-max fails: multiple definition of operator new
Submitted: 3 May 2005 10:15 Modified: 4 May 2005 14:43
Reporter: Sergey Petrunya
Status: Closed
Category:Server: Cluster Severity:S3 (Non-critical)
Version:5.0-bk OS:Linux (linux, x86)
Assigned to: Jonas Oreland Target Version:

[3 May 2005 10:15] Sergey Petrunya
Description:
./BUILD/compile-*-max fails with errors like this:

ccache gcc -g -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -Wimplicit -Wreturn-type -Wswitch
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare
-Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy
-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentium4
-march=pentium4 -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC
-DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti
-DUSE_MYSYS_NEW -rdynamic -o ndbd main.o SimBlockList.o
../../../ndb/src/common/portlib/gcc.cpp  blocks/cmvmi/libcmvmi.a blocks/dbacc/libdbacc.a
blocks/dbdict/libdbdict.a blocks/dbdih/libdbdih.a blocks/dblqh/libdblqh.a
blocks/dbtc/libdbtc.a blocks/dbtup/libdbtup.a blocks/ndbfs/libndbfs.a
blocks/ndbcntr/libndbcntr.a blocks/qmgr/libqmgr.a blocks/trix/libtrix.a
blocks/backup/libbackup.a blocks/dbutil/libdbutil.a blocks/suma/libsuma.a
blocks/grep/libgrep.a blocks/dbtux/libdbtux.a vm/libkernel.a error/liberror.a
../../../ndb/src/common/transporter/.libs/libtransporter.a -lpthread -lpthread -lpthread
-lpthread ../../../ndb/src/common/debugger/.libs/libtrace.a -lpthread -lpthread -lpthread
-lpthread ../../../ndb/src/common/debugger/signaldata/.libs/libsignaldataprint.a -lpthread
-lpthread -lpthread -lpthread ../../../ndb/src/common/logger/.libs/liblogger.a -lpthread
-lpthread -lpthread -lpthread ../../../ndb/src/common/mgmcommon/.libs/libmgmsrvcommon.a
-lpthread -lpthread -lpthread -lpthread ../../../ndb/src/mgmapi/.libs/libmgmapi.a
-lpthread -lpthread -lpthread -lpthread
../../../ndb/src/common/portlib/.libs/libportlib.a -lpthread -lpthread -lpthread
-lpthread ../../../ndb/src/common/util/.libs/libgeneral.a -lpthread -lpthread -lpthread
-lpthread ../../../dbug/libdbug.a ../../../mysys/libmysys.a
../../../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm -lpthread
../../../mysys/libmysys.a(my_new.o)(.text+0x0): In function `operator new(unsigned)':
/home/psergey/mysql-5.0-test-valgrind/mysys/my_new.cc:27: multiple definition of
`operator new(unsigned)'
../../../ndb/src/common/util/.libs/libgeneral.a(new.o)(.text+0x0):/home/psergey/mysql-5.0-test-valgrind/ndb/src/common/util/new.cpp:12:
first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
Warning: size of symbol `operator new(unsigned)' changed from 100 in
../../../ndb/src/common/util/.libs/libgeneral.a(new.o) to 38 in
../../../mysys/libmysys.a(my_new.o)
../../../mysys/libmysys.a(my_new.o)(.text+0x26): In function `operator new[](unsigned)':
/home/psergey/mysql-5.0-test-valgrind/mysys/my_new.cc:32: multiple definition of
`operator new[](unsigned)'
../../../ndb/src/common/util/.libs/libgeneral.a(new.o)(.text+0x64):/home/psergey/mysql-5.0-test-valgrind/ndb/src/common/util/new.cpp:22:
first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
Warning: size of symbol `operator new[](unsigned)' changed from 100 in
../../../ndb/src/common/util/.libs/libgeneral.a(new.o) to 38 in
../../../mysys/libmysys.a(my_new.o)
../../../mysys/libmysys.a(my_new.o)(.text+0x4c): In function `operator delete(void*)':
/home/psergey/mysql-5.0-test-valgrind/mysys/my_new.cc:37: multiple definition of
`operator delete(void*)'
../../../ndb/src/common/util/.libs/libgeneral.a(new.o)(.text+0xc8):/home/psergey/mysql-5.0-test-valgrind/ndb/src/common/util/new.cpp:32:
first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
Warning: size of symbol `operator delete(void*)' changed from 41 in
../../../ndb/src/common/util/.libs/libgeneral.a(new.o) to 25 in
../../../mysys/libmysys.a(my_new.o)
../../../mysys/libmysys.a(my_new.o)(.text+0x66): In function `operator delete[](void*)':
/home/psergey/mysql-5.0-test-valgrind/mysys/my_new.cc:43: multiple definition of
`operator delete[](void*)'
../../../ndb/src/common/util/.libs/libgeneral.a(new.o)(.text+0xf2):/home/psergey/mysql-5.0-test-valgrind/ndb/src/common/util/new.cpp:38:
first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
Warning: size of symbol `operator delete[](void*)' changed from 41 in
../../../ndb/src/common/util/.libs/libgeneral.a(new.o) to 25 in
../../../mysys/libmysys.a(my_new.o)

How to repeat:
Try to compile current 5.0 with compile-pentium-valgrind-max or
compile-pentium-debug-max.
[3 May 2005 19:14] Miguel Solorzano
With latest BK source:

ChangeSet@1.1906.1.1, 2005-05-03 10:23:10+04:00, sergefp@mysql.com
  Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
  into mysql.com:/home/psergey/mysql-5.0-test-valgrind

ChangeSet@1.1907, 2005-05-03 08:40:35+03:00, heikki@hundin.mysql.fi
  ha_innodb.cc:
    Return a value from innobase_repl_report_sent_binlog()

ChangeSet@1.1906, 2005-05-02 11:45:06-07:00, jimw@mysql.com
  Update test results
[4 May 2005 11:44] Martin Skold
Temporary workaround:
CXX=g++ ./BUILD/compile-*-max