Bug #45399 Problems installing 5.4.0 on Cygwin
Submitted: 9 Jun 2009 13:15 Modified: 28 Jul 2009 10:46
Reporter: ATCHINARD Ada Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.4.0 OS:Windows (Pro, Service Pack 2 with Cygwin)
Assigned to: CPU Architecture:Any
Tags: compile, compiling, make

[9 Jun 2009 13:15] ATCHINARD Ada
Description:
Hello ! 

I follow instructions on how to install MySQL from source. After configure command, that ends successfully, i run make command that throws error. 
Can you help me please ?

Thanks a lot !
  

How to repeat:
I'm using gcc-4.3.0 
   Using buil-in specs.
   Target: i686-pc-cygwin
   Configured with: ../gcc-4.3.0/configure --enable-languages=all
   Thread model: single

Commands i use to run configure for mysql-5.4.0
   gunzip < mysql-5.4.0.tar.gz | tar -xvf -
   cd mysql-5.4.0
   ./configure --prefix=/usr/local/mysql
   make

I run the configure successfully because i read in prompt "Thank you for choosing MySQL".

I go ahead by running the make command, but now occurs an error. Line where error occurs is this :
   gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include   -03   -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c
   In file included from readline.c:54
   readline/readline.h:70:29: error: sys/ttydefaults.h: No such file or directory
   make[2]: ***[readline.o] Error 1

What can i do to resolve this ?
[9 Jun 2009 13:35] MySQL Verification Team
Thank you for the bug report. Duplicate of bug: http://bugs.mysql.com/bug.php?id=45057  and http://bugs.mysql.com/bug.php?id=45131.
[9 Jun 2009 18:08] ATCHINARD Ada
I have already done what bugs 45131 and 45057 suggested.

I have :
   configure: error: Could not find system readline or libedit libraries
                    Use --with-readline or --with-libedit to use the bundled 
                    versions of libedit or readline
when i run :
   ./configure --without-readline CFLAGS=-O2

I have the same error configuring by :
   ./configure --with-plugins=max-no-ndb CFLAGS="-O2"

I configure successfully with :
   ./configure --without-readline CFLAGS=-O2
but it throws me the former error i noticed you.

So, i don't know if my gcc is not suitable or ... i don't know.

Can you help me fix this problem, please ?
[17 Jun 2009 16:35] Hideo Nagai
install Libs > readline:GNU readline and history libraries
or
create ttydefaults.h

ttydefaults.h is http://paste2.org/p/208685
[27 Jul 2009 17:04] ATCHINARD Ada
It's okay now !
The readline installation works.
Thanks a lot.
[28 Jul 2009 10:46] ATCHINARD Ada
Please, i have another problem.

I try to run mysql by this command :
    mysql install_db
but i get this error :
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

I search for /tmp/mysql.sock, but this file is not in this directory.

Can you help me resolve this, please ?
[24 Jan 2010 18:18] Dolan A.
For the "can't connect to local mysql server to socket /tmp/mysql.sock", try connecting to the host 127.0.0.1, this worked for me (mysql -h 127.0.0.1)