Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BLT vs Tcl/Tk 8.5.2 ?

84 views
Skip to first unread message

Larry W. Virden

unread,
May 14, 2008, 11:16:59 AM5/14/08
to
I'm taking a look at building BLT under Tcl/Tk 8.5.2 . I started out
using the latest CVS head snapshot available over at the activestate
cvs ftp site. I run configure on my SPARC Solaris 2.8 system using
Sun's c compiler. I run gmake and get:


gmake[1]: Entering directory `/vol/tclsrcsol/tcl85/blt/unix/src'
/opt/SUNWspro/bin/cc -c -KPIC -g -xs -O -I. -I../../src -I/vol/
tclsrcsol/tcl8
52/include -I/usr/openwin/include ../../src/bltAlloc.c
"../../src/tclIntDecls.h", line 80: syntax error before or at: ->
"../../src/tclIntDecls.h", line 80: warning: old-style declaration or
incorrect
type for: tcl_CreateNamespace
"../../src/tclIntDecls.h", line 80: warning: old-style declaration or
incorrect
type for: interp
"../../src/tclIntDecls.h", line 81: syntax error before or at: char
"../../src/tclIntDecls.h", line 81: type specifier can not be used as
array size
expression qualifier
"../../src/tclIntDecls.h", line 81: warning: no explicit type given
"../../src/tclIntDecls.h", line 81: warning: old-style declaration or
incorrect
type for: name
"../../src/tclIntDecls.h", line 81: warning: old-style declaration or
incorrect
type for: ClientData
"../../src/tclIntDecls.h", line 81: identifier redeclared: ClientData
current : int
previous: pointer to void : "/vol/tclsrcsol/tcl852/include/
tcl.h", line
309
"../../src/tclIntDecls.h", line 81: syntax error before or at:
clientData
"../../src/tclIntDecls.h", line 81: warning: old-style declaration or
incorrect
type for: clientData
"../../src/tclIntDecls.h", line 81: warning: old-style declaration or
incorrect
type for: Tcl_NamespaceDeleteProc


and more.

That header is significantly different from the tcl 8.5.2 version.
That makes it more difficult to determine what has to be hacked.

I was wondering whether anyone here has already taken a look at this.

Torsten Berg

unread,
May 14, 2008, 3:59:05 PM5/14/08
to

> I'm taking a look at building BLT under Tcl/Tk 8.5.2 . I started out
> using the latest CVS head snapshot available over at the activestate
> cvs ftp site. I run configure on my SPARC Solaris 2.8 system using
> Sun's c compiler. I run gmake and get:

I see the same kind of messages. BLT uses its own copies of Tcl
internals, hence the problems because these changes in Tcl8.5. When
changing these to look like the current ones, you get other errors in
response :-(

> That header is significantly different from the tcl 8.5.2 version.
> That makes it more difficult to determine what has to be hacked.
>
> I was wondering whether anyone here has already taken a look at this.

Jos Decoster has: http://wiki.tcl.tk/3660

Curiously enough, he does not mention Tcl_CreateNamespace and
friends ...

Torsten

jdc

unread,
May 15, 2008, 2:58:36 AM5/15/08
to
Hi,

> Jos Decoster has:http://wiki.tcl.tk/3660
>
> Curiously enough, he does not mention Tcl_CreateNamespace and
> friends ...

I only compiled on Linux (gcc) and Windows (visual studio), not on
Sun.

Jos.

Torsten Berg

unread,
May 15, 2008, 6:25:26 AM5/15/08
to

> > Curiously enough, he does not mention Tcl_CreateNamespace and
> > friends ...

Sorry for the confusion, I have to correct myself: I retried using the
current cvs HEAD of Tcl and BLT and the above error is gone. Looking
into src/bltNSUtil.h shows that the definition of Tcl_CreateNamespace
(and others) have been updated to match the Tcl counterparts.

> I only compiled on Linux (gcc) and Windows (visual studio), not on
> Sun.

I compiled on MacOS X with target X11 and without patching the BLT
sources according to Jos' description on the Wiki, the compile stops
here:

bltUnixFont.c:237: error: 'FC_DECORATIVE' undeclared here (not in a
function)
bltUnixFont.c:238: error: 'FC_EMBEDDED_BITMAP' undeclared here (not in
a function)
bltUnixFont.c: In function 'FtGetFontFamilies':
bltUnixFont.c:1298: warning: pointer targets in passing argument 1 of
'Blt_StrdupAbortOnError' differ in signedness
bltUnixFont.c: In function 'FtNewFont':
bltUnixFont.c:1837: warning: assignment discards qualifiers from
pointer target type
make[1]: *** [bltUnixFont.o] Error 1
make: *** [all] Error 2

I'll try later with the patches in place (no time yet).

Torsten

Larry W. Virden

unread,
May 15, 2008, 7:20:48 AM5/15/08
to
On May 15, 6:25 am, Torsten Berg <b...@typoscriptics.de> wrote:
> > > Curiously enough, he does not mention Tcl_CreateNamespace and
> > > friends ...
>
> Sorry for the confusion, I have to correct myself: I retried using the
> current cvs HEAD of Tcl and BLT and the above error is gone. Looking

When you say current cvs head of tcl, do you mean tcl 8.6.0?

Torsten Berg

unread,
May 15, 2008, 10:06:36 AM5/15/08
to

Yes, Tcl 8.6a0

Larry W. Virden

unread,
May 15, 2008, 11:05:08 AM5/15/08
to


Weird, I downloaded the activestate cvs tar files for both tcl 8.6a0
and blt this morning, and I see the same problem using that
combination as I see with the blt and tcl 8.5.2 .

Torsten Berg

unread,
May 15, 2008, 11:15:37 AM5/15/08
to

> Weird, I downloaded the activestate cvs tar files for both tcl 8.6a0
> and blt this morning, and I see the same problem using that
> combination as I see with the blt and tcl 8.5.2 .

Perhaps, this is the problem. I downloaded both from SF directly.
These may be more recent, then?

Larry W. Virden

unread,
May 15, 2008, 2:48:35 PM5/15/08
to

That could be. The activestate files are updated once each 24 hrs. So
I will try again tomorrow.

Torsten Berg

unread,
May 22, 2008, 6:42:46 AM5/22/08
to

> > Perhaps, this is the problem. I downloaded both from SF directly.
> > These may be more recent, then?
>
> That could be. The activestate files are updated once each 24 hrs. So
> I will try again tomorrow.

Did you succeed? Just curiuos ...

Torsten

Larry W. Virden

unread,
May 22, 2008, 7:07:49 AM5/22/08
to
On May 22, 6:42 am, Torsten Berg <b...@typoscriptics.de> wrote:
> Did you succeed? Just curiuos ...
>
> Torsten

No, I still have not been successful. Perhaps the issue is that I am
using Sun's C compiler instead of gcc. But that is the only compiler I
can use, due to other restrictions.

So, for the time being, BLT will not be one of the extensions my
developers will be able to use with Tcl 8.5 .

Larry W. Virden

unread,
May 22, 2008, 8:00:03 AM5/22/08
to
Here's what the latest BLT cvs head and tcl 8.5.2 is doing.

When building bltAlloc.c, the first module, I get a syntax error in
tclIntDecls.h. That line is:


/* 113 */
extern Tcl_Namespace * Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp *
interp,
char * name, ClientData clientData,
Tcl_NamespaceDeleteProc *
deleteProc));

and when I use -C -E to expand the preprocessor (and keep comments) I
end up with:

/* 113 */
extern Tcl_Namespace * ( tclStubsPtr -> tcl_CreateNamespace )
( Tcl_Interp *
interp , char * name , ClientData clientData , Tcl_NamespaceDeleteProc
* deleteP
roc ) ;

Sun's C compiler objects to the tclStubsPtr -> tcl_CreateNamespace
notation in the prototype.
This notation is used throughout the tclIntDecl.h file

Does gcc allow that notation?

Torsten Berg

unread,
May 23, 2008, 7:42:38 AM5/23/08
to

> Here's what the latest BLT cvs head and tcl 8.5.2 is doing.
>
> When building bltAlloc.c, the first module, I get a syntax error in
> tclIntDecls.h. That line is:

> Sun's C compiler objects to the tclStubsPtr -> tcl_CreateNamespace


> notation in the prototype.
> This notation is used throughout the tclIntDecl.h file
>
> Does gcc allow that notation?

Using gcc on Mac for the exact same versions of BLT and Tcl I get no
error at this point, but the compile stops later with:

bltUnixFont.c: In function 'FtGetFontFamilies':
bltUnixFont.c:1298: warning: pointer targets in passing argument 1 of
'Blt_StrdupAbortOnError' differ in signedness
bltUnixFont.c: In function 'FtNewFont':
bltUnixFont.c:1837: warning: assignment discards qualifiers from
pointer target type

I used the following call (compiling for X11):

./configure --with-tcl=/Users/Torsten/Tcl/distrib/tcl8.5.2/unix/ --
with-tk=/Users/Torsten/Tcl/distrib/tk8.5.2/unix/ --with-tclincls=/
Users/Torsten/Tcl/distrib/tcl8.5.2/generic/ --with-tkincls=/Users/
Torsten/Tcl/distrib/tk8.5.2/generic/

... and the 'make' ...

Torsten

Helmut Giese

unread,
May 23, 2008, 8:11:07 AM5/23/08
to
Hi Torsten,
I don't know anything about gcc or the Mac, but

>Using gcc on Mac for the exact same versions of BLT and Tcl I get no
>error at this point, but the compile stops later with:
>
>bltUnixFont.c: In function 'FtGetFontFamilies':
>bltUnixFont.c:1298: warning: pointer targets in passing argument 1 of
>'Blt_StrdupAbortOnError' differ in signedness
usually this is nothing severe (therefore it's only a warning): a
function expecting e.g. a 'pointer to char' gets passed a 'pointer to
unsigned char'.

>bltUnixFont.c: In function 'FtNewFont':
>bltUnixFont.c:1837: warning: assignment discards qualifiers from
>pointer target type
One would have to know what the qualifier in question was to be able
to judge if it is something serious or not - anyway, this is also just
a warning.

Qusetion: What do you mean when you say


> but the compile stops later

?
The build process shouldn't have stopped because of these 2 warnings.
Either some other error occurred or a binary should have been
produced.
Just my 0.02 Euro
Helmut Giese

Torsten Berg

unread,
May 23, 2008, 1:33:31 PM5/23/08
to

> Qusetion: What do you mean when you say> but the compile stops later

Sorry, I was a bit unprecise. What I meant was, the compile does not
stop at the same point that Larry reported, but later. The bltAlloc
module compiles fine in my environment. The part I posted here is in
full:

cc -c -Wall -Wpointer-arith -Wno-uninitialized -Wmissing-declarations -
Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef -O3 -DMACOSX
-I. -I. -I/usr/local/include -I/opt/local/include/freetype2 -I/opt/
local/include bltUnixFont.c


bltUnixFont.c:237: error: 'FC_DECORATIVE' undeclared here (not in a
function)
bltUnixFont.c:238: error: 'FC_EMBEDDED_BITMAP' undeclared here (not in
a function)

bltUnixFont.c: In function 'FtGetFontFamilies':
bltUnixFont.c:1298: warning: pointer targets in passing argument 1 of
'Blt_StrdupAbortOnError' differ in signedness

bltUnixFont.c: In function 'FtNewFont':
bltUnixFont.c:1837: warning: assignment discards qualifiers from
pointer target type

make[1]: *** [bltUnixFont.o] Error 1
make: *** [all] Error 2

So the error is an undeclared FC_DECORATIVE and FC_EMBEDDED_BITMAP. It
seems, we need to wait for the author to fix this? I'm a bit puzzled
because Emiliano said on the chat some days ago, he made BLT compile
(out of the box?).

Torsten

0 new messages