Tcl Source Code

View Ticket
Login
Ticket UUID: 1805763
Title: TclOO: 'make install' does not work on OS X
Type: Bug Version: None
Submitter: nobody Created on: 2007-10-01 16:07:47
Subsystem: 35. TclOO Package Assigned To: dkf
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-10-12 04:56:52
Resolution: Out of Date Closed By: dkf
    Closed on: 2007-10-11 21:56:52
Description:
When using the ActiveState distro and a prefix the make install does not install the package index and library in the correct spot.

Please see attached console log.
User Comments: andreas_kupries added on 2007-10-12 00:20:27:
Logged In: YES 
user_id=75003
Originator: NO

After fixing the ActiveTcl buildsystem to properly modify the {tcl,tk}Config.sh for patching on install (OS X) there was no trouble to build TclOO without changes. See the teapot @ http://teapot.activestate.com/entity/name/TclOO/ver/0.1/index
IMVHO this item can be closed.

das added on 2007-10-02 06:01:43:
Logged In: YES 
user_id=90580
Originator: NO

re. other unix (or even OS X with tcl built without --enable-framework):
if the tcl private headers are installed into ${includedir} (e.g. via tcl makefile target 'install-private-headers'), it would be possible to build extensions using private headers without TCL_SRC_DIR on those platforms also, however TEA_PRIVATE_TCL_HEADERS does not currently appear to support that, that may well be worth fixing...

andreas_kupries added on 2007-10-02 05:48:42:
Logged In: YES 
user_id=75003
Originator: NO

Daniel, thank you for the clarifications.
Especially the ref that TCL_SRC_DIR is not required any longer.
As that variable also always contains a reference to the buildsystem
and not the install location, and would thus prevent building. It
might be that on other unixoids use this variable still prevents building
of packages requiring the private headers.

I have just commited a change to our buildsystem which hopefully fixes
the problem. I will keep in touch with Gerald about this.

das added on 2007-10-02 05:35:15:
Logged In: YES 
user_id=90580
Originator: NO

Andreas,

no, TEA_PRIVATE_TCL_HEADERS has in fact nothing to do with the use of TCL_BUILD_LIB_SPEC et al, it only uses TCL_SRC_DIR from tclConfig.sh.

TEA_LOAD_TCLCONFIG is what determines use of TCL_BUILD_*, depending on the presence of Makefile alongside tclConfig.sh, there is no connection to private header use by an extension.

On OS X, since 2005-06-23, TEA_PRIVATE_TCL_HEADERS will use Headers and PrivateHeaders in Tcl.framework if present, so that building with private headers can be used even if the directory TCL_SRC_DIR does not exist (FR 947735), as in the case of an ActiveTcl install, c.f TEA_PRIVATE_TCL_HEADERS in tclconfig/tcl.m4:

    if test "`uname -s`" = "Darwin"; then
        # If Tcl was built as a framework, attempt to use
        # the framework's Headers and PrivateHeaders directories
        case ${TCL_DEFS} in
    *TCL_FRAMEWORK*)
        if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
        TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
        TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
        ;;
esac
    else


Donal,

IMO, you don't need to do anything, Gerald's install problem is due to a bug in ActiveTcl's tclConfig.sh.
You could mention in your README that configuring with --libdir=/Library/Tcl on OS X works around this bug and allows building&installing tclOO against ActiveTcl on that platform.

dkf added on 2007-10-02 05:13:57:
Logged In: YES 
user_id=79902
Originator: NO

I'm happy to do whatever is needed to make things work, but only once I understand what needs doing. :-)

andreas_kupries added on 2007-10-02 05:01:00:
Logged In: YES 
user_id=75003
Originator: NO

It is my understanding of TEA that if you use TEA_PRIVATE_TCL_HEADERS that the system will use TCL_BUILD_SPEC, etc., to set up paths, which all point into the build environment, and that it is this which makes it impossible to complete the build.

das added on 2007-10-02 02:51:26:
Logged In: YES 
user_id=90580
Originator: NO

Andreas,

on OS X ActiveTcl does in fact install the private headers as part of Tcl.framework, and TEA picks that up correctly and uses them, so it is indeed possible to build packages that require internal headers (which is presumably how Gerald got past the build step to the problem at the install step in the first place...).
It should be possible for ActiveTcl to support such a use; if not, you might want to remove T{cl,k}.framework/PrivateHeaders.


Gerald,

with TEA extensions on OS X you usually want to configure with --libdir=/Library/Tcl or --libdir=~/Library/Tcl to set the package install location rather than rely on the default exec prefix from tclConfig.sh, using this would also work around the current bug in ActiveTcl's tclConfig.sh. (I have been considering making --libdir=/Library/Tcl the default in TEA on OS X, but have been worried about unintended consequences/breakage).

gwlester added on 2007-10-01 23:39:39:
Logged In: YES 
user_id=121110
Originator: NO

This is for TclOO -- sorry forgot to add it into the comments.  (p.s. -- we need to add a TclOO category).

andreas_kupries added on 2007-10-01 23:21:48:
Logged In: YES 
user_id=75003
Originator: NO

This bug report is a bit unclear ... The ActiveState distribution does not have something to 'make install' ... Reading the attached log it seems you tried to self-compile ... dkf's oocore and pointed its configure to an installed ActiveTcl 8.5.

Is that correct ?
And it picks up incorrect paths from the tclConfig.sh ?
...
Yes, it seems that TCL_(EXEC_)PREFIX contain paths to my buildsystem.

This should be reported to ActiveState and not here.
Because the problem is in ActiveState's OS X tclConfig.sh, not oocore's 'make install'.

... Having checked a bit further it seems that 'oocore' requires the Tcl internal headers (configure.in). That is actually something ActiveTcl is not supporting at all. Because using the internal headers also implies having access to the sources and buildsystem of Tcl, and that is something which is not provided by ActiveTcl.

IOW, packages requiring internal headers of Tcl cannot be build against ActiveTcl.

Still, the bogus paths in TCL_(EXEC_)PREFIX should be fixed.

[email protected] added on 2007-10-01 23:07:47:

File Added - 247930: console.log

Attachments: