Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-02-22
03:56 • Ticket [3490157fff] ranlib after install with read-only permissions status s... artifact: f68f335bfb user: dkf
03:54 • Closed ticket [3490157fff]. artifact: 1abdd46033 user: dkf
2012-02-21
18:34 • New ticket [3490157fff]. artifact: cf7d0078fa user: pooryorick

ranlib after install with read-only permissions

Closed / Fixed3490157fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-02-21 18:34:28
the install-libraries target uses ranlib on the file after it has been installed read-only, causing a failure when installation is done as a non-root user.  The fix below simply removes the ranlib calls.  Assuming that no modern linker out there is comparing the timestamp of the symbol table in the archive with the file mtime, this should work.  If it is still necessary to support linkers that do that, the Makefile would need to be modified to not remove write permissions until the ranlib step is done.

--- Makefile.in 2012-02-20 14:39:38.000000000 -0500
+++ Makefile.in.new     2012-02-21 12:09:23.000000000 -0500
@@ -136,7 +136,6 @@
 install-package: package
        @mkdir -p $(DESTDIR)$(pkglibdir)
        $(INSTALL_PROGRAM) $(PKG_LIB_FILE) $(DESTDIR)$(pkglibdir)/$(PKG_LIB_FILE)
-       $(RANLIB) $(DESTDIR)$(pkglibdir)/$(PKG_LIB_FILE)
        $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)/pkgIndex.tcl
        $(INSTALL_DATA) tclooConfig.sh $(DESTDIR)$(pkglibdir)/tclooConfig.sh
 #      for p in $(SRC_DIR)/library/*.tcl ; do \
@@ -163,8 +162,7 @@
 install-libraries: libraries
        @echo "Installing $(PKG_STUB_LIB_FILE) in $(DESTDIR)$(pkglibdir)"
        @mkdir -p $(DESTDIR)$(pkglibdir)
-       $(INSTALL_PROGRAM) $(PKG_STUB_LIB_FILE) $(DESTDIR)$(pkglibdir)
-       $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$(PKG_STUB_LIB_FILE)
+       $(INSTALL_DATA) $(PKG_STUB_LIB_FILE) $(DESTDIR)$(pkglibdir)
 
 #========================================================================
 # Install documentation. Unix manpages should go in the $(mandir) directory.
dkfplain2012-02-22 03:54:36
allow_comments - 1
dkfplain2012-02-22 03:56:01
Fixed. It was just something cargo-culted in from somewhere else. (Maybe Tile? Maybe sampleextension?) It didn't need to be done either, as ranlib's done during the build phase.
Log in (anonymous is fine) to add a comment.