| Summary: | Mysql 5.0.16-r3 fails to configure | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Simon Detheridge <social-gentoobugzilla> |
| Component: | Current packages | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Simon Detheridge
2005-12-06 03:51:32 UTC
Here is a fix I just worked out:
change line 253 in mysql-2.0.16-r3.ebuild from:
for dl in ${!rebuilddirlist[@]}; do
to:
for dl in "${!rebuilddirlist[@]}"; do
My bash-fu isn't as good as some people's, so maybe there is a better way - but
it works.
oops, I spoke to soon. It gets further through the ebuild, but fails during the configure with: config.status: creating config.h config.status: executing depfiles commands config.status: executing default commands configure: configuring in innobase configure: running /bin/sh ./configure --prefix=/usr '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--build=i686-pc-linux-gnu' '--program-suffix=' '--libexecdir=/usr/sbin' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--sharedstatedir=/usr/share/mysql' '--libdir=/usr/lib/mysql' '--includedir=/usr/include/mysql' '--with-low-memory' '--enable-assembler' '--enable-local-infile' '--with-mysqld-user=mysql' '--with-client-ldflags=-lstdc++' '--enable-thread-safe-client' '--with-comment=Gentoo Linux mysql-5.0.16-r3' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-zlib-dir=/usr' '--with-lib-ccflags=-fPIC' '--without-readline' '--without-docs' '--enable-shared' '--enable-static' '--without-libwrap' '--with-openssl' '--without-debug' '--without-ndb-debug' '--with-bench' '--with-server' '--with-embedded-server' '--with-extra-tools' '--with-innodb' '--with-raid' '--with-extra-charsets=all' '--with-berkeley-db=./bdb' '--with-geometry' '--with-ndbcluster' '--without-big-tables' 'CC=gcc' 'CFLAGS=-O3 -march=pentium4 -ftracer -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1' 'CXXFLAGS=-O3 -march=pentium4 -ftracer -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates' 'CXX=g++' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' CFLAGS='-O3 -DDBUG_OFF -O3 -march=pentium4 -ftracer -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 ' CXXFLAGS='-O3 -DDBUG_OFF -O3 -march=pentium4 -ftracer -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-implicit-templates -fno-exceptions -fno-rtti' --cache-file=/dev/null --srcdir=. ./configure: ./configure: No such file or directory configure: error: /bin/sh ./configure failed for innobase !!! Please attach the config.log to your bug report: !!! /var/tmp/portage/mysql-5.0.16-r3/work/mysql/config.log !!! ERROR: dev-db/mysql-5.0.16-r3 failed. !!! Function econf, Line 485, Exitcode 0 !!! econf failed !!! If you need support, post the topmost build error, NOT this status message. PLEASE NOTE: this is upgrading from mysql 4.1.15. The ebuild appears to work on another machine that already has 5.0.15 installed. *sigh* - OK this time I've fixed it. I did some proper research. Use the patch
below.
The problem is that the expression ${!rebuilddirlist[@]} does not expand to
anything in bash-2. I didn't have bash-3 on the machine, so it skipped that loop
entirely.
I suggest either making bash-3 a dependency of the ebuild (ouch), or using the
following patch to make it compatible with bash-2:
--- mysql-5.0.16-r3.ebuild 2005-11-25 17:35:30.000000000 +0000
+++ mysql-5.0.16-r3.ebuild.new 2005-12-06 13:10:17.000000000 +0000
@@ -250,9 +250,10 @@
rebuilddirlist=( '.' 'innobase' )
fi
- for dl in ${!rebuilddirlist[@]}; do
+ dl=0
+ for dir in ${rebuilddirlist[@]}; do
einfo "reconfiguring phase $(( ${dl} + 1 )) of
${#rebuilddirlist[@]}"
- pushd "${rebuilddirlist[${dl}]}"
+ pushd "${dir}"
for buildstep in \
'libtoolize --copy --force' \
'aclocal --force' \
@@ -265,6 +266,7 @@
${buildstep} || die "failed ${buildstep/ */}
${rebuilddirlist[${dl}]}"
done
popd
+ let dl=dl+1
done
[[ -w bdb/dist/ltmain.sh ]] && cp ltmain.sh bdb/dist/ltmain.sh
Thanks for the report and the patches, I've verified that the minimum version of bash supported must be 2.05 . I'll fix it as soon as possible. Ok, it now work for me with $ echo $BASH_VERSION = 2.05b.0(1)-release , It's a mistery how could rc script work since they use the same concept but until it wor I'll not change them ;-) |