Bug #45057 installation issue under cygwin env
Submitted: 25 May 2009 3:31 Modified: 29 May 2009 9:43
Reporter: Hailin Hu Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.4.0 OS:Windows (XP SP3 with Cygwin)
Assigned to: CPU Architecture:Any
Tags: innodb, readline

[25 May 2009 3:31] Hailin Hu
1. The bundled readline interrupts configure under cygwin.
2. The default C compiler flag -O3 doesn't work properly under cygwin with gcc 3.4.4

Both of them seems to be platform relevant issues, but a platform specific configure patch is still welcomed.

Some details:
1. Cygwin doesn't provide a sys/ttydefaults.h file, some people say a copy from *nix is fine.
2. -frename-registers option is the bad. So, instead of CFLAGS=-O2, CFLAGS=-fno-rename-registers also make the life better. Since I'm not familiar with gcc stuffs, I can't figure out what happened indeed. Also, gcc4 seems to work well.

$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure --verbose --program-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

How to repeat:
cd /usr/local/src/
wget http://dev.mysql.com/get/Downloads/MySQL-5.4/mysql-5.4.0-beta.tar.gz/from/http://ftp.jaist...
tar zxf mysql-5.4.0-beta.tar.gz
cd mysql-5.4.0-beta/
gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include    -O3    -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: sys/ttydefaults.h: No such file or directory

make distclean
./configure --without-readline
 gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../regex -I../../storage/innobase/include -I../../sql -I. -DMYSQL_DYNAMIC_PLUGIN -O3 -MT ha_innodb_la-buf0buf.lo -MD -MP -MF .deps/ha_innodb_la-buf0buf.Tpo -c buf/buf0buf.c  -DDLL_EXPORT -DPIC -o .libs/ha_innodb_la-buf0buf.o
/cygdrive/d/DOCUME~1/KO_KAI~1/LOCALS~1/Temp/ccitUnLE.s: Assembler messages:
/cygdrive/d/DOCUME~1/KO_KAI~1/LOCALS~1/Temp/ccitUnLE.s:1338: Error: bad register name `%sil'
/cygdrive/d/DOCUME~1/KO_KAI~1/LOCALS~1/Temp/ccitUnLE.s:2500: Error: bad register name `%sil'
/cygdrive/d/DOCUME~1/KO_KAI~1/LOCALS~1/Temp/ccitUnLE.s:2879: Error: bad register name `%dil'

make distclean
./configure --without-readline CFLAGS=-O2

It works fine.
[25 May 2009 12:16] MySQL Verification Team
Thank you for the bug report. Sorry but currently the Cygwin isn't supported.
[29 May 2009 9:43] Sveta Smirnova
Really this problem occurs not only on Cygwin. So I set this report as duplicate of bug #45131 which reported for Linux and contains more information about how to repeat.
[9 Jun 2009 13:36] MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=45399.