Bug #61816 | MySQL fails to compile on Mac OS X (Lion 10.7) & Xcode 4.2 DP7 | ||
---|---|---|---|
Submitted: | 11 Jul 2011 0:35 | Modified: | 22 Jul 2011 7:23 |
Reporter: | Rob Lowe | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S2 (Serious) |
Version: | 5.5.x | OS: | MacOS (10.7) |
Assigned to: | Jon Olav Hauglid | CPU Architecture: | Any |
Tags: | xcode xcode4 lion |
[11 Jul 2011 0:35]
Rob Lowe
[11 Jul 2011 5:57]
Dmitry Remesov
The problem is with pthread_getspecific call Suddenly it returns NULL although key is correct and pthread_setspecific on this key is called just once in the beginning So even if i patch the place where comp_err fails ( in ./mysys/my_lib.c function my_stat at "my_errno = errno" ) the mysqld itself fails in another place like this ( in my_delete )
[16 Jul 2011 6:20]
Quanah Gibson-Mount
Broken in mysql 5.5.14 and mysql 5.6.2 as well.
[17 Jul 2011 20:55]
Rob Lowe
From https://github.com/mxcl/homebrew/issues/6277#issuecomment-1591434 @coondog0630 notes: Here's the build number I'm on, Software Mac OS X Lion 10.7 (11A511) g++ and gcc are just symlinks to llvm-g++ and llvm-gcc, check it :]gcc -version i686-apple-darwin11-llvm-gcc-4.2: no input files :]g++ -version i686-apple-darwin11-llvm-g++-4.2: no input files It's not just the standard GNU gcc compiler but rather a hybrid of gcc and llvm. http://gcc.gnu.org/ml/gcc/2005-11/msg00888.html all in all a fresh compiler build out of apple's house -------------------------------------------- ▸▸▸▸▸ bin viral$ ls -la /usr/bin/ | grep gcc lrwxr-xr-x 1 root wheel 12 3 Jul 06:06 cc -> llvm-gcc-4.2 lrwxr-xr-x 1 root wheel 12 3 Jul 06:06 gcc -> llvm-gcc-4.2 -rwxr-xr-x 1 root wheel 113024 16 May 00:37 gcc-4.2 -rwxr-xr-x 1 root wheel 562992 16 May 00:37 i686-apple-darwin11-gcc-4.2.1 lrwxr-xr-x 1 root admin 52 3 Jul 06:06 i686-apple-darwin11-llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-g++-4.2 lrwxr-xr-x 1 root admin 52 3 Jul 06:06 i686-apple-darwin11-llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-gcc-4.2 lrwxr-xr-x 1 root admin 32 3 Jul 06:06 llvm-cpp-4.2 -> ../llvm-gcc-4.2/bin/llvm-cpp-4.2 lrwxr-xr-x 1 root admin 32 3 Jul 06:06 llvm-g++ -> ../llvm-gcc-4.2/bin/llvm-g++-4.2 lrwxr-xr-x 1 root admin 32 3 Jul 06:06 llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2 lrwxr-xr-x 1 root admin 32 3 Jul 06:06 llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2 lrwxr-xr-x 1 root admin 32 3 Jul 06:06 llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2 ▸▸▸▸▸ bin viral$ gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ▸▸▸▸▸ bin viral$ gcc-4.2 --version i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[22 Jul 2011 7:23]
Jon Olav Hauglid
Hello! Thank you for the bug report. I cannot repeat this segfault using the release version of OS X 10.7 (Lion): i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) So I'm closing this bug as "Can't repeat". However, compilation will instead fail with: /mysys/my_init.c:103: warning: implicit declaration of function ‘pthread_init’ Technically, it can be debated if this is really a MySQL issue, however we have implemented a fix which avoids the problem. It is scheduled to be a part of MySQL 5.5.16. The changeset can be seen here: http://lists.mysql.com/commits/140413