Bug #18159 mysqlslap ld errors
Submitted: 12 Mar 2006 0:44 Modified: 21 Apr 2008 11:14
Reporter: [ name withheld ] Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.16 OS:Other (irix 6.5.30)
Assigned to: Kent Boortz CPU Architecture:Any

[12 Mar 2006 0:44] [ name withheld ]
Description:
/bin/sh ../libtool --preserve-dup-deps --mode=link CC  -DDBUG_OFF -O3 -mips4 -lfastm -lm -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3   -D_BOOL  -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32  -o mysqlslap  mysqlslap.o   -lpthread ../libmysql_r/libmysqlclient_r.la ../mysys/libmysys.a  -lcrypt -lgen -lnsl -lm   -lz 
CC -DDBUG_OFF -O3 -mips4 -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3 -D_BOOL -o .libs/mysqlslap mysqlslap.o  -lm -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32 -lpthread ../libmysql_r/.libs/libmysqlclient_r.so -lfastm -lm -lpthread -lm -lpthread ../mysys/libmysys.a -lcrypt -lgen -lnsl -lm -lz -Wl,-rpath -Wl,/usr/local/mysql/lib/mysql
ld32: WARNING 84 : /usr/lib32/mips4/libm.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_create" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_delete" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_getspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_setspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlslap] Error 2

must be some -L params missing...

How to repeat:
compile it via:
./configure --prefix=/usr/local/mysql --without-bench --without-docs --without-debug --enable-local-infile

Suggested fix:
add missing linker lines
[23 Mar 2006 15:58] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat a clean build with ./configure --prefix=... only, and inform about the results.
[24 Mar 2006 0:35] [ name withheld ]
yes, sorry, should have tried before. on my way ...
[24 Mar 2006 0:40] [ name withheld ]
okay, sadly same result:

creating mysqladmin
ld32: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_create" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_delete" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_getspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_setspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlslap] Error 2
[26 Apr 2006 10:46] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.1.9 beta just repeased, and inform about the results.
[4 May 2006 2:20] [ name withheld ]
tried 5.1.9 today but still the same.

/bin/sh ../libtool --preserve-dup-deps --mode=link CC  -DDBUG_OFF -O3 -mips4 -lfastm -lm -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3   -D_BOOL  -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32  -o mysqldump  mysqldump.o my_user.o  -lpthread ../libmysql/libmysqlclient.la -lcrypt -lgen -lnsl -lm   -lz 
ld32: WARNING 84 : /usr/lib32/mips4/libm.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
creating mysqladmin
ld32: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_create" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_delete" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_getspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_setspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlslap] Error 2
[12 May 2006 8:11] Valeriy Kravchuk
Verified just as described on our octane2 box, with 5.1.9-beta sources.

I had executed the following commands:

export CC=cc CFLAGS="-O3 -c99 -OPT:Olimit=0 -64" CXXFLAGS="-O3  -c99 -OPT:Olimit=0 -LANG:exceptions=OFF -LANG:std=ON -LANG:libc_in_namespace_std=OFF -64" CXX=CC LDFLAGS="-64"

./configure --prefix=/usr/local/mysql

I've got from make then:

...
        /bin/sh ../libtool --preserve-dup-deps --mode=link CC  -DDBUG_OFF -O3  -
c99 -OPT:Olimit=0 -LANG:exceptions=OFF -LANG:std=ON -LANG:libc_in_namespace_std=OFF -64   -D_BOOL   -64  -o mysqlslap  mysqlslap.o   -lpthread   ../libmysql_r/libmysqlclient_r.la  ../mysys/libmysys.a  -lcrypt -lgen -lm   ../zlib/libz.la
CC -DDBUG_OFF -O3 -c99 -OPT:Olimit=0 -LANG:exceptions=OFF -LANG:std=ON -LANG:lib
c_in_namespace_std=OFF -64 -D_BOOL -64 -o .libs/mysqlslap mysqlslap.o  -lpthread
 ../libmysql_r/.libs/libmysqlclient_r.so -lpthread -lpthread /usr/people/mysqlde
v/valeriy/mysql-5.1.9-beta/zlib/.libs/libz.so -lpthread -lpthread ../mysys/libmy
sys.a ../zlib/.libs/libz.so -lpthread -lcrypt -lgen -lm -lpthread -Wl,-rpath -Wl
,/usr/local/mysql/lib/mysql
ld64: WARNING 84 : /usr/lib64/libgen.so is not used for resolving any symbol.
ld64: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../
mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.
ld64: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ..
/mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.
ld64: INFO    152: Output file removed because of error.
*** Error code 2 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
[18 May 2006 13:39] Magnus Blåudd
It looks like this is problem with how the libmysqlclient_r.la is added to the
link command, that is where those symbols are defined.

1. Go into the client/ directory and check that
../libmysql_r/.libs/libmysqlclient_r.a exists. 
2. If it does exist, use nm to make sure it contains those symbols.
3. If that is the case, change the rule to build mysqlslap in Makefile.am to put
the $LIBMYSQLCLIENT_LA last.

client/Makefile.am:57
>>
mysqlslap_LDADD =               $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
                                @CLIENT_EXTRA_LDFLAGS@ \
                                $(top_builddir)/mysys/libmysys.a \
                                $(LIBMYSQLCLIENT_LA) 
<<
[16 Jun 2006 0:45] [ name withheld ]
still present in 5.1.11.
[20 Aug 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[12 Sep 2006 17:28] Joerg Behrens
I can confirm that BUG  for mysql 5.1.11 on IRIX 6.5.28.

The directory 'libmysql_r/.libs' contains the following entries:

 ll libmysqlclient_r*
-rw-r--r--    1 root     sys       2262212 12. Sep  19:01 libmysqlclient_r.a
lrwxr-xr-x    1 root     sys            22 12. Sep  19:01 libmysqlclient_r.la -> ../libmysqlclient_r.la
-rw-r--r--    1 root     sys           975 12. Sep  19:01 libmysqlclient_r.lai
lrwxr-xr-x    1 root     sys            24 12. Sep  19:01 libmysqlclient_r.so -> libmysqlclient_r.so.16.0
lrwxr-xr-x    1 root     sys            24 12. Sep  19:01 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0
-rwxr-xr-x    1 root     sys       1820296 12. Sep  19:01 libmysqlclient_r.so.16.0

Investigating the archiv it returns that the function my_snprintf is undefined.

 nm libmysqlclient_r.a | grep "|my_snprintf" [84]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf
[8]     |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf
[23]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[11]    |      1408|      76|FUNC |GLOB |DEFAULT  |5      |my_snprintf
[19]    |      3072|      92|FUNC |GLOB |DEFAULT  |5      |my_snprintf_8bit
[29]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[29]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[27]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[29]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[27]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[32]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[35]    |      4416|      96|FUNC |LOCL |DEFAULT  |5      |my_snprintf_ucs2
[93]    |      4416|      96|STAT |LOCL |DEFAULT  |MIPS_TEXT|my_snprintf_ucs2
[27]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[28]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[27]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[28]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[28]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf_8bit
[140]   |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf
[77]    |         0|       0|FUNC |GLOB |DEFAULT  |UNDEF  |my_snprintf

This is different to the shared libary.

 nm libmysqlclient_r.so | grep "|my_snprintf"
[730]   |   4423168|      76|FUNC |GLOB |DEFAULT  |MIPS_TEXT|my_snprintf
[743]   |   4428928|      92|FUNC |GLOB |DEFAULT  |MIPS_TEXT|my_snprintf_8bit
[1894]  |   4492544|      96|STAT |LOCL |DEFAULT  |MIPS_TEXT|my_snprintf_ucs2

 uname -Ra
IRIX64 o2k 6.5 6.5.28m 07010238 IP27
cc -version
MIPSpro Compilers: Version 7.4.4m

Btw: Why are no 5.1.x snapshots available?

regards
Joerg
[4 Nov 2006 5:18] [ name withheld ]
can confirm it for 5.1.12-beta

CC -O3 -mips4 -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3 -D_BOOL -o .libs/mysqlslap mysqlslap.o  -lm -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32 -lpthread ../libmysql_r/.libs/libmysqlclient_r.so -lm -lpthread -lm -lpthread -lfastm -lm -lpthread -lm -lpthread ../mysys/libmysys.a -lgen -lnsl -lm -lz -Wl,-rpath -Wl,/usr/local/mysql/lib/mysql
ld32: WARNING 84 : /usr/lib32/mips4/libm.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_create" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_delete" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_getspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_setspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlslap] Error 2
[4 Nov 2006 8:04] Magnus Blåudd
Can you please try the patch I suggested above?
[12 Nov 2006 19:31] [ name withheld ]
yes, tried the mod but no luck, sorry
[14 Nov 2006 13:54] Magnus Blåudd
I most likely has found the cause. mysqlslap and also mysqlimport are linked directly with libmysys which are compiled with thread support. That is also supposed to be the case for mysqlslap and mysqlimport but the -DUNDEF_THREADS_HACK is set for all binaries in client/ and that means we get different and incompatible compiler flags used in differnt object files. 

Iris isn't one of our supported platforms but it often detect problems that affects other platforms as well, so we should actuall pay more attention to it.

I will modify the Makefile.am in client/
[14 Nov 2006 15:37] [ name withheld ]
>Iris isn't one of our supported platforms but it often detect problems that
>affects other platforms as well, so we should actuall pay more attention to it.
>
>I will modify the Makefile.am in client/

great and thanks!
[8 Feb 2007 17:39] 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/commits/19577

ChangeSet@1.2425, 2007-02-08 18:38:47+01:00, msvensson@pilot.mysql.com +4 -0
  Bug#18159 mysqlslap ld errors
   - All binaries in client/ where built with -DUNDEF_THREADS_HACK
     causing undefined symbols.
   - Fix that by only using UNDEF_THREADS_HACK on applications that
     really need it
[10 Feb 2007 1:20] [ name withheld ]
here's what i got trying 5.1.15
-----------

c99 -O3 -mips4 -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3 -o .libs/mysqlslap mysqlslap.o  -lm -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32 -lpthread ../libmysql_r/.libs/libmysqlclient_r.so -lm -lpthread -lm -lpthread -lfastm -lm -lpthread -lm -lpthread ../mysys/libmysys.a -lgen -lnsl -lm -lz -Wl,-rpath -Wl,/usr/local/mysql/lib/mysql
ld32: WARNING 84 : /usr/lib32/mips4/libm.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: ERROR   33 : Unresolved text symbol "my_snprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "my_vsnprintf" -- 1st referenced by ../mysys/libmysys.a(my_error.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_create" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_key_delete" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_getspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "pthread_setspecific" -- 1st referenced by ../mysys/libmysys.a(my_thr_init.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlslap] Error 2
[10 Feb 2007 2:13] [ name withheld ]
same also happened with 5.2.0
[12 Feb 2007 9:22] Magnus Blåudd
Right but the patch is not in there yet. Sorry.
[2 Mar 2007 17:59] [ name withheld ]
applied the patch (went fine) but then:

CC -O3 -mips4 -TARG:platform=IP27:proc=r12000 -OPT:Olimit=0:roundoff=3:IEEE_arithmetic=3 -D_BOOL -o .libs/mysqlbinlog mysqlbinlog.o mf_tempdir.o my_new.o my_bit.o my_bitmap.o my_vle.o base64.o  -lm -L/usr/local/lib -L/usr/local2/lib -L/usr/nekoware/lib -L/usr/freeware/lib32 -lpthread ../libmysql/.libs/libmysqlclient.so -lm -lm -lfastm -lm -lm -lgen -lnsl -lm -lz -Wl,-rpath -Wl,/usr/local/mysql/lib/mysql
ld32: WARNING 84 : /usr/lib32/libpthread.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: ERROR   33 : Unresolved text symbol "print_header__9Log_eventGP11st_io_cacheP19st_print_event_infob" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "print_base64__9Log_eventGP11st_io_cacheP19st_print_event_infob" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Execute_load_query_log_event::print(__file_s*,st_print_event_info*,const char*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "print__21Create_file_log_eventGP8__file_sP19st_print_event_infob" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Format_description_log_event::Format_description_log_event(unsigned char,const char*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Log_event::read_log_event(const char*,unsigned int,const char**,const Format_description_log_event*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Log_event::read_log_event(st_io_cache*,const Format_description_log_event*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "Query_log_event::__vtbl" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "Load_log_event::__vtbl" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "Start_log_event_v3::__vtbl" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "Append_block_log_event::__vtbl" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Query_log_event::print(__file_s*,st_print_event_info*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Start_log_event_v3::print(__file_s*,st_print_event_info*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "Append_block_log_event::print(__file_s*,st_print_event_info*)" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "__T_15Query_log_event" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "__T_18Start_log_event_v3" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved data symbol "__T_22Append_block_log_event" -- 1st referenced by mysqlbinlog.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[2]: *** [mysqlbinlog] Error 2
gmake[2]: Leaving directory `/mnt/3/temp/mysql-5.1.16-beta/client'
[30 Oct 2007 15:56] Kent Boortz
Feels like this patch is too large, or should be part of
some larger cleanup. In any case, did a build without the
patch for 5.1.22, and could build if configured with

CC=cc CXX=CC CFLAGS=" -c99 -OPT:Olimit=0 -64" CXXFLAGS="  -c99 -OPT:Olimit=0 -LANG:exceptions=OFF -LANG:std=ON -LANG:libc_in_namespace_std=OFF -64" LDFLAGS=-64  ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-comment="MySQL Community Server (GPL)" --with-extra-charsets=complex --with-server-suffix="" --enable-thread-safe-client --enable-local-infile  --disable-shared --with-zlib-dir=bundled --with-big-tables --with-readline --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-innodb

uname reports "IRIX64 octane2 6.5 07080050 IP30", "cc" and "CC" is
"MIPSpro Compilers: Version 7.41".

The trouble is that the resulting server is bad, crashes every
fourth test case running the regression test.

Will rerun build and test with the patch.
[31 Oct 2007 17:07] Magnus Blåudd
Kent, yes that is correct. Some of those changes have been fixed by other patches.

The main thing we want to do to fix the problem is to remove the UNDEF_THREADS_HACK define when we compile the tools that should be built with threads and the libmysqlclient_r library.

Now there is a big kludge where we first define UNDEF_THREADS_HACK, then include my_no_pthread.h and then my_pthread.h so counteract the first no_pthread include. That's funny. ;)

Finally we link with the libmysql_r and mysys that has been compiled with a little different settings - and as you have found we don't export exactly the  same symbols from all libs.

But, compiling on IRIX seems to be a good way to check we have done this right.

Please check the core file and show me a backtrace, once I got it compiled last time it  worked fine.