Bug #36222 New InnoDB plugin 1.0 has wrong MKDIR_P defined in Makefile.in
Submitted: 20 Apr 2008 18:29 Modified: 21 May 2008 22:07
Reporter: Venu Anuganti
Status: Closed
Category:Server: InnoDB Severity:S1 (Critical)
Version:innodb_plugin-1.0.0 OS:Any
Assigned to: Vasil Dimov Target Version:
Tags: InnoDB plugin 1.0, InnoDB Makefile bug

[20 Apr 2008 18:29] Venu Anuganti
Description:
The new InnoDB plugin 1.0.0-5.1 Makefile.in has wrong MKDIR_P assigned which never gets
defined. Because of this the following command fails:

make install prefix=foo exec_prefix=foo libdir=foo libexecdir=foo bindir=foo

How to repeat:
Making install in innobase
gmake[4]: Entering directory
`/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/tmp-build-i386-rhel4-gcc3/storage/innobase'
gmake[5]: Entering directory
`/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/tmp-build-i386-rhel4-gcc3/storage/innobase'
test -z
"/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/i386-rhel4-gcc3/lib/mysql"
|| @MKDIR_P@
"/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/i386-rhel4-gcc3/lib/mysql"
/bin/sh: @MKDIR_P@: command not found
gmake[5]: *** [install-pkglibLTLIBRARIES] Error 127
gmake[5]: Leaving directory
`/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/tmp-build-i386-rhel4-gcc3/storage/innobase'
gmake[4]: *** [install-am] Error 2
gmake[4]: Leaving directory
`/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/tmp-build-i386-rhel4-gcc3/storage/innobase'
gmake[3]: *** [install-recursive] Error 1
gmake[3]: Leaving directory
`/mnt/deleted/vol/home3/vanugant/dev/yahoo/packages/external/mysql/5.1/tmp-build-i386-rhel4-gcc3/storage'

Suggested fix:
Here is the patch which fixes it.
vanugant@deletedhostname 5.1]$ cat patches/innodb-mkdir.patch
--- mysql-5.1.24-rc/storage/innobase/Makefile.in        2008-04-12 22:30:58.000000000
-0700
+++ venupatched/storage/innobase/Makefile.in    2008-04-20 08:16:18.193758000 -0700
@@ -333,7 +333,7 @@
 MAKEINFO = @MAKEINFO@
 MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@
 MAKE_SHELL = @MAKE_SHELL@
-MKDIR_P = @MKDIR_P@
+MKDIR_P = @mkdir_p@
 MV = @MV@
 MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@
 MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@
[21 Apr 2008 9:45] Vasil Dimov
Hi,

The problem is more complicated. Makefile.in is generated from Makefile.am.

We want to avoid requiring users to recreate Makefile.in with the autotools so we
generated one.

We used the 5.1.23 tree (the latest at that time).

@STUFF@ is supposed to be replaced by ./configure when creating Makefile from
Makefile.in.

The problem is that the Makefile.in generated by us suits 5.1.23's ./configure. We can
regenerate a new Makefile.in with 5.1.24 but it will almost certainly break when used
with 5.1.23 and maybe with 5.1.25.

One possible solution is that users run autotools to create Makefile.in and ./configure
that match.
Another possible solution is if we provide a separate source archive for each mysql
version - 5.1.23, 5.1.24 etc, the archives will only differ in Makefile.in :-/

Any ideas or suggestions are welcome :)
[23 Apr 2008 12:00] Vasil Dimov
The problem is actually that I used automake-1.10 when generating
storage/innobase/Makefile.in while MySQL source tree was "auto-tooled" with
automake-1.9.6.

Fixed in the script that generates storage/innobase/Makefile.in.

Thank you!
[21 May 2008 22:07] Calvin Sun
The fix is in 1.0.1 release.