Skip to content

Loading…

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

Closed
ablyler opened this Issue · 5 comments

4 participants

@ablyler
Homebrew member

os: 10.8
gist: https://gist.github.com/2023237
doctor: no warning or errors

@adamv

And Xcode 4.4 and Clang 4.

@Hnasar

Does it compile with --use-llvm ?

@Sharpie

Looks like a clash with Readline headers:

tmp/homebrew-mysql-5.5.20-xDeo/mysql-5.5.20/client/mysql.cc:1032:16: 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/mysql.cc:2415:38: 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/mysql.cc:2415:59: 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/mysql.cc:2416:31: 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/mysql.cc:2418:3: 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.

@ablyler
Homebrew member

$ readlink /usr/include/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/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.

@ablyler
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.