Bug #36222 New InnoDB plugin 1.0 has wrong MKDIR_P defined in Makefile.in
Submitted: 20 Apr 2008 16:29 Modified: 18 Jun 2010 1:58
Reporter: Venu Anuganti Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:innodb_plugin-1.0.0 OS:Any
Assigned to: Vasil Dimov CPU Architecture:Any
Tags: InnoDB Makefile bug, InnoDB plugin 1.0

[20 Apr 2008 16: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 7: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 10: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 20:07] Calvin Sun
The fix is in 1.0.1 release.
[5 May 2010 15:15] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 14:58] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[28 May 2010 6:02] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:31] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:58] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 2:41] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 12:06] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:51] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:33] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)