What a mess. Thanks for soldiering forward, Jon.

Yeah, UTF-8 is long overdue.‎

If I might ask, how *is* Tcl being used?‎ I've been wanting to add an 
(optional) extension language to dtwm; is Tcl the obvious project-wide choice, 
or should I just make my own selection?

-mrt
  Original Message  
From: Jon Trulson‎
Sent: Wednesday, September 19, 2018 18:28
To: cdesktopenv-devel@lists.sourceforge.net
Subject: Re: [cdesktopenv-devel] [PATCH] Disable building of tcl on linux

FWIW, I've spent some time on this periodically over the last couple 
weeks. The problems run deep. The failure reported below turned out to 
be due to instant (dtdocbook/instant) crashing during help generation.

I managed to fix several problems there, but then there were more issues 
with the changes in the modern Tcl. We were using 7.5, I believe the 
version on my ubuntu 16.04 machine is 8.6.

So, in addition to instant, I had to fix or work around some issues in 
docbook.tcl. Since prior to this issue I'd never touched Tcl, I needed 
some time to figure it out :)

The good thing is that I understand a lot more about what Tcl is and how 
it's actually being used now.

One fix I had to make to instant, is that it would choke on 8 bit 
characters - of the sort you would find in a German, French or Italian 
locale. The problem there is that as of Tcl 8.0 (I believe) Tcl 
requires strings to contain valid utf8 encoded characters. Otherwise it 
behaves badly, ie: crashes with an error, and truncates the string 
causing further parsing errors down the line in help text generation.

So I had to hack instant to translate these into a hex representation 
that would pass muster: 0xc8 -> "\xc8" for example.

This seems to work, and I was finally able to complete a full build 
without errors today. But it is a hack that would need to be removed 
when we move toward UTF-8 everywhere.

I will test it some more and clean it up before I commit it.

And, after this work, I'm thinking I want to try to tackle that next: 
switching to UTF-8, probably in a separate branch initially.

That would be a big task too, but I think a lot of things would be 
better in the long run if we just took that plunge ASAP and get it over 
with.

-jon

On 09/02/2018 03:47 PM, Jon Trulson wrote:
> I can't apply this for a couple reasons:
> 
> On 08/26/2018 09:00 AM, Chase via cdesktopenv-devel wrote:
>>   INCLUDES = -I../lib/tptregexp -I../tcl -I$(XLATESRC)
> 
> Should not be adding ../tcl to the include list if we are using the 
> system version...
> 
>>   DEPLIBS = $(DEPDTSVCLIB)
>> +#if defined(__linux__)
>> +DEFINES = -DUSE_INTERP_ERRORLINE -DUSE_INTERP_RESULT
> 
> What do these do?
> 
>> +LOCAL_LIBRARIES = /usr/lib/x86_64-linux/gnu/libtcl.a $(DTSVCLIB) 
>> $(TTLIB) \
> 
> Cannot hard code this path.  It does not exist on my system at least. 
> Something like '-ltcl' would be better.
> 
>> +$(XMLIB) $(XTOOLLIB) $(XLIB) -L../lib/tptregexp -ltptregexp
>> +#else
>>   LOCAL_LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
>>   -L../lib/tptregexp -ltptregexp ../tcl/libtcl.a
>> +#endif
>>   #if defined(SunArchitecture)
>>   EXTRA_LIBRARIES = -lsocket -lnsl -lgen -lm
>>   #else
> 
> For kicks, I addressed the above issues, but there is a build failure. 
> Many warnings about deprecated function calls, passing ints as pointers 
> and vice versa.
> 
> Then, Help generation fails:
> 
> LANG=es_ES.ISO8859-1 SGML_SEARCH_PATH=".:.." 
> LD_LIBRARY_PATH=../../../exports/lib:/usr/dt/lib:/usr/lib
> DTLCXSEARCHPATH=../../../lib/DtHelp /bin/ksh 
> ../../../programs/dtdocbook/doc2sdl/dtdocbook -t 
> ../../../programs/dtdocbook/doc2sdl -H 
> ../../../programs/dthelp/parser/pass2/htag2/dthelp_htag2 -I 
> ../../../programs/dtdocbook/instant/instant -L 
> ../../../programs/dtdocbook/xlate_locale/xlate_locale -S 
> ../../../programs/nsgmls/nsgmls  -o ../help-sdl/Appmanager.sdl 
> Appmanager/book.sgm
> dtdocbook fatal error:
>     Error processing book.out.sdl by 
> ../../../programs/dthelp/parser/pass2/htag2/dthelp_htag2
> Makefile:742: recipe for target '../help-sdl/Appmanager.sdl' failed
> 
> as an example.
> 
> Clearly this needs more work (and testing!).  It's possible  that the 
> TCL code in CDE depends on a vastly older version, and will need to be 
> updated as well before we can depend on modern versions...
> 

-- 
Jon Trulson

"In the game of chess, you can never let your adversary see your pieces."

- Zapp Brannigan


_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to