Tcl Source Code

View Ticket
Login
Ticket UUID: 29044ba23f8b0020f5622440114289f9c81eb32a
Title: Remove redundant ranllib calls for make target "install-binaries" (unix build)
Type: Patch Version: trunk
Submitter: erikleunissen Created on: 2015-04-13 17:24:38
Subsystem: 53. Configuration and Build Tools Assigned To: dgp
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2015-05-20 15:18:01
Resolution: Accepted Closed By: dgp
    Closed on: 2015-05-20 15:18:01
Description:
Unless the RANLIB variable is empty, the unix build calls ranlib on the static Tcl library and the Tcl stubs library at two occasions (see unix/tcl.m4 around line 2060, trunk):
- at build time
- at install time

Once is enough. This ticket proposes to remove the call at install time.
As a reference: ticket 3490157 touches on the same issue in TclOO, resolved by a similar removal.

Besides not having to deal with redundant code and a little speed-up, removal of the call at install time has another advantage: it enables installing cross-builds from a cross-mounted build directory. Currently, the call at install time breaks an installation at the target host of cross-builds from within a cross-mounted build directory. This is so because the name of a ranlib program used at build time (for cross-building) typically has a prefix indicating the cross-toolchain, whereas there typically is no such program on the target host. Running "make install" on the target host from inside a cross-mounted build directory will therefore abort with an error.

There is one thing to consider. The unix/Makefile.in mentions a concern regarding the call *at install time*:

-- quote --
# Note: before running ranlib below, must cd to target directory because some
# ranlibs write to current directory, and this might not always be possible
# (e.g. if installing as root).
-- unquote --

If this were a valid concern, then the call at build time would suffer equally from the described phenomenon, but only if the current dir were different from the build directory at the time when "make" makes its call to $(RANLIB). This simply is never the case. (If it were, builds would have been aborting since august 2002 when these ranlib calls were introduced into the trunk (artifact [8d713384ad])).

In short: we can safely assume, that this concern has never been relevant.


The attached patches (for both Tcl and Tk) remove the redundant ranlib calls at install time from unix/tcl.m4. They also remove the irrelevant comment from unix/Makefile.in

Sincerely,

Erik Leunissen
--
User Comments: dgp added on 2015-05-20 15:18:01:
Patches accepted.

Attachments: