Bug #42393 automake does not support bin_PROGRAMS being defined conditionally
Submitted: 27 Jan 2009 20:05 Modified: 11 Feb 2010 8:11
Reporter: BJ Dierkes Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.75 OS:Linux (Redhat Enterprise Linux 3)
Assigned to: CPU Architecture:Any

[27 Jan 2009 20:05] BJ Dierkes
Description:
MySQL 5.0.75 does not build on Redhat Enterprise Linux 3 using automake.  I suspect this is due to incompatibility with the version of Automake?

How to repeat:
Run 'automake' on sources:

user@linux mysql-5.0.75]$ automake

extra/Makefile.am:48: bin_PROGRAMS was already defined in condition TRUE, which implies condition BUILD_INNODB_TOOLS_TRUE

# "innochecksum" should be switched
  bin_PROGRAMS (User, where = extra/Makefile.am:48) +=
  {
    TRUE => replace comp_err perror resolveip my_print_defaults \
                        resolve_stack_dump mysql_waitpid 

  }
Use of uninitialized value in hash element at /usr/bin/automake line 8459.
Use of uninitialized value in list assignment at /usr/bin/automake line 8448.
Use of uninitialized value in concatenation (.) or string at /usr/bin/automake line 8449.
: warning: automake does not support bin_PROGRAMS being defined conditionally

Suggested fix:
--- mysql-5.0.75/extra/Makefile.am.automake     2008-12-18 11:19:33.000000000 -0
600
+++ mysql-5.0.75/extra/Makefile.am      2009-01-27 13:41:07.000000000 -0600
--- mysql-5.0.75/extra/Makefile.am.automake     2008-12-18 11:19:33.000000000 -0
600
+++ mysql-5.0.75/extra/Makefile.am      2009-01-27 13:55:10.000000000 -0600
@@ -44,11 +44,13 @@
 $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
 $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
 
-bin_PROGRAMS =         replace comp_err perror resolveip my_print_defaults \
-                       resolve_stack_dump mysql_waitpid 
 # "innochecksum" should be switched
 if BUILD_INNODB_TOOLS
-bin_PROGRAMS += innochecksum
+bin_PROGRAMS = innochecksum replace comp_err perror resolveip \
+       my_print_defaults resolve_stack_dump mysql_waitpid
+else
+bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
+       resolve_stack_dump mysql_waitpid 
 endif
 
 noinst_PROGRAMS =      charset2html
[27 Jan 2009 20:12] Kent Boortz
Please specify what version of automake you are using, i.e. output of

  % automake --version

Also note that you normally don't run automake to build from the
MySQL sources provided on http://dev.mysql.com. Running automake
is only needed if you build from the bzr repository or are doing configure
or Makefile.am changes.
[27 Jan 2009 20:19] BJ Dierkes
Understood....  changes _are_ being made to configure.in.  

This is a stock RHEL3 box:

user@linux buildroot]$ cat /etc/redhat-release 
Red Hat Enterprise Linux ES release 3 (Taroon Update 9)

user@linux buildroot]$ automake --version
automake (GNU automake) 1.6.3
Written by Tom Tromey <tromey@redhat.com>.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I understand this is not a critical issue, however it has not been experienced in prior 5.0.x releases.

Thanks!
[28 Jan 2009 7:59] Valeriy Kravchuk
According to the documentation (http://dev.mysql.com/doc/refman/5.0/en/installing-source-tree.html), you need automake 1.8.1 to build from sources the way you do. Please, try to upgrade automake and inform about the results.
[1 Mar 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[25 Apr 2009 1:59] Sérgio Basto
with the patch on this report and with this one:
 
--- mysql-5.0.28.orig/configure.in      2006-10-24 17:03:51.000000000 -0400
+++ mysql-5.0.28/configure.in   2006-11-29 17:39:39.000000000 -0500        
@@ -720,7 +720,7 @@ fi
-    AS_HELP_STRING (...)
+    AC_HELP_STRING (...)

Hi , I could complie mysql-5.0.75, on RHEL 3 using automake-1.6.3 and autoconf-2.57 , please consider include this on main stream . Seems harmful patches and make the ability to compile on older systems . 

Thanks,
[11 Feb 2010 8:11] Sveta Smirnova
Thank you for the feedback.

Unfortunately patches provided don't work with current sources for me. Also version 5.0 is in extended support period now while version 5.1 needs more changes. So I have to close this report as "Unsupported".