SGI: Development

x's and o's

Thought I'd give xcircuit an update (3.8.31) so the General might spend more time here, got almost to the end but then :

Code:
ld32: ERROR   33 : Unresolved text symbol "vfork" -- 1st referenced by svg.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.

This seems to be a linking error but I ain't no programmer ... what's the best way to figure this out ?

Second, several of these :

Code:
ld32: WARNING 15 : Multiply defined:(fontnumbers) in menucalls.o and xtfuncs.o (2nd definition ignored).
ld32: WARNING 15 : Multiply defined:(popups) in xcircuit.o and xtgui.o (2nd definition ignored).

Shouldn't even gcc find things like this ? Defining the same thing several times cannot be good.

Then there's about two bazillion of these :

Code:
cc-3970 cc: WARNING File = xtgui.c, Line = 878
conversion from pointer to same-sized integral type (potential portability
problem)

XtnSetArg(XtNstring, request);
^

Almost wore out my character generator. That particular warning is common in tons of open source software ... if I were writing code you'd expect this shit but isn't a thousand eyes, five hundred keyboards supposed to fix this kind of thing ?
Quote:
This seems to be a linking error but I ain't no programmer ... what's the best way to figure this out ?
It's a linking error, but it's really something that probably has been cought by configure, but isn't handled in svg.c. Just copy the snippet below from render.c over to svg.c, and report that as a bug upstream, since it's a portability issue.
Code:
#ifndef HAVE_VFORK
#define vfork fork
#endif
Quote:
[...]
Shouldn't even gcc find things like this ? Defining the same thing several times cannot be good.
No, the compiler can't catch any of those Multiply defined: problems, because the symbols are independently defined in multiple .c files, and the compiler only ever gets to see one of those at a time. The two culprits are referred to as "Local Variable definitions" in both .c files, just declare one set as external, and the warning should go away. Open another bug for this one, I'd say.
Quote:
conversion from pointer to same-sized integral type (potential portability
Not sure where that comes from - could even be the Xt headers. You could always just suppress those with -diag_suppress 3970.
canavan wrote:
It's a linking error, but it's really something that probably has been cought by configure, but isn't handled in svg.c. Just copy the snippet below from render.c over to svg.c, and report that as a bug upstream, since it's a portability issue.

Thank you. With that change it does compile and I did send a notice to the originators.

Beyond that, there are too many other stupidities in this thing for me. Someone who wanted it could work through the problems, I am sure. They aren't show-stoppers but not worth my time ...

Code:
Installing library and netlist files
/bin/ksh ./mkinstalldirs /usr/nekoware/lib/xcircuit-3.8
( cd lib ; for i in xcircps2.pro *.lps *.cir; do \
./install-sh -c -m 644 $i /usr/nekoware/lib/xcircuit-3.8; \
done )
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
/bin/ksh[2]: ./install-sh:  not found
gmake[2]: *** [install-data-local] Error 127
gmake[2]: Leaving directory `/usr/people/sware/xcircuit-3.8.31'
gmake[1]: *** [install-tcl] Error 2
gmake[1]: Leaving directory `/usr/people/sware/xcircuit-3.8.31'
gmake: *** [install-recursive] Error 2
install-sh is part of autoconf and is only used if ginstall isn't already on your system somewhere. Are you running "make install" from the same directory that install-sh is in?
Try pointing configure to your gnu install via INSTALL=/usr/nekoware/bin/install
Mostly I just wanted to throw this in the garbage where it belongs but vishnu : there's an install-sh in the base directory of the code. That is where I ran make and make install.

canavan wrote:
Try pointing configure to your gnu install via INSTALL=/usr/nekoware/bin/install

Tried this, thank you for the hint, got back

Code:
/bin/ksh: /usr/nekoware/bin/install=:  not found
gmake[2]: *** [install-data-local] Error 127
gmake[2]: Leaving directory `/usr/people/sware/xcircuit-3.8.31'
gmake[1]: *** [install-tcl] Error 2
gmake[1]: Leaving directory `/usr/people/sware/xcircuit-3.8.31'
gmake: *** [install-recursive] Error 2

One small step for man, one giant leap for mankind ... I did inform him of the error in svg.c, he said he'd fix that. There's your contribution to humanity for the day, canavan :D

edit: okay, I'm an idiot. A stubborn idiot.

1) I checked my tcl version in swmgr, it said 8.4. But when I did a wish or tclsh <info patchlevel> I got 7.4 Hmm, that's not good. There's an SGI tickletock installed, oops. Got rid of that, made a few new links, does anyone know what "moat" is ? And "sgitcl" ? Whatever they are I don't have them anymore. Hope that's not going to be a problem someday :)

2) Compiled again with fewer warnings. Not sure if that's from a newer version of tickletock or just luck but we'll take what we can get.

2) Tried setenv INSTALL /usr/nekoware/bin/install, no help. (I don't appear to have a /usr/nekoware/bin/install ?) But setting INSTALL to /sbin/install did help. This time it augured in at :

Code:
Installing standard XCircuit library files
gmake  install-data-local
gmake[2]: Entering directory `/usr/people/sware/xcircuit-3.8.32'
Makefile:890: warning: overriding recipe for target `all-recursive'
Makefile:464: warning: ignoring old recipe for target `all-recursive'
Makefile:893: warning: overriding recipe for target `install-recursive'
Makefile:464: warning: ignoring old recipe for target `install-recursive'
sed -e '/LIBDIR/s#LIBDIR#/usr/nekoware/lib#' \
-e "/^LGF/s/^LGF //" \
-e "/^TCL/s/^TCL //" \
-e '/^PYTHON /d' \
-e '/^TCL /d' \
-e '/^LGF /d' \
-e '/^NOINTERP /d' \
lib/xcircuit.1.in > lib/xcircuit.1
Installing app-defaults file
/bin/ksh ./mkinstalldirs /usr/nekoware/lib/xcircuit-3.8/app-defaults
/bin/ksh ./mkinstalldirs /usr/nekoware/lib/xcircuit-3.8/man
/sbin/install -m 644 lib/XCircuit.ad /usr/nekoware/lib/xcircuit-3.8/app-defaults/XCircuit
/sbin/install -m 644 lib/xcircuit.1 /usr/nekoware/lib/xcircuit-3.8/man/xcircuit.1
/sbin/install: can't open xcircuit.1: No such file or directory.
gmake[2]: *** [install-data-local] Error 2
gmake[2]: Leaving directory `/usr/people/sware/xcircuit-3.8.32'
gmake[1]: *** [install-tcl] Error 2
gmake[1]: Leaving directory `/usr/people/sware/xcircuit-3.8.32'
gmake: *** [install-recursive] Error 2

Looks like it croaks when it tries to install a man page that may not exist ?
Hmmmm, the manpage isn't there? Bad download?

You could fake it by creating an empty file (`> lib/xcircuit.1` for example) and keep going from there....
/usr/nekoware/bin/install is in neko_fileutils.sw.eoe
canavan wrote:
/usr/nekoware/bin/install is in neko_fileutils.sw.eoe

Don't have that but ...

First :

Attachment:
proof.jpg
proof.jpg [ 253.4 KiB | Viewed 228 times ]

the little bastard stuck his head out and Blam ! got him right between the eyes ...

It was a lucky shot tho ... I've had plenty of problems with ./configure and even more with <gmake > but <gmake install> has never been a problem. Until now :(

First, that strange thing with install-sh and not being able to find install. Thanks to canavan for the setenv INSTALL /sbin/install tip.

Even then it would hang at

/sbin/install -m 644 lib/xcircuit.1 /usr/nekoware/lib/xcircuit-3.8/man/xcircuit.1

insisting

/sbin/install: can't open xcircuit.1: No such file or directory.

Well, I could see it so I damned well don't understand why install couldn't. In fact, running that command manually from the exact same directory as the same user worked fine. Strange ... so I ended up muddling around in the Makefile. This is what i did

Code:
lib/xcircuit.1: lib/poopoo
sed -e '/LIBDIR/s#LIBDIR#$(libdir)#' \
-e "/^${HAVE_LGF}/s/^${HAVE_LGF} //" \
-e "/^${INTERPRETER}/s/^${INTERPRETER} //" \
-e '/^PYTHON /d' \
-e '/^TCL /d' \
-e '/^LGF /d' \
-e '/^NOINTERP /d' \
lib/xcircuit.1.in > [email protected]

install-data-local: lib/xcircuit.1
@echo "Installing app-defaults file"
$(mkinstalldirs) $(DESTDIR)$(appdefaultsdir)
$(mkinstalldirs) $(DESTDIR)$(appmandir)
$(INSTALL_DATA) lib/XCircuit.ad $(DESTDIR)$(appdefaultsdir)/XCircuit
$(INSTALL_DATA) lib/poopoo $(DESTDIR)$(appmandir)/xcircuit.1

gmake install then created a zero-file-length file "xcircuit.1" in the /lib directory then installed the correct file to /usr/nekoware/xcircuit/and-so-on then went along its merry way to install the rest.

The file xcircuit.1 is now in /usr/nekoware/lib/xcircuit-3.8/man but it doesn't show up in a < man xcircuit > command. That doesn't mean much tho since I may not have made the nekoware man pages work. It's too easy to go look on the Internet :) It's not empty tho, so it seems to have worked.

Damned if I know. If someone can explain this then I'll try to put together a tardist. The earlier one (it's in current, voidfoo made it) crashed a lot. Not his fault, the app was shaky ... hope this version is less so. Canavan, how about an icon or two ? Your stuff always looks so professional :(



edit : hmm. Not a bad program so far. It's more of a drawing program than I thought. Does splines really well. I never really tried the previous version because it core dumped so often. This might be worth a look-see from a professional ...
You should set your MANPATH properly in your ~/.profile (or whatever it is ksh sources).
Code:
MANPATH=/usr/share/catman:/usr/share/man:/usr/catman:/usr/nekoware/man:/usr/freeware/catman:/usr/nekoware/share/man

Obviously, manpages for nekoware packages belong in /usr/nekoware/man, not /usr/nekoware/share/man....
Of course you can change the default installation location (typically /usr/local) by using autoconf's infamous prefix switch: `./configure --prefix=/usr/nekoware` but not all source code packages honor this feature (xscreensaver for example) and also if you use this feature to have `make install` put stuff where it's easily extractable for the creation of an installation controlled tardist, i.e. `mkdir /tmp/emptydir && ./configure --prefix=/tmp/emptydir` some software packages keep track of the prefix and don't work right when they're moved elsewhere (to /usr/nekoware, or wherever)...
Another update in an endless series of updates ... but at least there's a lesson here : any dork can make tardists if they are stubborn enough :)

I followed canavan's suggestion and got the gnu file utilities. Actually, I pulled the source out of the tardist and just put the < ginstall > executable into /usr/nekoware/bin. Then I put setenv INSTALL ginstall into my compile-terminal environment settings. The whole mess then went smoothly.

So, lesson learned : if you have trouble doing make install, try using ginstall instead. It matches gmake better than the stock Irix install.

However ... I myself am not willing to trust gnu install for other duties. I'd bet my left gonad that they didn't do any testing on Irix, so who knows what could happen in other situations. Works for make install so that's where it will stay (here at least.)


Back to xcircuit, it's pretty interesting. The author is very responsive, has already made a couple fixes, and the program itself no longer core dumps. It's worth a look, has several drawing features that might be worthwhile even for use as a general line-drawing program.

I'll try to make a tardist one of these days unless someone skillful who is good with icons and file typing rules beats me to it :P

canavan wrote:
You should set your MANPATH properly in your ~/.profile (or whatever it is ksh sources).
Code:
MANPATH=/usr/share/catman:/usr/share/man:/usr/catman:/usr/nekoware/man:/usr/freeware/catman:/usr/nekoware/share/man

Obviously, manpages for nekoware packages belong in /usr/nekoware/man, not /usr/nekoware/share/man....

Ha ! Another little detail. Actually my manpath was fine but the installer put the manpage into /usr/nekoware/lib/xcircuit/man/ rather than where it needed to be. Easily fixed. Grazie beaucoup !



edit : Okay, everything runs now, even figured out where to put font settings and screen colors (they're in a tickletock script, not the .xcircuitrc and .Xdefaults files.) Only one little hangup before tardistting :

Anyone got a moment to give a short tutorial on how to automatically create a couple of links ? Post-install script ? I have no clue ... the program needs a link from tclsh4.8 to tclsh and another from wish4.8 to wish . One could leave instructions in the release files but I suspect no one ever reads those.

And oh yeah ... what's the best thing to do with the SGI version of tcl ? Ditch it, leave it there, pop up a big banner that tells people they better make up their own minds and do whatever themselves ??