Search the web
Sign In
New User? Sign Up
tix · The Tix User Forum
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
compiling tix withj Tcl/Tk 8.4.6   Message List  
Reply | Forward Message #995 of 1043 |
Recently, we had to upgrade the Tcl/Tk/Tix binaries included in our CADP
tools (http://www.inrialpes.fr/vasy/cadp) from TclTk8.2/Tix4.1 to
TclTk 8.4.

We compiled Tcl, Tk, and Tix on 4 platforms
- Solaris 8 with both gcc 2.95.2 and Sun's cc V6 compiler
installed
- Linux RedHat 9 with gcc 3.2.2
- Windows 2000 with Visual Studio 6
- MacOS X 10.2 with gcc3 (Tix not compiled yet).

So doing, we faced various problems. This is a report of the problems
found and proposed solutions. I enclose the feedback received from Jeff
Hobbs (ActiveState.com).

I hope that sharing this information can be helpful to others Tix users
and developers.

Best regards,
Hubert

',',',',',',',',',',' Directeur de recherche INRIA | 655, avenue de
l'Europe
',',',',',',',',',',' tel: +(33) 4 76 61 52 24 | 38330 Montbonnot
St Martin
',',',',',',',',',',' fax: +(33) 4 76 61 52 52 | France
',',',',',',',',',',' http://www.inrialpes.fr/vasy

===============================================================================

INTRODUCTION
============

As regards Tix, it should be said clearly that tix-8.1.4 dated
December 14,
2002 (sometimes also called 8.2 will NOT compile with TclTk 8.4). Don't
waste time trying this.

Instead, you should download from the CVS repository of
sourceforge.net the
latest version of Tix modified by Jeffrey Hobbs in Spring 2004.
cvs -d:pserver:anonymous@...:/cvsroot/tix login
cvs -z3 -d:pserver:anonymous@...:/cvsroot/tix co .
The following comments apply to this latest version of Tix.

Then, there are problems to compile Tix properly, since the documentation
and installation files (configure/Makefiles) are not up to date.

There are two alternative approaches:

1) Approach 1: (new)

Forget about the README.txt and README.html files.

Use the configure file recently added by Jeff Hobbs
Run "./configure" then "make" in the toplevel directory of Tix (not in
unix/ nor win/)

You might need to add options to ./configure such as --prefix=/noprefix
and, on MacOS,
--with-tclconfig=../Release/Library/Frameworks/Tcl.framework
--with-tkconfig=../Release/Library/Frameworks/Tk.framework.

2) Approach 2: (traditional)

If you want to proceed as explained in README.txt and README.html
(in a way that mimicks the building of Tcl and Tk themselves)
you will face several problems, which can be solved by modifying
the following files:
unix/Makefile.in
win/make_pkgIndex.tcl
win/makefile.vc
win/makefile.gnu
as explained below.

IMHO, it would be great to have a new package Tix8.4 integrating the
changes
of Jeff Hobbs and making a consistent choice between both approaches for
compiling Tix.

(Should approach 1 be chosen, then the README files have to be updated,
and several configure/makefiles in subdirectories would become useless
and could be removed).

LIST OF PATCHES NEEDED FOR APPROACH 2
=====================================

Tix issue #1: (Solaris and Linux platforms)
-------------------------------------------

It is written in the ChangeLog file that tixMwm.c was removed and
tixUnixMwm.c
was introduced. But unix/Makefile.in has not been updated accordingly.

References to generic/tixMwm.c are still present in unix/Makefile.in
(at 2 places) and unix/tixUnixMwm.c is not mentioned.

Solution: patch Makefile.in : replace
< MISC_OBJS = \
< tixImgCmp.o \
< tixImgXpm.o \
< tixMwm.o
<
< UNIX_OBJS = \
< tixUnixDraw.o \
< tixUnixXpm.o \
< tixUnixWm.o
with
> MISC_OBJS = \
> tixImgCmp.o \
> tixImgXpm.o
>
> UNIX_OBJS = \
> tixUnixDraw.o \
> tixUnixXpm.o \
> tixUnixWm.o \
> tixUnixMwm.o
and replace
< tixMwm.$(OBJEXT): $(GENERIC_DIR)/tixMwm.c
< $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/tixMwm.c` -o $@
with
> tixUnixMwm.$(OBJEXT): $(UNIX_DIR)/tixUnixMwm.c
> $(COMPILE) -c `@CYGPATH@ $(UNIX_DIR)/tixUnixMwm.c` -o $@

Tix issue #2: (Windows platform)
--------------------------------

There is a typo in file win/make_pkgIndex.tcl : missing \ before $dir at
line 25. This causes compilation to abort.

Solution: patch make_pkgIndex.tcl as follows:
diff make_pkgIndex.tcl.ORIG make_pkgIndex.tcl
25c25
< puts -nonewline $fd "\[list source \[file join $dir pref
WmDefault.tcl\]\]"
---
> puts -nonewline $fd "\[list source \[file join \$dir pref
WmDefault.tcl\]\]"

Hint: to be sure that this change is correct, remark that the \ is present
when \$dir is used a few lines above.


Tix issue #3: (Solaris platform)
--------------------------------

On Solaris systems with both gcc and Sun's cc, the compilation of Tix
aborts with frightening messages such as
> ld: .. relocations remain against allocatable but non-writable sections

The problem is that the Makefile generated by configure is improper.
It defines
CC = cc
(which defaults to /opt/SUNWspro/bin/cc) but, at the same time, calls $CC
with gcc-specific options, such as -fPIC.

I have no clear idea of how to correct Makefile.in/configure (probably
setting CC = gcc in all cases, since link edit already requires gcc),
but I have two workarounds that solve the problem:

- either compile with "make CC=gcc"

- or patch the generated Makefile, keeping CC=cc and replacing
< SHLIB_CFLAGS = -fPIC
< SHLIB_LD = gcc -pipe -shared
---
> SHLIB_CFLAGS = -KPIC
> SHLIB_LD = cc -G


Tix issue #4: (Windows platform)
--------------------------------

Files win/makefile.vc and win/makefile.gnu should be updated to reflect
that this version of Tix works with the latest version of TCL/TK

In both files, replace
> # Set the TCL version. The TK version are assumed to be equal. The
default
> # is 8.3.3.
> !IFNDEF TCL_MAJOR
> TCL_MAJOR = 8
> !ENDIF
> !IFNDEF TCL_MINOR
> TCL_MINOR = 3
> !ENDIF
> !IFNDEF TCL_PATCH
> TCL_PATCH = 3
> !ENDIF
with
< # Set the TCL version. The TK version are assumed to be equal. The
default
< # is 8.4.6.
< !IFNDEF TCL_MAJOR
< TCL_MAJOR = 8
< !ENDIF
< !IFNDEF TCL_MINOR
< TCL_MINOR = 4
< !ENDIF
< !IFNDEF TCL_PATCH
< TCL_PATCH = 6
< !ENDIF


ADDITIONAL COMMENTS
===================


Tix issue #5: (Solaris and Linux platforms)
-------------------------------------------

When running
sh ./configure --prefix=/noprefix \
--with-tclconfig=../../tcl8.4.6/unix \
--with-tkconfig=../../tk8.4.6/unix
a warning occurs:
> configure: warning: No tclsh executable found. You will
have to
> build the pkgIndex.tcl file manually.

To me, this warning should not occur since configure has the mean to
guess where tclsh is (tclsh should be in the directory specified by
--with-tclconfig option).


Tix issue #6: (Solaris and Linux platforms)
-------------------------------------------

The gcc and Sun's cc compilers emit the following warnings:

> generic/tixImgCmp.c", line 678: warning: statement not reached

> generic/tixImgXpm.c: In function `ImgXpmGetDataFromString':
> generic/tixImgXpm.c:497: warning: passing arg 4 of
`Tcl_SplitList' from incompatible pointer type
> prototype: pointer to pointer to pointer to const char :
".../tcl8.4.6/generic/tclDecls.h", line 788
> argument : pointer to pointer to pointer to char


Tix issue #7: (Windows)
-----------------------

The Visual Studio 6 compiler emits the following warnings:

> winMain_patch.c(100) : warning C4090: 'function' : different
'const' qualifier
> winMain_patch.c(100) : warning C4028: formal parameter 1
different from declaration
> winMain_patch.c(100) : warning C4024: 'Tcl_SetPanicProc' :
different types for formal and actual parameter 1

> winMain_patch.c(394) : warning C4090: 'function' : different
'const' qualifiers
> winMain_patch.c(394) : warning C4028: formal parameter 1
different from declaration
> winMain_patch.c(394) : warning C4024: 'Tcl_SetPanicProc' :
different types for formal and actual parameter 1

===============================================================================





Mon Jul 5, 2004 6:17 pm

hgaravel
Offline Offline
Send Email Send Email

Forward
Message #995 of 1043 |
Expand Messages Author Sort by Date

Recently, we had to upgrade the Tcl/Tk/Tix binaries included in our CADP tools (http://www.inrialpes.fr/vasy/cadp) from TclTk8.2/Tix4.1 to TclTk 8.4. We...
hgaravel
Offline Send Email
Jul 5, 2004
6:31 pm

* hgaravel ... --<snip-snip>-- ... Usually you do this by setting CC in the environment when calling configure: env CC=gcc ./configure ... Dito goes for...
Ralf Fassel
ralf@...
Send Email
Jul 5, 2004
7:17 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help