Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-11-19
13:36 • Closed ticket [931061ffff]: tcl_libPath holds invalid path: @TCL_IN_FRAMEWORK@</... artifact: 30d6a94b11 user: das
2004-04-14
11:07 • Ticket [931061ffff]: 4 changes artifact: 6602088ab6 user: tauvan
2004-04-13
13:46 • Ticket [931061ffff]: 4 changes artifact: 7842028e37 user: tauvan
2004-04-10
22:32 • Ticket [931061ffff]: 4 changes artifact: c6c8aad70f user: tauvan
03:48 • Ticket [931061ffff]: 4 changes artifact: 4ffefa357b user: tauvan
03:36 • Ticket [931061ffff]: 4 changes artifact: 2665fc01a3 user: tauvan
02:57 • Ticket [931061ffff]: 5 changes artifact: 4e155819e5 user: dgp
2004-04-08
22:09 • Ticket [931061ffff]: 4 changes artifact: 02c3552ba5 user: tauvan
20:40 • Open ticket [931061ffff]. artifact: 568cff7c6c user: dgp
08:01 • Closed ticket [931061ffff]. artifact: 74e89f44e1 user: das
08:01 • Deleted ticket [931061ffff]. artifact: 1aec292493 user: das
2004-04-07
13:11 • New ticket [931061ffff]. artifact: 6d8c11608a user: dgp

tcl_libPath holds invalid path: @TCL_IN_FRAMEWORK@

Closed / Fixed931061ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2004-04-07 13:11:14
In macosx/Makefile:

TCL_LIBRARY    := @TCL_IN_FRAMEWORK@

Appears to be the result of some incomplete
configure process.

Anyhow that value is invalid for TCL_LIBRARY,
and it causes test unixInit-2.8 of the test suite
to fail.  See 930621 for original report on
that issue.
dasplain2004-04-08 08:01:03
Logged In: YES 
user_id=90580

no, this value is correct, it is handled specially and indicates that 
the location of the script library files should be determined 
dynamically at runtime inside Tcl.framework, c.f. 
Tcl_MacOSXGetLibraryPath() in tclUnixInit.c
unixInit-2.8 probably has to deal with Mac OS X specially, e.g. 
by setting the TCL_LIBRARY env var to override this special 
handling.
das Closed ticket [931061ffff]. [History diff]2004-04-08 08:01:52
dgpplain2004-04-08 20:40:05
Logged In: YES 
user_id=80530


um, ok, well if we must have such
a magic value, at least we need
to make sure it doesn't find its
way into the tcl_libPath variable.
tauvanplain2004-04-08 22:09:47
Logged In: YES 
user_id=1011552

Be patient.
  Is not the goal to load "tclLibraryPathStr" with the
absolute address of "library"? and "defaultLibraryDir" with
the same?
 I am not sure, not an "april fool's joke".

Thanks.
dgpplain2004-04-10 02:57:05
Logged In: YES 
user_id=80530

It appears that a compile time
boolean has to get compiled
into the Tcl library to serve as
a signal for Tcl_MacOXSGetLibraryPath()
to call Tcl_MacOSXOpenVersionedBundleResources().
That should not be a problem.

However, rather than invent such
a boolean, the compiling in of the
TCL_LIBRARY value into the
global variable defaultLibraryDir
has been repurposed -- making use
of a magic string value.

This achieves the goal, it appears,
but the magic value also leaks out
into the value
of the Tcl variable ::tclDefaultLibrary
and into the thread-global C variable
tclLibraryPath and tclLibraryPathStr . 

That's causing this test to fail, and
also doesn't seem to make sense
generally.  Why should the string
value @TCL_IN_FRAMEWORK@
appear as an element in a list of what
should be directory names?

Seems to me the right fix here is
to create the compiled in boolean that's
needed without piggy-backing on the
other compiled-in values.

If I'm missing something, let me know.
tauvanplain2004-04-10 03:36:08
Logged In: YES 
user_id=1011552

To make a long story short
I found that "export DYLD_LIBRARY_PATH;"
from the "Development/Makefile" is the problem.
there are minor others but initial findings
indicate all code from "tclUnixInit.c" ok.
I will send details later, but I have to run.

Steven.
tauvanplain2004-04-10 03:48:47
Logged In: YES 
user_id=1011552

To make a long story short
I found that "export DYLD_LIBRARY_PATH;"
from the "Development/Makefile" is the problem.
there are minor others but initial findings
indicate all code from "tclUnixInit.c" ok.
I will send details later, but I have to run.

Steven.
tauvanplain2004-04-10 22:32:15
Logged In: YES 
user_id=1011552

First, to address how "@TCL_IN_FRAMEWORK@" leaks is
the makefile seems to set a condition for the boolean to fail.
This occurs if the bundled resource is not found leaving
the standard unix code using "defaultLibraryDir" which contains
"@TCL_IN_FRAMEWORK@". See code "TclpSetVariables" and ask what 
happens if != TCL_OK.

Now, the findings at the time of this submission:

Do out of box (2004/03/01 tar.gz) unpack
make sure there is no previous install
(mac's /System/Library OK as this installs /Library)
(may need to can /usr/bin tclsh link, I did, also didn't)
from local (added safety)
cd to where unpacked (/Users/steven/complex)

  steven% make -C ./tcl8.4.6/macosx develop
  steven% make -C ./tcl8.4.6/macosx test-develop
  steven% ./build/tcl/tcltest ./tcl8.4.6/tests/all.tcl

notes @ this point:
  unixInit-2.8 FAILED + others
  from Makefile.in (tclUnixInit.o: -DTCL_LIBRARY=\"${TCL_LIBRARY}\")
  which yields during make (-DTCL_LIBRARY=\
"@TCL_IN_FRAMEWORK@\")
  can not run from command line
    can't open library: /Library/Frameworks/Tcl.framework/Versions/
8.4/Tcl
  Makefile forces install
notes EOF

  removed all *.test leaving all.tcl, unixInit.test in tests folder
  steven% make -C ./tcl8.4.6/macosx install-develop
  steven% make -C ./tcl8.4.6/macosx test-develop

notes @ this point:
  unixInit-2.8 FAILED + other
  can run from command line
  from Tcl_MacOSXGetLibraryPath:
    foundInFramework = error;
notes EOF

  add to the installed /Library framwork Info.plist from build
  steven% make -C ./tcl8.4.6/macosx test-develop
  steven% ./build/tcl/tcltest ./tcl8.4.6/tests/all.tcl

notes @ this point:
  unixInit-2.8 FAILED + other
  from command line no unixInit-2.8 FAILED
  from Tcl_MacOSXGetLibraryPath:
    foundInFramework = ok;
notes EOF

  change Tcl_MacOSXGetLibraryPath to load always (ignore 
"@pooh@"):
    return Tcl_MacOSXOpenVersionedBundleResources(interp, 
    "com.tcltk.tcllibrary", TCL_VERSION, 0, maxPathLen, tclLibPath);
  delete /Development/Makefile (force rebuild)
  steven% make -C ./tcl8.4.6/macosx develop
  steven% make -C ./tcl8.4.6/macosx install-develop
  steven% make -C ./tcl8.4.6/macosx test-develop
  steven% ./build/tcl/tcltest ./tcl8.4.6/tests/all.tcl

notes @ this point:
  unixInit-2.8 FAILED + other
  from command line no unixInit-2.8 FAILED
  from Tcl_MacOSXGetLibraryPath:
    foundInFramework = ok;
  noticed that only when "make" error occurs
  only introduced (different) variables "export"
notes EOF

  removed each "export" indivially form /Development/Makefile
  steven% make -C ./tcl8.4.6/macosx test-develop

notes @ this point:
  removal of "export DYLD_LIBRARY_PATH;" from "test:" in /
Development/Makefile
    stopped error
notes EOF


this is where I'm at; at the submitting of this to you

Summary:
  Makefile issues. file "tclUnixInit.c" does what it's designed to do.
  Also wish to discuss suggestions and fixes.
  Need to understand why "export DYLD_LIBRARY_PATH;" causes fail.

When you finish reading and have questions or ready to debate
possible suggestions to changes, I look forward to your response.
Steven, Thanks.
tauvanplain2004-04-13 13:46:38
Logged In: YES 
user_id=1011552

 Well, had a time getting at "export DYLD_LIBRARY_PATH;",
even messed up my hard drive, but from what I've observed:
when it tries to make the tests, the export of just "pwd:" stops
the search for Tcl(dylib) at ${pwd}. When running tests over
I noticed that the env-test had a different fail reason "can't open 
library:" instead of "__CF....". Since DYLD_LIBRARY_PATH is not
defined anywhere I changed tcl.m4 to use DYLIB_INSTALL_DIR
which is a definable in the macosx/makefile. One note though,
DYLIB_INSTALL_PATH changed to "?= ${SYMROOT}", just like
TCLSH_EXE prefix. It now runs without a pre-install, which:
  Some possible bandages are:
I did change "@TCL_IN_FRAMEWORK@" to ${LIBDIR}/Resources/
Scripts now I hear the "aarg" but if I followed the logic correctly,
init searches for the version of "library" it's to use. The mac has a
special search algorithm for finding this. Now at the time of 
development and deployment builds, prior to install, defaultDir
gets the very latest copy built in. The bundle routine looks like
it gets any version, but when an install is done it has the latest.
As an outside user who can move it about the drive, the bundle
routine will provide me with the current version, as insider(you)
aren't you guarrented this by defaultDir? So, I changed unixInit
such that defaultDir gets appended to all, and for the mac an
additional append of bundle, no magic just aways do.
  I hope this makes sense and is helpfull. One other note:
I don't have anything but the tests to go by, plus hopefully
you have serval versions or at least can alter a "library" file, such
that it won't do damage, to test what copy you get.
tauvanplain2004-04-14 11:07:49
Logged In: YES 
user_id=1011552

As I don't understand a lot about Tcl nor dos machines, is it possible 
that bug#926088 related?
dasplain2004-11-19 13:36:57
Logged In: YES 
user_id=90580

fixed, see bug 1068088
Log in (anonymous is fine) to add a comment.