Bug #47575 embedded server link error
Submitted: 23 Sep 2009 23:57 Modified: 22 Aug 2011 16:54
Reporter: Paul DuBois Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-6.0-codebase OS:MacOS (10.6.1)
Assigned to: CPU Architecture:Any

[23 Sep 2009 23:57] Paul DuBois
Description:
This is on Mac OS X 10.6.1 (Snow Leopard). I do not observe the problem on Linux.

The --with-embedded-server configure flag causes builds to fail with a link error. This can be seen by building with BUILD/compile-dist. The end of the build attempt looks like this:

Making all in examples
for f in mysqltest.cc mysql.cc readline.cc completion_hash.cc my_readline.h sql_string.h completion_hash.h; do \
	  rm -f $f; \
	  /bin/ln -s ../../client/$f $f; \
	done; \
	for f in mysql_client_test.c; do \
	  rm -f $f; \
	  /bin/ln -s ../../tests/$f $f; \
	done
echo timestamp > link_sources
gnumake  all-am
g++ -DEMBEDDED_LIBRARY -DHAVE_CONFIG_H -I. -I../../include  -I../../include -I../../client -I../../regex    -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL  -MT mysqltest.o -MD -MP -MF .deps/mysqltest.Tpo -c -o mysqltest.o mysqltest.cc
mv -f .deps/mysqltest.Tpo .deps/mysqltest.Po
/bin/sh ../../libtool --preserve-dup-deps --tag=CXX   --mode=link g++  -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL    -o mysqltest_embedded mysqltest.o ../../libmysqld/libmysqld.a -ldl    ../../regex/libregex.a -lm    -lm   ../../zlib/libzlt.la  
libtool: link: g++ -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -o mysqltest_embedded mysqltest.o -Wl,-bind_at_load  ../../libmysqld/libmysqld.a -ldl ../../regex/libregex.a -lm -lm ../../zlib/.libs/libzlt.a -lm
ld: duplicate symbol _timed_mutexes in ../../libmysqld/libmysqld.a(my_static.o) and ../../libmysqld/libmysqld.a(my_static.o)
collect2: ld returned 1 exit status
gnumake[4]: *** [mysqltest_embedded] Error 1
gnumake[3]: *** [all] Error 2
gnumake[2]: *** [all-recursive] Error 1
gnumake[1]: *** [all] Error 2
gnumake: *** [all-recursive] Error 1

How to repeat:
See above.
[23 Sep 2009 23:57] Paul DuBois
If I configure without --with-embedded-server, the build succeeds.
[25 Sep 2009 16:44] Valeriy Kravchuk
Can not repeat this with older mysql-6.0 (6.0.12) on Mac OS X 10.5.x. So this maybe either regression or 10.6-specific problem.
[25 Sep 2009 17:00] Paul DuBois
Yes, I do not see this with the mysql-5.0, mysql-5.1, mysql-trunk, (old) mysql-6.0 trees.

I see it only with mysql-6.0-codebase.
[27 Sep 2009 17:57] Valeriy Kravchuk
Can't repeat with recent mysql-6.0-codebase from bzr on Mac OS X 10.5. This is what I did:

./configure --prefix=/Users/openxs/dbs/6.0-codebase --with-embedded-server
make clean
make

and I've got:

...
/bin/mv innotest2b-t innotest2b
/bin/rm -f bench-count-distinct bench-count-distinct-t
/usr/bin/sed \
	  -e 's!@''benchdir''@!/Users/openxs/dbs/6.0-codebase/sql-bench!g' \
	  -e 's!@''bindir''@!/Users/openxs/dbs/6.0-codebase/bin!g' \
	  -e 's!@''scriptdir''@!/Users/openxs/dbs/6.0-codebase/bin!g' \
	  -e 's!@''prefix''@!/Users/openxs/dbs/6.0-codebase!g' \
	  -e 's!@''datadir''@!/Users/openxs/dbs/6.0-codebase/share!g' \
	  -e 's!@''localstatedir''@!/Users/openxs/dbs/6.0-codebase/var!g' \
	  -e 's!@''libexecdir''@!/Users/openxs/dbs/6.0-codebase/libexec!g' \
	  -e 's!@''PERL''@!/usr/bin/perl!' \
	  -e 's!@''VERSION''@!6.0.14-alpha!' \
	  -e 's!@''MYSQL_SERVER_SUFFIX''@!!' \
	  bench-count-distinct.sh > bench-count-distinct-t
/bin/chmod +x bench-count-distinct-t
/bin/mv bench-count-distinct-t bench-count-distinct
Making all in win
make[1]: Nothing to be done for `all'.
valeriy-kravchuks-macbook-pro:mysql-6.0-codebase openxs$ echo $?
0

Same results with:

BUILD/compile-dist --prefix=/Users/openxs/dbs/6.0-codebase --with-embedded-server

Maybe I am doing something wrong?
[28 Sep 2009 14:32] Paul DuBois
With mysql-6.0-codebase on Mac OS X 10.6.1, I executed these commands:

./configure --with-embedded-server
make clean
make

Result:

Making all in examples
for f in mysqltest.cc mysql.cc readline.cc completion_hash.cc my_readline.h sql_string.h completion_hash.h; do \
      rm -f $f; \
      /bin/ln -s ../../client/$f $f; \
    done; \
    for f in mysql_client_test.c; do \
      rm -f $f; \
      /bin/ln -s ../../tests/$f $f; \
    done
echo timestamp > link_sources
make  all-am
g++ -DEMBEDDED_LIBRARY -DHAVE_CONFIG_H -I. -I../../include  -I../../include -I../../client -I../../regex    -O3    -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL  -MT mysqltest.o -MD -MP -MF .deps/mysqltest.Tpo -c -o mysqltest.o mysqltest.cc
mv -f .deps/mysqltest.Tpo .deps/mysqltest.Po
/bin/sh ../../libtool --preserve-dup-deps --tag=CXX   --mode=link g++  -O3    -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL    -o mysqltest_embedded mysqltest.o ../../libmysqld/libmysqld.a -ldl    ../../regex/libregex.a -lm    -lm   ../../zlib/libzlt.la
libtool: link: g++ -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -o mysqltest_embedded mysqltest.o -Wl,-bind_at_load  ../../libmysqld/libmysqld.a -ldl ../../regex/libregex.a -lm -lm ../../zlib/.libs/libzlt.a -lm
ld: duplicate symbol _timed_mutexes in ../../libmysqld/libmysqld.a(my_static.o) and ../../libmysqld/libmysqld.a(my_static.o)
collect2: ld returned 1 exit status
make[4]: *** [mysqltest_embedded] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

So perhaps it specific to Snow Leopard (Mac OS 10.6, I am using 10.6.1)?
[28 Sep 2009 16:44] Valeriy Kravchuk
Tried again as explained in the last comment. Not repeatable on Mac OS X 10.5.x. Should be specific to 10.6.1 (and/or Xcode/gcc/tools versions there). I do not have 10.6.1 to verify this, sorry.
[30 Sep 2009 9:24] Geert Vanderkelen
Verified using MySQL 6.0 bzr checkout on MacOS X 10.6.1 (Snow Leopard for search engines..)

g++ -DEMBEDDED_LIBRARY -DHAVE_CONFIG_H -I. -I../../include  -I../../include -I../../client -I../../regex    -O3    -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL  -MT mysqltest.o -MD -MP -MF .deps/mysqltest.Tpo -c -o mysqltest.o mysqltest.cc
mv -f .deps/mysqltest.Tpo .deps/mysqltest.Po
/bin/sh ../../libtool --preserve-dup-deps --tag=CXX   --mode=link g++  -O3    -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL    -o mysqltest_embedded mysqltest.o ../../libmysqld/libmysqld.a -ldl    ../../regex/libregex.a -lm    -lm   ../../zlib/libzlt.la  
libtool: link: g++ -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -o mysqltest_embedded mysqltest.o -Wl,-bind_at_load  ../../libmysqld/libmysqld.a -ldl ../../regex/libregex.a -lm -lm ../../zlib/.libs/libzlt.a -lm
ld: duplicate symbol _timed_mutexes in ../../libmysqld/libmysqld.a(my_static.o) and ../../libmysqld/libmysqld.a(my_static.o)
collect2: ld returned 1 exit status
make[4]: *** [mysqltest_embedded] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
[27 Nov 2009 14:46] Georgi Kodinov
I also get that on my 10.6.2 using the latest xcode
[18 Aug 2011 18:13] Joerg Bruehe
The latest entry in here is nearly 2 years old, and
the bug is about a version which we are not continuing.

Shouldn't we close it, either as "Can't repeat" or as "Not supported"?
[22 Aug 2011 16:54] Joerg Bruehe
The reporter agrees:

As the former 6.0 release series is not pursued any more
(to which this bug was specific),
there is no use in keeping this bug open.

Set it to "Unsupported" (referring to that code base).