SGI: Development

Building the New Ted word processor on IRIX. - Page 1

Hello All,

Just reporting back to the kermunniti about New Ted (Ted v2.23) on IRIX.

Over the past few weeks I've been in touch with its developer and he's been looking at the bugs I was seeing on IRIX. Turns out that the main culprit is the IRIX system iconv which is missing the 1252 codepage. This codepage just happens to be the default for RTF, which is what Ted uses as its native dataformat. The developer has a hack in place to fallback to the ISO-8859-1 codepage which IRIX iconv does support natively. That said, he's unhappy with it so he hasn't released it. When he gets back from vacation he'll be looking into a more permanent fix.

In the meantime I thought I'd share my kwikfixes for compiling New Ted on IRIX. It's from memory so I might have missed something.

1. Get GNU iconv off ftp.gnu.org and compile/install it. I did not check the nekoware version coz unlike Hamei I have a house rule that says this stuff goes into /usr/local/ :)

2. Make sure your IRIX box has access to:

- Freetype2
- Xft
- Fontconfig
- libRender
- PCRE
- GCC

I probably missed one or two other dependencies but this list should get you started.

3. In the ./Ted source directory you'll need to replace

Ted/tedListTool.c
Ted/tedInput.c

with the ones I've attached to this post. They contain my hack for the X11 keysyms #include bug on IRIX. Once the developer gets back from holiday we'll get a proper fix in place for this too.

4. Run a 'configure' with the switches you need to point to /usr/nekoware/* and/or /usr/local/*. The compile run should work fine till you get to the link stage when IRIX ld will do the o32/n32 complaining that it does... Just dive into ./Ted/makefile and find the definitions of:

MOTIF_STATIC_LIBS=
MOTIF_SHARED_LIBS=

and change /usr/lib to /usr/lib32. Then call 'make' again to complete the compilation of Ted.

5. Run 'make private' and all being well-ish you'll end up with a binary that does word processing on IRIX with a Motif UI and modern font handling. Drop any TTF/OTF font into a directory that fontconfig keeps track of on your system and hey presto - it's available for use in yer Motif word processor. nom nom nom.

Enjoy,

J.

PS. If you do get New Ted up and running well enough to send Pymbles' granny a letter, you might also want to drop the Ted developer a Thank You email. After all, this is Motif software that does something useful and has a living, breathing developer behind it. Recently I've seen more hens teeth, unicorns and flying pigs.

He's particular about having his email posted freely wrt. junk-email, so get the details here: http://www.nllgg.nl/Ted/
:Fuel: redbox 800Mhz 4Gb V12
And of course I forgot one of the main steps, telling the linker where to find your GNU iconv...

In ./Ted/makefile find

SYS_STATIC_LIBS = -L/usr/local/lib -lpcre
SYS_SHARED_LIBS = -L/usr/local/lib -lpcre

(your system may have a different -L path) and add -liconv to the end of both lines.

Sorry for the omission.

J.
:Fuel: redbox 800Mhz 4Gb V12
Probably no need for me to keep diddling around with Maxwell then eh? :shock:

Well, no other reason than sweet revenge for the abuse it's heaped on me... :twisted:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
jimmer wrote: Hello All,
Just reporting back to the kermunniti about New Ted (Ted v2.23) on IRIX.

This is really cool, jimmer ! If I ever get five minutes to call my own I'll have to give 'er a shot ...

vishnu wrote: Probably no need for me to keep diddling around with Maxwell then eh? :shock:

Nah, we still need it !

Well, no other reason than sweet revenge for the abuse it's heaped on me... :twisted:

We will fight them on the beaches. We will fight them in the hard drive. We will fight them in their towers of corporate oppression. But as long as the dream of freedom lives in the hearts of the downtrodden we will never be truly defeated :shock:
hamei wrote: We will fight them on the beaches.


I d'blieve it's "we shall fight them on the beaches" but either way he was wrong; no one ever fought us on the beaches, they preferred to shoot at us from the comfort of their entrenchments... :shock:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
jimmer wrote: 1. Get GNU iconv off ftp.gnu.org and compile/install it. I did not check the nekoware version coz unlike Hamei I have a house rule that says this stuff goes into /usr/local/ :)

Nekoware version is the latest (1.14), Mr User Local :D So that saves a couple of steps.
jimmer wrote: 3. In the ./Ted source directory you'll need to replace

Ted/tedListTool.c
Ted/tedInput.c

with the ones I've attached to this post.

Exactly ! but ... umm ... jimmer ? You attached ted Link tool.c to your post :(

Code: Select all

cc-1020 cc: ERROR File = tedListTool.c, Line = 1838
The identifier "XK_KP_9" is undefined.

case KEY_KP_9:
^

22 errors detected in the compilation of "tedListTool.c".


Otherwise, it's going splendidly with MIPSPro :D

Well, okay ... for others who want to try this :

< configure > is a directory level down, there doesn't appear to be one in the top level. So you can just open the Makefile at the top and replace --with-GTK by --with-MOTIF (all caps). You can also add < --prefix=/usr/nekoware > if you like, seems to work so far but I don't have a binnery to test with yet so no promises. After you edit the Makefile can just run gmake as usual and once Mr Jimmer Sir hands out our Wonka Bars with the golden tedList.c we'll be off and running :P
hamei wrote: Exactly ! but ... umm ... jimmer ? You attached ted Link tool.c to your post :(

Oopsiedaisy... my bad. :oops:

J.
:Fuel: redbox 800Mhz 4Gb V12
jimmer wrote: Oopsiedaisy...

I have said that once or twice in my life :D

Meanwhile, I know this isn't fair since I'm using the nekoware libiconv (settings alluded to above all seem to be correct, with the exception of MIPSPro and nekoware iconv / perl libary substituted in but ...

Code: Select all

urchin 37% gmake
cd Ted && gmake
gmake[1]: Entering directory `/usr/people/dev/teddy/Ted-2.23/Ted'
cc -mips4 -L/usr/nekoware/lib -L/usr/lib32 -Wl,-rpath -Wl,/usr/nekoware/lib -o Ted tedVerticalRuler.o tedUndo.o tedTocTool.o tedToc.o tedThisNoteTool.o tedTextOrnamentsTool.o tedTabsTool.o tedTableTool.o tedTable.o tedSymbolPicker.o tedSpellTool.o tedShadingTool.o tedSelectionGeometry.o tedSelectionDescription.o tedSelect.o tedSectionTool.o tedSaveDocument.o tedRuler.o tedRowTool.o tedRowMarginsTool.o tedRepeat.o tedParaOrnamentsTool.o tedParaLayoutTool.o tedPageLayoutTool.o tedPage.o tedOpenDocument.o tedObjects.o tedObjectDrag.o tedNotesTool.o tedNote.o tedMouseInput.o tedMain.o tedListTool.o tedLinkTool.o tedLayout.o tedInsertNode.o tedInput.o tedIncludeDocument.o tedImageTool.o tedIcons.o tedHyperlink.o tedHeightTool.o tedHeaderFooterTool.o tedHeaderFooter.o tedFrameTool.o tedFormatToolUtil.o tedFormatToolShowPage.o tedFormatTool.o tedFontTool.o tedFollowLink.o tedFindTool.o tedFindPosition.o tedFind.o tedFileConvert.o tedField.o tedEditSplit.o tedEditOperation.o tedEditObject.o tedEditList.o tedEdit.o tedDrawTextLines.o tedDrawShape.o tedDrawRuler.o tedDrawOrnaments.o tedDrawMotif.o tedDrawGtk.o tedDraw.o tedDocument.o tedDocSetProperties.o tedDocRuler.o tedDocprops.o tedDocFront.o tedDeleteNode.o tedDeleteFromTable.o tedCopyPasteImpl.o tedCopyPaste.o tedColumnTool.o tedCellTool.o tedBottomRuler.o tedBorderTool.o tedBookmarkTool.o tedBookmarkList.o tedAppFront.o tedAppFont.o tedApp.o docSpell.o docScreenFont.o ../lib/docHtml.a ../lib/docLayout.a ../lib/drawMeta.a ../lib/appFrame.a ../lib/docEdit.a ../lib/docRtf.a ../lib/docBuf.a ../lib/docEdit.a ../lib/docBase.a ../lib/bitmap.a ../lib/ind.a ../lib/docFont.a ../lib/utilPs.a ../lib/textEncoding.a ../lib/appUtil.a \
-L/usr/nekoware/lib -lpcre    \
-ltiff -ljpeg -L/usr/nekoware/lib -lpng12 -lz -lm -L/usr/nekoware/lib -lz   \
-lXpm -L/usr/lib32 -lXm   -lXt -lXext -lSM -lICE -lX11  -L/usr/nekoware/lib -lXft -lXrender -lX11 -lfontconfig -lfreetype   -L/usr/nekoware/lib -lfreetype -lz -lbz2 -L/usr/nekoware/lib -lfontconfig   -lm
ld32: WARNING 84 : ../lib/docEdit.a is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/libXext.so is not used for resolving any symbol.
ld32: ERROR   33 : Unresolved text symbol "libiconv_open" -- 1st referenced by ../lib/textEncoding.a(textConverter.o).
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "libiconv_close" -- 1st referenced by ../lib/textEncoding.a(textConverter.o).
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "libiconv" -- 1st referenced by ../lib/textEncoding.a(textConverter.o).
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO    152: Output file removed because of error.
gmake[1]: *** [Ted] Error 2

It seems that the problem involves libiconv, I think the libraries are the correct ones and in the correct order so the linker can find everything the way it wants, all the object files compiled nicely with MIPSPro and nekoware gnu iconv v1.14 is installed and functional and findable ... what did I screw up ?
ehh... as far as I can tell, you haven't added -liconv to the linker switches yet.

I suggest you look for:

-L/usr/nekoware/lib -lpcre

in your makefile and add -liconv to the end of it:

-L/usr/nekoware/lib -lpcre -liconv

J.
:Fuel: redbox 800Mhz 4Gb V12
jimmer wrote: ehh... as far as I can tell, you haven't added -liconv to the linker switches yet.

Speaking of :oops: , looks like I was editing the wrong makefile ...

Okay le, now that we have a running teddy ...


Sorry for the size but if I scale it it looks ghastly ..

It works. It is compilable with MIPSPro and nekoware iconv. Mr Jimmer's instructions and corrected source files above will get one through the job. The drop-down menus which I didn't get in the screenshot (anyone have a way to get a screenshot with menus exposed ?) are nicely helvetica italic. It should be Xdefaultable to a slightly more Irix appearance. It created rtf files that are cross-platform. It does import graphics files pretty well.

On the negative side, there's that same problem at high res that the early one had. See how the writable area does not fill the window area ? It won't draw down past a certain point. Also the opening splash screen. Maybe some people like Windows 3.1 and Internet Portals. Not me so much (but that is most likely easily fixable.) And it doesn't listen to the dpi setting on one's desktop. Is 12p 12 pixels or 12 points ?

There is good potential here but vish ? Don't quit on Maxwell just yet !

jimmer, thank you very much.

edit: Put it through its paces a little. It would be decent enough for letters to grandma. It's nice to be able to insert graphics and other things plus the fact that Windders can read the files is a big plus. It looks decent and seems reliable. For me there are a few minuses - no zoom and it has problems scaling. Fonts look nice and sharp though, does superscripts and subscripts easily which is nice. It is attractive and clean-looking (except for the splash screen and the way you have to go through a tunnel to get into the program ... ) The html output works okay at least for simple stuff. Both ps2pdf and showps don't like the postscript output. I am too lazy to turn on the printer to try a test postscript but the aforementioned results are not too encouraging. Word 2000 reads the rtf output fine.

I can see this being useful, if not exactly the word processor I would design if I were the god of word processors ... better than Open Ossifrice tho, for less complicated pages.

I can imagine it being the basis for something really useful, too. Just needs some of the rough edges deburred ...
hamei wrote: On the negative side, there's that same problem at high res that the early one had. See how the writable area does not fill the window area ? It won't draw down past a certain point.

Is that perhaps just related to paper size? I.e., below that point, would you be spilling onto the next sheet of paper so it just doesn't bother drawing below the end of the physical page? Some word processors flow continously, some offer a page-by-page view, some are configurable. So maybe Ted's doing page-by-page in your screenshot. Does scrolling down get you an entirely new, blank page or just a continuation of what you've got?
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
jpstewart wrote: maybe Ted's doing page-by-page in your screenshot.

Good point, bad description on my part. The thing is, it doesn't scale. Normally if you have a word processor page showing and drag it bigger, it gets bigger. Ted does not. I bet that 99% of the time that is not a problem but for me, it's a killer. At 200 dpi it's just too small.

If you want to play with a non-approved experimental version, a gzipped binnery is attached. Should run (I hope ?) for anyone with the following (but no docs included)

Code: Select all

urchin 1# ldd teddly
libpcre.so.1  =>         /usr/nekoware/lib/libpcre.so.1
libiconv.so.3  =>        /usr/nekoware/lib/libiconv.so.3
libtiff.so.6  =>         /usr/nekoware/lib/libtiff.so.6
libjpeg.so.63  =>        /usr/nekoware/lib/libjpeg.so.63
libpng12.so.0  =>        /usr/nekoware/lib/libpng12.so.0
libz.so.1  =>    /usr/nekoware/lib/libz.so.1
libm.so  =>      /usr/lib32/libm.so
libXpm.so.1  =>  /usr/lib32/libXpm.so.1
libXm.so.1  =>   /usr/lib32/libXm.so.1
libXt.so  =>     /usr/lib32/libXt.so
libXext.so  =>   /usr/lib32/libXext.so
libX11.so.1  =>  /usr/lib32/libX11.so.1
libXft.so.2  =>  /usr/nekoware/lib/libXft.so.2
libXrender.so.1  =>      /usr/nekoware/lib/libXrender.so.1
libfontconfig.so.2  =>   /usr/nekoware/lib/libfontconfig.so.2
libfreetype.so.7  =>     /usr/nekoware/lib/libfreetype.so.7
libbz2.so.1.0  =>        /usr/nekoware/lib/libbz2.so.1.0
libc.so.1  =>    /usr/lib32/libc.so.1
libpthread.so  =>        /usr/lib32/libpthread.so
libjbig.so.1.0  =>       /usr/nekoware/lib/libjbig.so.1.0
libfastm.so  =>  /usr/lib32/libfastm.so
libz.so  =>      /usr/nekoware/lib/libz.so
libpng.so.3  =>  /usr/nekoware/lib/libpng.so.3
libz.so  =>      /usr/nekoware/lib/libz.so
libgen.so  =>    /usr/lib32/libgen.so   delay-load
libz.so  =>      /usr/nekoware/lib/libz.so
libz.so  =>      /usr/nekoware/lib/libz.so
libexpat.so.2  =>        /usr/nekoware/lib/libexpat.so.2
libz.so  =>      /usr/nekoware/lib/libz.so

Doesnt have all the copyrights and gnu statements included, forgive me lord for I have sinned. This is just for messing with and no it's not my program, I'm not trying to steal the lifeblood of anyone's hard-won efforts to bring us all world peace and feed the poor, &c &c. If a few people try it and like it maybe we can get together a kickstarter project to make a nekodist :D
hamei wrote: If a few people try it and like it maybe we can get together a kickstarter project to make a nekodist :D

Har! :lol:

So I dl'ed it and and then:

vishnu@starhunter:~$ mkdir saferoom
vishnu@starhunter:~$ mv teddly.gz saferoom
vishnu@starhunter:~$ cd saferoom
vishnu@starhunter:~/saferoom$ gunzip teddly.gz
vishnu@starhunter:~/saferoom$ ls
teddly
vishnu@starhunter:~/saferoom$ file teddly
teddly: ELF 32-bit MSB executable, MIPS, N32 MIPS-IV version 1 (SYSV), dynamically linked (uses shared libs), stripped
vishnu@starhunter:~/saferoom$ mv teddly /usr/nekoware/bin


Problem solved! :mrgreen:

EDIT: Oops I forgot a step:

vishnu@starhunter:~/saferoom$ ln -s /usr/nekoware/bin/teddly /usr/nekoware/bin/ted

BTW thanks for figuring all this out for us Jimmer! :mrgreen:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
vishnu wrote: So I dl'ed it and and then:

You tried it and it worked ? I'm amazed. :shock: . Normally there's a bunch of other stuff the app requires to run besides just the executable (I wish someone would execute mozilla) ...

You could just rename it rather than linking, btw. There's nothing special about the name.

BTW thanks for figuring all this out for us Jimmer! :mrgreen:

Agreed, thanks much for the time and effort, Mr J.
vishnu wrote:
BTW thanks for figuring all this out for us Jimmer! :mrgreen:

hamei wrote:
Agreed, thanks much for the time and effort, Mr J.

You're all very welcome, but I think most of our thanks should go to the Ted developer for keeping the Motif part of his project in sync with the Gtk+ bits.

J.

_________________
:Fuel: redbox 800Mhz 4Gb V12
Perhaps I found a problem which could use some confirmation : in Motif, the white typing area is blocked at a certain size. On my screen it's about half-height. So I just built a gtk2 version : no problem. Soooo .... either there is a problem with my building or it is in Ted's Motif.

It's pretty easy to build with jimmer's instructions, if someone else would like to do a cross-check ...

Picture is worth 10,000 words :
Attachment:
Ted-Motif_small.jpg
Ted-Motif_small.jpg [ 89.03 KiB | Viewed 362 times ]

Attachment:
Ted-GTK_small.jpg
Ted-GTK_small.jpg [ 149.61 KiB | Viewed 362 times ]

_________________
waiting for flight 1203 ...
Looks cool. Hi Hamei!
squeen wrote:
Looks cool. Hi Hamei!

Hi squeen ! hen jiao bu jian :D good to see you !

It would look cooler if the Motif version would work :( Just tried 2.16, got the same result. Oddly, there was no iconv situation with that older version ... I thought that was because of codepage 1252 ?

Next, I guess it's freeware.sgi time. If that one won't scale then I have to suspect the large number of pixels involved is hitting some wall in Motif but not gtk ? ?

edit : Winnah ! Winnah ! We have a bug ! freeware Ted v 2.12 from 2002 does exactly the same thing. Most likely someone would have noticed that over the past ten years if it were common ... Apparently there's something in the Motif code which kacks at large numbers when describing the drawing / writing area.

_________________
waiting for flight 1203 ...
And you're linked against Motif-2.1 yes? I only ask because IRIX still ships with Motif-1.2 for backward compatibility...

_________________
Project:
Movin' on up, toooo the east side
Plan:
World domination! Or something...