Tk Source Code

View Ticket
Login
Ticket UUID: 1912679
Title: chmod error during tk cvs head install
Type: Bug Version: obsolete: 8.5.1
Submitter: nobody Created on: 2008-03-12 13:14:54
Subsystem: 84. Unix Build Assigned To: das
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-03-12 23:28:35
Resolution: Fixed Closed By: das
    Closed on: 2008-03-12 16:28:35
Description:
I downloaded the cvs head tar files from activestate's ftp site.

I built and installed tcl on my sparc solaris 9 system, using sun's c compiler.

I build tk next. When I did the gmake install, I get

Installing libtkstub8.5.a to /projects/sprs_lwv/tcl85/lib/
Making directory 
usage:  chmod [-fR] <absolute-mode> file ...
        chmod [-fR] <symbolic-mode-list> file ...
where   <symbolic-mode-list> is a comma-separated list of
        [ugoa]{+|-|=}[rwxXlstugo]

To try and figure out what is going wrong here, I removed the @ before the if statement. Here's what I see when I run it again:
Installing libtkstub8.5.a to /projects/sprs_lwv/tcl85/lib/
if test "" != ""; then \
            XLIB_INCLUDE_INSTALL_DIR="/projects/sprs_lwv/tcl85/include"/X11; fi; \
        for i in "/projects/sprs_lwv/tcl85/include" "${XLIB_INCLUDE_INSTALL_DIR}" \
                "/projects/sprs_lwv/tcl85/lib/tk8.5" "/projects/sprs_lwv/tcl85/lib/tk8.5"/images \
                "/projects/sprs_lwv/tcl85/lib/tk8.5"/msgs "/projects/sprs_lwv/tcl85/lib/tk8.5"/ttk; \
            do \
            if [ ! -d "$i" ] ; then \
                echo "Making directory $i"; \
                mkdir -p "$i"; \
                chmod 755 "$i"; \
                else true; \
                fi; \
            done;
Making directory 
usage:  chmod [-fR] <absolute-mode> file ...
        chmod [-fR] <symbolic-mode-list> file ...
where   <symbolic-mode-list> is a comma-separated list of
        [ugoa]{+|-|=}[rwxXlstugo]

I am uncertain why, but the only thing I can figure is that the XLIB_INCLUDE_INSTALL_DIR is ending up null, despite being set...
User Comments: das added on 2008-03-12 23:28:35:
Logged In: YES 
user_id=90580
Originator: NO

apologies, bug introduced by my quoting changes yesterday, fix committed to HEAD.

details: the variable ref $(X11_XLIB_HDRS) is generated by configure from @TK_WINDOWINGSYSTEM@_XLIB_HDRS and intentionally expands to nothing, as opposed to $(AQUA_XLIB_HDRS)...
the problem arises when quoting is added around ${XLIB_INCLUDE_INSTALL_DIR] with that var  undefined, turning a null string into "", to which the 'for' reacts very differently...

[email protected] added on 2008-03-12 20:20:55:
Logged In: NO 

Turns out that the problem is this - this test:
install-libraries: libraries
        if test "$(X11_XLIB_HDRS)" != ""; then \
            XLIB_INCLUDE_INSTALL_DIR="$(INCLUDE_INSTALL_DIR)"/X11; fi; \

the test for X11_XLIB_HDRS is never non-null - the only appearance of the value is here (and in a list below for installing stuff into the include/X11 directory. It is never set to values. There needs to be an else to the if, where XLIB_INCLUDE_INSTALL_DIR is set to "." or something so that the if doesn't trigger.
And shouldn't there be a configure reference to X11_XLIB_HDRS ?