Bug #4694 install-sh doesn't install mysql correctly
Submitted: 22 Jul 2004 12:12 Modified: 30 Jul 2004 18:48
Reporter: Alan Burlison Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.0.20 OS:Solaris (Solaris)
Assigned to: Sergei Golubchik CPU Architecture:Any

[22 Jul 2004 12:12] Alan Burlison
Description:
The install-sh script supplied with MySQL won't install the mysql files correctly.  'make install' fails with the following error:

Making install in extra
make: Fatal error: Don't know how to make target `../mysys/libmysys.a'
Current working directory /home/mysql/bld/mysql-4.0.20/extra
*** Error code 1
make: Fatal error: Command failed for target `install-recursive'

How to repeat:
INSTALL=install-sh ./configure ...
make install

Suggested fix:
Not a fix as such, but a workaround: Use GNU install.

Uf install-sh doesn't work it might be easiest to remove it from the package and clearly document the requirement to use GNU install instead.
[23 Jul 2004 4:02] Matthew Lord
Hi,

I could not repeat this problem.  We also have not had any other reports about this problem.

Making install in tools
/bin/bash ../mkinstalldirs /export/home/mysqldev/mlord/mysql/bin
  /bin/bash ../libtool --preserve-dup-deps --mode=install /opt/sfw/bin/ginstall -c mysqlmanager /
export/home/mysqldev/mlord/mysql/bin/mysqlmanager
/opt/sfw/bin/ginstall -c mysqlmanager /export/home/mysqldev/mlord/mysql/bin/mysqlmanager
mysqldev@sunfire100b:~/mlord/mysql-4.0.20> uname -a
SunOS sunfire100b 5.9 Generic_112233-08 sun4u sparc SUNW,UltraAX-i2

Please see how we build the binaries for your platform here:
http://dev.mysql.com/doc/mysql/en/MySQL_binaries.html

Best Regards
[23 Jul 2004 7:33] Alan Burlison
From looking at the output you pasted into the bug report, the reason you can't replicate the problem is because you aren't using install-sh, you are using ginstall:
        /opt/sfw/bin/ginstall -c ...
As I indicated in the bug report, ginstall works fine, it's the install-sh script which is included in the mysql distribution that doesn't work:
To replicate,
        $ cd /mysql/build/dir
        $ export INSTALL=/mysql/build/dir/install-sh
        $ ./configure ...
        $ make install
[23 Jul 2004 16:19] Matthew Lord
Where did you see instructions to use install-sh?  install-sh is taken straight from X11R6 and 
really only meant for systems that don't have "install" and solaris is not one of them.

You should have "install" on your machine and if not you can get it for solaris.

You should always be instructed to use make install (INSTALL-SRC for example) which will look 
for install, ginstall etc..  Please let me know where you were instructed to use install-sh on solaris 
so that we can correct the documentation.

Best Regards
[23 Jul 2004 17:50] Alan Burlison
/usr/sbin/install on Solaris isn't compatible with ginstall, so it doesn't work:

/bin/bash ../mkinstalldirs /opt/mysql/include/mysql
 /usr/sbin/install -m 644 my_dbug.h /opt/mysql/include/mysql/my_dbug.h
find: stat() error /opt/mysql/include/mysql/my_dbug.h: No such file or directoryinstall: my_dbug.h was not found anywhere!

Lots of GNU packages include install-sh as an alternative to the platform's install utility, but unfortunately it won't sucessfully install MySQL, at least not on Solaris, as I originally reported.
[23 Jul 2004 20:29] Matthew Lord
Dear Alan,

Thank you for your bug report!  make install does in fact look for install-sh as well and uses it if 
need be.  I was able to repeat the problem as you specified:

        $ cd /mysql/build/dir
        $ export INSTALL=/mysql/build/dir/install-sh
        $ ./configure ...
        $ make install

Best Regards
[30 Jul 2004 18:48] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fixed in 4.0.21, thanks!