Skip to content


mysql-5.5.20 fails to compile on OS X 10.8 (And Xcode 4.4 and Clang 4) #10885

ablyler opened this Issue · 5 comments

4 participants

Homebrew member

os: 10.8
doctor: no warning or errors


And Xcode 4.4 and Clang 4.


Does it compile with --use-llvm ?


Looks like a clash with Readline headers:

tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/ error: redefinition of '_hist_entry'
typedef struct _hist_entry {
/usr/include/include/readline/readline.h:55:16: note: previous definition is here
typedef struct _hist_entry {
/tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/ error: use of undeclared identifier 'rl_completion_func_t'; did you mean 'rl_compentry_func_t'?
  rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
/tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/ error: expected expression
  rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
/tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/ error: assigning to 'Function *' (aka 'int (*)(const char *, int)') from incompatible type 'rl_compentry_func_t *' (aka 'char *(*)(const char *, int)'); 
  rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/ error: no matching function for call to 'rl_add_defun'
  rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
/usr/include/include/readline/readline.h:195:7: note: candidate function not viable: no known conversion from 'rl_command_func_t *' (aka 'int (*)(int, int)') to 'Function *' (aka 'int (*)(const char *, int)') for 2nd argument; 
int              rl_add_defun(const char *, Function *, int);
5 errors generated.

/usr/include/include/readline/readline.h is one heck of an oddball path---if you did not install readline yourself, I would forward this issue to the MySQL project to see what they can make of it.

Homebrew member

$ readlink /usr/include/include

I think I might have add that link when I was getting homebrew to work on OS X 10.8. I'll remove the link and see what happens. I also have readline installed from homebrew.

Homebrew member

removing that symlink fixed the issue

@ablyler ablyler closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.