Bug #32632 Compile failure on Mac/Intel with BUILD/compile-pentium
Submitted: 22 Nov 2007 18:50 Modified: 15 Dec 2007 17:00
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:6.0-falcon bk, 6.0 bk OS:MacOS (Intel)
Assigned to: Georgi Kodinov CPU Architecture:Any

[22 Nov 2007 18:50] Hakan Küçükyılmaz
Description:
Compile failure on Mac/Intel with BUILD/compile-pentium

How to repeat:
With latest mysql-6.0-falcon tree from bk:

BUILD/compile-pentium

Making all in mysys
/bin/sh ../../libtool --preserve-dup-deps --tag=CC --mode=link gcc  -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wunused-parameter -mtune=pentium-m -O3 -fno-omit-frame-pointer   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL   -o my_atomic-t  my_atomic-t.o ../../unittest/mytap/libmytap.a ../../mysys/libmysys.a ../../dbug/libdbug.a ../../strings/libmystrings.a -lm  
gcc -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wunused-parameter -mtune=pentium-m -O3 -fno-omit-frame-pointer -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -o my_atomic-t my_atomic-t.o  ../../unittest/mytap/libmytap.a ../../mysys/libmysys.a ../../dbug/libdbug.a ../../strings/libmystrings.a -lm
/usr/bin/ld: warning multiple definitions of symbol _qsort
../../mysys/libmysys.a(mf_qsort.o) definition of _qsort in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib(qsort.So) definition of _qsort
/usr/bin/ld: Undefined symbols:
_pthread_yield
collect2: ld returned 1 exit status
make[2]: *** [my_atomic-t] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
[22 Nov 2007 19:21] Sveta Smirnova
Thank you for the report.

Verified as described.
[23 Nov 2007 13:28] Sergei Golubchik
#elif defined(HAVE_PTHREAD_YIELD_NP) /* can be Mac OS X */
#define pthread_yield() pthread_yield_np()
#endif
in include/my_pthread.h
[29 Nov 2007 11:08] 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/38809

ChangeSet@1.2702, 2007-11-29 13:08:26+02:00, gkodinov@macbook.gmz +1 -0
  Bug #32632: Compile failure on Mac/Intel with BUILD/compile-pentium
  
  The autoconf macro to check for pthread_yield_np was not
  discovered by autoheader.
  Fixed by extending the macro call and moving it inside the macro
  definition that handles pthread_yield.
  No test case necessary as this is a configure script change.
[14 Dec 2007 8:22] Bugs System
Pushed into 6.0.5-alpha
[15 Dec 2007 17:00] Paul DuBois
No changelog entry needed.