Bug #5343 | Compile failure on Cygwin/Windows | ||
---|---|---|---|
Submitted: | 1 Sep 2004 14:05 | Modified: | 16 May 2005 14:41 |
Reporter: | Lenz Grimmer | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S2 (Serious) |
Version: | 4.0 | OS: | Windows (Windows/Cygwin) |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[1 Sep 2004 14:05]
Lenz Grimmer
[1 Sep 2004 14:10]
Lenz Grimmer
config.log.gz
Attachment: config.log.gz (application/x-gzip-compressed, text), 28.30 KiB.
[26 Sep 2004 17:35]
Richard Dahlstedt
Seems as though Cygwin either doesn't fully implement the pthread interface or MySQL assumes a particular pthread interface. In either case the fix to enable compilation of mysys/my_thr_init.c is as follows: Original (lines #69-73): 69: #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP 70: pthread_mutexattr_init(&my_errchk_mutexattr); 71: pthread_mutexattr_setkind_np(&my_errchk_mutexattr, 72: PTHREAD_MUTEX_ERRORCHECK_NP); 73: #endif Change lines 71 & 72 to: #ifdef __CYGWIN__ pthread_mutexattr_settype(&my_errchk_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #else pthread_mutexattr_setkind_np(&my_errchk_mutexattr, PTHREAD_MUTEX_ERRORCHECK_NP); #endif This gets it to compile properly. Came across another compilation error afterwards which I am currently working on. Once I have completed the full compilation will update as to whether this truly works or not.
[4 Oct 2004 16:06]
Lenz Grimmer
Thanks for the suggestion, Richard! Please keep up posted. Joerg, can you please take a look at this?
[7 Oct 2004 11:51]
Lenz Grimmer
Bug #5947 was marked as a duplicate of this one.
[23 Oct 2004 15:22]
Richard Dahlstedt
Finally resolved my last issue in compiling 4.0.21 under Cygwin. Seems that the #pragma interface bug in gcc under Cygwin (http://sources.redhat.com/ml/cygwin/2003-12/msg00053.html) was the culprit. However, as per that reference's fix I still needed to make the change previously stated above related to pthreads in addition to not using '--enable-assembler' when running configure.
[16 May 2005 14:41]
Magnus Blåudd
Thank you for taking the time to report this problem. It has been fixed in mysql 4.1.13 and 5.0.6, please use one of those versions. See bug#10241 http://bugs.mysql.com/bug.php?id=10241