From: tewei@bnr.ca (Te-Wei Sun)
Subject: Problem in installations for tclX6.2b
Keywords: tclX installations
Reply-To: tewei@bnr.ca (Te-Wei Sun)
Organization: Bell-Northern Research, Ottawa, Ontario, CANADA
Distribution: comp.lang.tcl
Date: Wed, 22 Jul 92 13:27:05 GMT


Hi,

I am trying to install tclX6.2b to tk2.1 on Sparc station, which runs
on SunOS 4.1.1.

Everything went well until tcl executable is being created. The linker
does not seem to be able to find 'mcount'. (undefined symbol).

I have run the config file come with tk2.1. The hierarchy of the 
directories is: tk2.1/tcl/extended. (I believe that's what I am supposed
to do.)

I would also like to have tk2.1 interfacing with C++.
(I have tried to set CPLUSOBJS=tcl++.o.  However, I don't know how tcl++.o
can be created.)

Attached below is a copy of my Config.mk for tclX6.2b.

Any comment is deeply appreciated.

It would also be great if someone can give me some hint about interfacing
tk2.1 with C++.

Thank you in anticipation.


#
# Configuration section.  Modify this section to set some general options and
# selecting a section for a specific Unix implementation.
#
#==============================================================================

#------------------------------------------------------------------------------
# Location of the UCB Tcl distribution relative to this directory.  TclX works
# with either Tcl 6.1 or Tcl 6.2.
#
#TCL_UCB_DIR=../tcl6.1
TCL_UCB_DIR=../

#------------------------------------------------------------------------------
# If you are a Tk user and would like to build a version "wish", the Tk shell,
# that includes the TclX command set, define TCL_TK_SHELL=wish and the
# location of your Tk directory in TCL_TK_DIR relative to this directory. If you
# do not want a "wish" compiled, don't define TCL_TK_SHELL. The libraries
# required to link Tk are defined in the system specific sections below.
#
TCL_TK_SHELL=wish
TCL_TK_DIR=/bnr/tcl/tk2.1

#------------------------------------------------------------------------------
# Compiler debug/optimization/profiling flag to use.  Not that if debugging or
# profiling is enabled, the DO_STRIPPING option below must be disabled.
#
OPTIMIZE_FLAG=-O

#------------------------------------------------------------------------------
# Stripping of the final tclshell binary.  Specify `true' if the binary is to
# be stripped (optimized case) or specify `false' if the binary is not to be
# stripped (debugging case).
#
DO_STRIPPING=true

#------------------------------------------------------------------------------
# Enable or disable Tcl history in the Tcl flag.  If this macro is set to
# '-DTCL_NOHISTORY', the `history' command will not be available in the Tcl
# shell.  Many people do not find the history command useful and its rather
# large, so this way it can be excluded from the standard shell.  It will
# still be in the library and will be available in other applications if they
# use `Tcl_RecordAndEval'.
#
HISTORY_FLAG=

#------------------------------------------------------------------------------
# If C++ is to be used these should be used.  Specifying CPLUSOBJS includes the
# C++ support code in the Tcl library. CCPLUS is the command to run your C++
# compiler. CPLUSINCL is the location of your standard C++  include files.
#
#CPLUSOBJS=tcl++.o
CCPLUS=CC
CPLUSINCL=/usr/include/CC

#------------------------------------------------------------------------------
# Memory debugging defines.  These are only of interest if you are adding C
# code to Tcl or debugging Tcl C code.  They help find memory overwrites and
# leaks.  One or more of the following flags may be specified (in the form
# -DFLAGNAME).
#
#    o TCL_MEM_DEBUG - Turn on memory debugging. 
#    o TCL_SHELL_MEM_LEAK - Dump a list of active memory blocks when the
#      shell exits an eof (requires TCL_MEM_DEBUG).
#
# NOTE: If TCL_MEM_DEBUG is enabled, the Berkeley Tcl distribution must be 
# recompiled with this option as well, or it will not link.  In addition a flag
# MEM_VALIDATE may be specified in the Berkeley Tcl compilation to do
# validation of all memory blocks on each allocation or deallocation (very
# slow).
#
MEM_DEBUG_FLAGS=

#==============================================================================
# Install options sections.  This sections describes the installation options.
# Some of the actual values are set under each system definition in the
# system dependent section.  Your might want to change some of these values
# before installing.
#..............................................................................
#
# o TCL_OWNER - The user that will own all Tcl files after installation.
#   (system dependent)
# o TCL_GROUP - The group that all Tcl files will belong to after installation.
#   (system dependent)
# o TCL_DEFAULT - Base name of Tcl default file.  This name will have a
#   version number appended.  (system dependent)
#

#
# The directory to install Tcl binary into.
#
TCL_BINDIR=/bnr/tcl/tk2.1/tcl

#
# The directory tcl.a library goes into.
#
TCL_LIBDIR=/bnr/tcl/tk2.1/tcl

#
# The directory the Tcl .h files go into.
#
TCL_INCLUDEDIR=/bnr/tcl/tk2.1/tcl

#
# The directory .tcl files and the .tlib library goes into.
#
TCL_TCLDIR=/usr/local/lib/tcl

#==============================================================================
# This section defines where and how the manual pages are to be installed.
# This is somewhat problematic, so a global option not to install manual pages
# is provided. Since there are so many manual pages provided, they are placed
# together in one Tcl manual page directory, rather than splitting into the
# standard manual pages directories.  The actual definitions of these variables
# are set for in the system dependent section.  You might want to modify these
# values.
#..............................................................................

#
# Set to 1 to install manual files, to 0 to not install manual files.
#

TCL_MAN_INSTALL=1

# o TCL_MAN_BASEDIR - Base manual directory where all of the man.* and cat.*
#   directories live.
# o TCL_MAN_CMD_SECTION - Section for Tcl command  manual pages. Normal `1' or
#   `C'.
# o TCL_MAN_FUNC_SECTION - Section for Tcl C level function manual pages.
#   In some cases it might be desirable install all manual pages in one
#   section, in this case, the value should be the same as TCL_MAN_CMD_SECTION.
# o TCL_MAN_SEPARATOR - The separator character used in the directory name
#   of the cat* and man* manual directories.  This is usually empty or 
#   a period.
# o TCL_MAN_STYLE - The style of manual management the system has.  It is
#   a string with one of the following values:
#      o SHORT - Short file name installation (an index can be generated).
#      o LONG - Long file name installation, a link will be made for each
#        name the manual page is to be available under.
# o TCL_MAN_INDEX - If 1, then a manual page index will be build in the manual
#   base directory named index.TCL. Not useful if TCL_MAN_STYLE is LONG. Each
#   line in the file has the form:
#       mansubject manfile section
# o TCL_MAN_INDEX_MERGE - If 1, then the manual index will be merged with the
#   an index file named `index' in the manual base directory.  The old index
#   will be backed up in a file named `index.bak'.

#==============================================================================
# System specific configuration.  Comment out the section of defines that are
# required for your version of Unix.  In addition to the options defined in the
# Berkeley source the following options can be defined here.  This information
# will help you build your own system configuration if one is not supplied
# here.
#
#    o SYS_DEP_FLAGS - The system dependency flags.  The following options are
#      available, these should be defined using -Dflag.
#
#      o TCL_HAVE_SETLINEBUF - Define if the `setlinebuf' is available as part
#        of stdio.
#      o TCL_32_BIT_RANDOM - Define if the `rand' function returns a value in
#        the range 0..(2^31)-1, leave undefined if `rand' returns a value
#        in the range 0..(2^15)-1.
#      o TCL_NO_SELECT - The select call is not available.
#      o TCL_NEED_SYS_SELECT_H - Define if <sys/select.h> is required. May not
#        need it, even if it is there.
#      o TCL_USE_BZERO_MACRO - Use a macro to define bzero for the select
#        FD_ZERO macro.
#      o TCL_POSIX_SIG - Set if posix signals are available (sigaction, etc).
#      o TCL_HAVE_CATGETS - Set if XPG/3 message catalogs are available
#        (catopen, catgets, etc).
#      o TCL_TM_GMTOFF - Set if the seconds east of GMT field in struct tm is
#        names 'tm_gmtoff'.  Not set if its is names 'tm_tzadj'.
#      o TCL_NEED_TIME_H - Set if time.h is required.
#      o TCL_SIG_PROC_INT - Set if signal functions return int rather than
#         void.
#    o LINK_OPTIONS - The flags to specify when linking the tclshell.
#
#    o RANLIB_CMD - Either `ranlib' if ranlib is required or `true' if ranlib
#      should not be used.
#
#    o MCS_CMD - Command to delete comments from the object file comment
#      section, if available.  The command `true' if it's not available.  This
#      makes the object file even smaller after its stipped.
#
#    o SUPPORT_FLAGS - The flags for SUPPORT_OBJS code.  The following options
#      are available, these should be defined using -Dflag.
#
#      o TCL_HAS_TM_ZONE - If if 'struct tm' has the 'tm_zone' field.   Used
#        by strftime.
#
#    o SUPPORT_OBJS - The object files to compile to implement library 
#      functions that are not available on this particular version of Unix.
#      The following are available:
#         o strftime

#------------------------------------------------------------------------------
# System V 3.2.0 (tested on Bell-Tech or Intel Unix for the Intel 386)
#
#SYS_DEP_FLAGS=-DTCL_NO_SELECT
#LINK_OPTIONS=-lc_s -lform -lm
#RANLIB_CMD=true
#MCS_CMD=mcs -d
#SUPPORT_FLAGS=
#SUPPORT_OBJS=strftime.o
#TCL_TK_LIBS= -lX11
#
#TCL_OWNER=bin
#TCL_GROUP=bin
#TCL_DEFAULT=/etc/default/tcl
#
#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=TCL
#TCL_MAN_FUNC_SECTION=TCL
#TCL_MAN_SEPARATOR=.
#TCL_MAN_STYLE=SHORT
#TCL_MAN_INDEX=1
#TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
#  SCO Unix - System V 3.2.2
#
#SYS_DEP_FLAGS=-DTCL_USE_BZERO_MACRO -DTCL_POSIX_SIG -DTCL_NEED_TIME_H
#LINK_OPTIONS=-lc_s -lm -lintl
#RANLIB_CMD=true
#MCS_CMD=mcs -d
#SUPPORT_FLAGS=
#SUPPORT_OBJS=
#TCL_TK_LIBS= -lX11 -lsocket
#
#TCL_OWNER=bin
#TCL_GROUP=bin
#TCL_DEFAULT=/etc/default/tcl
#
#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=TCL
#TCL_MAN_FUNC_SECTION=TCL
#TCL_MAN_SEPARATOR=.
#TCL_MAN_STYLE=SHORT
#TCL_MAN_INDEX=1
#TCL_MAN_INDEX_MERGE=1

#------------------------------------------------------------------------------
# BSD
#
#SYS_DEP_FLAGS=-DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM
#LINK_OPTIONS=-lm
#RANLIB_CMD="ranlib"
#MCS_CMD="true"
#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
#SUPPORT_OBJS=strftime.o
#TCL_TK_LIBS= -lX11
#
#TCL_OWNER=root
#TCL_GROUP=system
#TCL_DEFAULT=/usr/local/lib/tcldefault
#
#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=1
#TCL_MAN_FUNC_SECTION=3
#TCL_MAN_SEPARATOR=
#TCL_MAN_STYLE=LONG
#TCL_MAN_INDEX=0
#TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
# SUN OS older versions (~4.0, let us know which one works for you)
#
#SYS_DEP_FLAGS=-DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM
#LINK_OPTIONS=-lm
#RANLIB_CMD="ranlib"
#MCS_CMD="true"
#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
#SUPPORT_OBJS=strftime.o
#TCL_TK_LIBS= -lX11
#
#TCL_OWNER=bin
#TCL_GROUP=bin
#TCL_DEFAULT=/usr/local/lib/tcldefault

#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=1
#TCL_MAN_FUNC_SECTION=3
#TCL_MAN_SEPARATOR=
#TCL_MAN_STYLE=LONG
#TCL_MAN_INDEX=0
#TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
# SUN OS newer versions (~4.1, let us know which ones works for you)
#
SYS_DEP_FLAGS=-DTCL_HAVE_SETLINEBUF -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG -DTCL_TM_GMTOFF
LINK_OPTIONS=-lm
RANLIB_CMD="ranlib"
MCS_CMD="true"
SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
SUPPORT_OBJS=
TCL_TK_LIBS= -lX11
#
TCL_OWNER=bin
TCL_GROUP=bin
TCL_DEFAULT=/usr/local/lib/tcldefault
#
TCL_MAN_BASEDIR=/usr/man
TCL_MAN_CMD_SECTION=1
TCL_MAN_FUNC_SECTION=3
TCL_MAN_SEPARATOR=
TCL_MAN_STYLE=LONG
TCL_MAN_INDEX=0
TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
#    HPUX - Hewlett-Packard HP/UX
#
#SYS_DEP_FLAGS= -DTCL_32_BIT_RANDOM -DTCL_POSIX_SIG
#LINK_OPTIONS=-lBSD -lPW -lm
#RANLIB_CMD=true
#MCS_CMD=true
#SUPPORT_FLAGS=-DTCL_HAS_TM_ZONE
#SUPPORT_OBJS=strtoul.o
#TCL_TK_LIBS= -lX11
#
#TCL_OWNER=root
#TCL_GROUP=system
#TCL_DEFAULT=/usr/local/lib/tcldefault
#
#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=1
#TCL_MAN_FUNC_SECTION=3
#TCL_MAN_SEPARATOR=
#TCL_MAN_STYLE=LONG
#TCL_MAN_INDEX=0
#TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
#    XENIX-386 - SCO Xenix 2.3.3 for the 80386
#
#SYS_DEP_FLAGS= -DTCL_NEED_SYS_SELECT_H -DTCL_USE_BZERO_MACRO -DTCL_SIG_PROC_INT
#LINK_OPTIONS=-ldir -lm
#RANLIB_CMD=ranlib
#MCS_CMD=true
#SUPPORT_FLAGS=
#SUPPORT_OBJS=strftime.o
#TCL_TK_LIBS=
#
#TCL_OWNER=bin
#TCL_GROUP=bin
#TCL_DEFAULT=/etc/default/tcl
#
#TCL_MAN_BASEDIR=/usr/man
#TCL_MAN_CMD_SECTION=TCL
#TCL_MAN_FUNC_SECTION=TCL
#TCL_MAN_SEPARATOR=
#TCL_MAN_STYLE=SHORT
#TCL_MAN_INDEX=1
#TCL_MAN_INDEX_MERGE=1

#------------------------------------------------------------------------------
# A/UX 2.0.1 - SystemV.2 derivative with BSD extensions
#
#SYS_DEP_FLAGS= -DTCL_USE_BZERO_MACRO -DTCL_SIG_PROC_INT
#LINK_OPTIONS=-lc_s -lm
#RANLIB_CMD=true
#MCS_CMD=true
#SUPPORT_FLAGS=
#SUPPORT_OBJS=
#TCL_TK_LIBS= -lX11
#
#TCL_OWNER=bin
#TCL_GROUP=bin
#TCL_DEFAULT=/usr/local/lib/tcldefault
#
#TCL_MAN_BASEDIR=/usr/catman
#TCL_MAN_CMD_SECTION=1
#TCL_MAN_FUNC_SECTION=3
#TCL_MAN_SEPARATOR=.
#TCL_MAN_STYLE=LONG
#TCL_MAN_INDEX=1
#TCL_MAN_INDEX_MERGE=0

#------------------------------------------------------------------------------
#                        End of Configuration Section
#==============================================================================

--
Te-Wei Sun      tewei@bnr.ca      Bell-Northern Research   Ottawa