Bug #30966 mysql-proxy build fails on RHEL5 / CentOS5 (make dist fails)
Submitted: 12 Sep 2007 7:09 Modified: 21 Oct 2007 8:32
Reporter: Simon Mudd (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:237 OS:Linux
Assigned to: CPU Architecture:Any

[12 Sep 2007 7:09] Simon Mudd
Description:
The build on CentOS5 fails as shown below.

...
checking for inline... inline
checking whether char is unsigned... no
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for library containing hstrerror... none required
checking for MySQL support... yes
checking for mysql_config... /usr/bin/mysql_config
checking for MySQL includes at... -I/usr/include/mysql
checking errmsg.h usability... yes
checking errmsg.h presence... yes
checking for errmsg.h... yes
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking for mysqltest binary... /usr/bin/mysqltest
checking for mysql libs... -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto
checking for pkg-config... /usr/bin/pkg-config
checking for lua... yes
checking pkg-config is at least version 0.9.0... yes
checking for LUA... yes
checking for GLIB... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for strerror... yes
checking for getcwd... yes
checking for chdir... yes
checking for event_init in -levent... yes
checking event.h usability... yes
checking event.h presence... yes
checking for event.h... yes
checking for check - version >= 0.8.2... no
*** Could not run check test program, checking why...
*** The test program failed to compile or link. See the file config.log for
*** the exact error that occured.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating lib/Makefile
config.status: creating lib/proxy/Makefile
config.status: creating tests/Makefile
config.status: creating tests/suite/Makefile
config.status: creating tests/suite/base/Makefile
config.status: creating tests/suite/base/t/Makefile
config.status: creating tests/suite/base/r/Makefile
config.status: creating tests/suite/bugs/Makefile
config.status: creating tests/suite/bugs/t/Makefile
config.status: creating tests/suite/bugs/r/Makefile
config.status: creating tests/unit/Makefile
config.status: creating mysql-proxy.spec
config.status: creating config.h
config.status: executing depfiles commands
{ test ! -d mysql-proxy-0.6.1 || { find mysql-proxy-0.6.1 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr mysql-proxy-0.6.1; }; }
mkdir mysql-proxy-0.6.1
mkdir -p -- mysql-proxy-0.6.1/. mysql-proxy-0.6.1/m4
list='src examples tests lib'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "mysql-proxy-0.6.1/$subdir" \
            || mkdir -p -- "mysql-proxy-0.6.1/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd mysql-proxy-0.6.1 && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[1]: Entering directory `/home/sjmudd/work/mysql-proxy/subversion/mysql-proxy/src'
:   sql-tokenizer.l
sed '/^#/ s|\.c|sql-tokenizer.c|' .c >sql-tokenizer.c
sed: can't read .c: No such file or directory
make[1]: *** [sql-tokenizer.c] Error 2
make[1]: Leaving directory `/home/sjmudd/work/mysql-proxy/subversion/mysql-proxy/src'
make: *** [distdir] Error 1

How to repeat:
1. download version 237 from svn
2. ./autogen.sh && ./configure && make dist

These are the versions of the software I have installed:

$ rpm -qa | egrep '(gcc|libtool|autoconf|automake)'
autoconf-2.59-12
automake-1.9.6-2.1
libtool-ltdl-1.5.22-6.1
gcc-4.1.1-52.el5.2
libtool-1.5.22-6.1
libgcc-4.1.1-52.el5.2
[12 Sep 2007 7:21] Simon Mudd
Looks like the problem is just with 'make dist'.
[12 Sep 2007 7:22] Simon Mudd
Full output of make dist shown below:

$ make dist
{ test ! -d mysql-proxy-0.6.1 || { find mysql-proxy-0.6.1 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr mysql-proxy-0.6.1; }; }
mkdir mysql-proxy-0.6.1
mkdir -p -- mysql-proxy-0.6.1/. mysql-proxy-0.6.1/m4
list='src examples tests lib'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "mysql-proxy-0.6.1/$subdir" \
            || mkdir -p -- "mysql-proxy-0.6.1/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd mysql-proxy-0.6.1 && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[1]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/src'
make[1]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/src'
make[1]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/examples'
make[1]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/examples'
make[1]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests'
list='suite unit'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/$subdir" \
            || mkdir -p -- "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[2]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite'
list='base bugs'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/$subdir" \
            || mkdir -p -- "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[3]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base'
list='t r'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/base/$subdir" \
            || mkdir -p -- "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/base/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/base && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[4]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base/t'
make[4]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base/t'
make[4]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base/r'
make[4]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base/r'
make[3]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/base'
make[3]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs'
list='r t'; for subdir in $list; do \
          if test "$subdir" = .; then :; else \
            test -d "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/bugs/$subdir" \
            || mkdir -p -- "/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/bugs/$subdir" \
            || exit 1; \
            distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1/tests/suite/bugs && pwd`; \
            top_distdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home/sjmudd/work/mysql-proxy/mysql-proxy-svn/mysql-proxy-0.6.1 && pwd`; \
            (cd $subdir && \
              make  \
                top_distdir="$top_distdir" \
                distdir="$distdir/$subdir" \
                distdir) \
              || exit 1; \
          fi; \
        done
make[4]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs/r'
make[4]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs/r'
make[4]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs/t'
make[4]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs/t'
make[3]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite/bugs'
make[2]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/suite'
make[2]: Entering directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/unit'
:   `test -f ../../src/sql-tokenizer.l || echo './'`../../src/sql-tokenizer.l
sed '/^#/ s|\.c|sql-tokenizer.c|' .c >sql-tokenizer.c
sed: can't read .c: No such file or directory
make[2]: *** [sql-tokenizer.c] Error 2
make[2]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests/unit'
make[1]: *** [distdir] Error 1
make[1]: Leaving directory `/home/sjmudd/work/mysql-proxy/mysql-proxy-svn/tests'
make: *** [distdir] Error 1
[12 Sep 2007 8:31] Jan Kneschke
Do you have flex installed ?
[12 Sep 2007 9:03] Simon Mudd
No, I did not have it installed.  Adding flex fixes the problem. Thanks.
Perhaps configure.in could be adjusted to check that flex is available?
[21 Oct 2007 8:32] Sveta Smirnova
Thank you for the feedback.

Now configure checks for flex:

$grep -R flex config.log 
configure:4206: checking for flex
configure:4222: found /usr/bin/flex
configure:4233: result: flex
configure:4429: flex conftest.l
ac_cv_prog_LEX=flex
LEX='flex'

So I'll close the report as "Can't repeat"