Skip to content
Tcl Source Code View Ticket
Login

View Ticket

build dir outside source dir not supported

Closed / Fixed1163357fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-03-14 23:26:17
$ gunzip -c thread2.6.1.tar.gz | tar xf -
$ mkdir build
$ cd build
$ ../thread2.6.1/configure
...
$ make test
...
couldn't read file "./ttrace.tcl": no such file or
directory
    while executing
"source [file join . ttrace.tcl]"
    invoked from within
"if {[file readable [file join . .. lib ttrace.tcl]]} { 
            source [file join . .. lib ttrace.tcl]
        } else {
            source [file j..."
    ("package ifneeded" script)
    invoked from within
"package require Thread 2.6"
    (file "../thread2.6.1/tests/all.tcl" line 46)

The pkgIndex.tcl file is constructed to
look for the files ../lib/ttrace.tcl or ttrace.tcl
relative to the $dir that holds pkgIndex.tcl.
This implies that only builds in subdirs of
thread.2.6.1 can be tested prior to installation.

It should not be so.  Other build dirs should
be supported.
dgpplain2005-03-15 06:34:24
File Added - 125622: 1163357.patch

Logged In: YES 
user_id=80530


Attached patch is good enough
to let the current test suite run
successfully.  Perhaps better solutions
involve [tcl_findLibrary] or
[thread::pkgconfig get scriptdir,source].
dgpplain2005-03-15 06:50:21
Logged In: YES 
user_id=80530


BTW, that [subst] scheme within
the pkgIndex.tcl file will also fail
whenever $dir has spaces in it,
or is otherwise "list-unsafe".
vasiljevicplain2005-03-15 15:57:24
Logged In: YES 
user_id=95086

Fixed in HEAD. Also corrected the problem when directory 
path contains blanks or other special characters.
Log in (anonymous is fine) to add a comment.

Attachments: