GNOME Bugzilla – Bug 364465
install-check hardcodes location for install(1) which is incorrect on OpenSolaris
Last modified: 2007-04-07 15:06:21 UTC
Please describe the problem: The install-check utility provided with jhbuild has a hard-coded path to the install utility. While /usr/bin/install exists on GNU/Linux and BSD-based platforms, the equivalent utility (install(1M)) is located at /usr/sbin/install on OpenSolaris. Steps to reproduce: 1. Build install-check as part of jhbuild on OpenSolaris. 2. Build and attempt installation of any module using jhbuild. Actual results: Any attempts to call 'install-check' result in an error 255 being passed back to make(1), and the installation failing. Expected results: Does this happen every time? Reproducible every time on SunOS 5.11 snv_36. Other information: Depending on if and how this is fixed, it might be nice to be able to pass an executable name to the compiler (perhaps via autogen.sh), in order to use a non-system install binary. On OpenSolaris, this would allow the use of ginstall(1) instead of install(1M).
As seen in bug 364368, the correct utility on Solaris is /usr/ucb/install (install(1B)), not /usr/sbin/install (install(1M)).
Would "which install" work locate the correct install binary?
At compile time, or run time? I haven't been a Solaris user long enough to know whether the massive amounts of futzing I've been doing with paths are standard practice. I think that running the install binary located by which(1) at run time would be an excellent solution, if it's possible.
At run time. But maybe that would make install-check to slow so maybe it is better to set it at compile time.
It's been suggested to me that `command -v install` is a more portable way of locating install, but I haven't read the POSIX specification. I think setting the binary location at compile time would be perfectly acceptable - users on SunOS could compile with -DWITH_INSTALL=/usr/ucb/install or something similar.
I commited compile time support: make install-check CFLAGS='-DWITH_INSTALL=\"/usr/ucb/install\"'