[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5229) `make install' writes to the source tree as root



Full_Name: Gary Mills
Version: openldap-2.3.38
OS: Solaris 9
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (24.78.105.29)


The usual procedure is to run `configure' and `make' in the install tree as an
ordinary user, and then to run `make install' there as root.  This install
procedure
writes to the install tree as root.  In some cases, it actually relinks a
shared
library as root.  We build on one server and install on another, where the
install
tree is mounted read-only.  These errors prevent installation in this case.

Here are some of the errors:

cd overlays; make  dynamic
sh: slapd.conf.tmp: cannot create
*** Error code 1
make: Fatal error: Command failed for target `all-cffiles'

cd overlays; make  dynamic
touch: cannot change times on all-cffiles
*** Error code 1
make: Fatal error: Command failed for target `all-cffiles'

sh: ldapcompare.1.tmp: cannot create
*** Error code 1
make: Fatal error: Command failed for target `all-common'

The first few were fixed in servers/slapd/Makefile.in by putting all-cffiles
and
slapd.conf.tmp in /tmp instead of in the source tree.  The man page error was
fixed
build/man.mk by putting the temporary man pages like $$page.$(TMP_SUFFIX) into
/tmp.

The relinking error looked like this:

  Entering subdirectory libldap
../../build/shtool mkdir -p /usr/local/lib
/bin/sh ../..//libtool --mode=install ../../build/shtool install -c  -m 644
libldap.la /usr/local/lib
libtool: install: warning: relinking `libldap.la'
...
mv: cannot rename libldap-2.3.so.0.2.26 to libldap-2.3.so.0.2.26U: Read-only
file system
libtool: install: error: relink `libldap.la' with the above command before
installing it
*** Error code 1
make: Fatal error: Command failed for target `install-local'

Really, it shouldn't be doing relinking at that point, when running as root.
Perhaps it could do it earlier, during the compile step.  I had to do a `make
install' as root in libraries/liblber on build server and then modify the
Makefiles
in libraries/libldap and libraries/libldap_r to link with the installed
library,
in order to avoid the relink on the install server.  This worked, but is not a
good solution.