Article View: comp.sys.sgi.misc
Article #128SGI apps Frequently Asked Questions (FAQ)
From: Allan Schaffer
Date: Wed, 06 Oct 1993 10:46
Date: Wed, 06 Oct 1993 10:46
545 lines
22927 bytes
22927 bytes
Archive-name: sgi/faq/apps
SGI apps Frequently Asked Questions (FAQ)
This information is freely distributable and wide circulation is encouraged.
The contents are accurate as far as we know, but the usual disclaimers apply.
This FAQ contains errors! Finding them is an exercise for alert readers.
Please send additions and changes to sgi-faq@archone.tamu.edu.
This FAQ is one of the SGI FAQ series, which consists of:
SGI Admin FAQ - IRIX System Administration
SGI Apps FAQ - Applications & Compilers
SGI Graphics FAQ - Graphics & Windowing
SGI Hardware FAQ - Hardware issues
SGI Misc FAQ - Introduction & Miscellaneous Information
Each FAQ is posted to each comp.sys.sgi.* group as well as the news.answers
and comp.answers newsgroups (whose purpose is to store FAQs) every two weeks.
If you can't find one of the FAQs with your news program, you can get it by
anonymous FTP from one of these sites:
rtfm.mit.edu:pub/usenet/news.answers/sgi/faq/apps
rtfm.mit.edu:pub/usenet/comp.sys.sgi.misc/SGI_apps_Frequently_Asked_Questions
archone.tamu.edu:ftp/pub/sgi/faq/apps
rtfm.mit.edu:pub/usenet/comp.answers/sgi/faq/apps
Note that rtfm.mit.edu is home to many other FAQs and informational documents,
and is a good place to look if you can't find an answer here.
Topics covered in this FAQ:
--------------------------
-1- How can I quickly find the question I want in this FAQ?
-2- What's a good graphic text editor for SGIs?
-3- How can I convert ASCII to PostScript?
-4- How can I preview PostScript?
-5- How can I edit PostScript files?
-6- How can I format unformatted manpages?
-7- What about Explorer?
+ -8- Why isn't Iris Insight working properly?
+ -9- Why don't the arrow keys work in vi?
! -10- What are the correct versions of the Irix Development Option (IDO)
for current versions of IRIX?
! -11- Why can't I compile application X?
! -12- Why doesn't application X understand NIS?
+ -13- Where's ranlib?
-14- How can I make the 'install' program work like BSD 'install'?
! -15- Why does GNU Emacs not compile, or compile but not run?
-16- What do I need to do to build gcc/g++?
-17- Can I use dynamic shared libraries in IRIX?
-18- How can I make Fortran load entirely from a library?
-19- How can I make my 4.0.x Fortran program read binary data files
written by a 3.3.x Fortran program?
-20- Credits
----------------------------------------------------------------------
Subject: -1- How can I quickly find the question I want in this FAQ?
Date: 27 May 93 00:00:01 EST
- This FAQ follows the RFC1153 recommendations for message digests and thus
can be viewed easily with newsreaders that understand message digests.
- Each question has a Subject: line, so you can easily step through the answers
with rn's ^G command.
- Each question is marked with a "dash number dash" so that you can find any
answer with a simple search pattern.
- Questions marked with a '+' are new this posting; those marked with a '!'
have significant new content since the last edition.
------------------------------
Subject: -2- What's a good graphic text editor for SGIs?
Date: 13 Jun 93 00:00:01 EST
The most popular graphic text editors on SGIs include:
zip (by Tom Davis of SGI) is something like jot but is orders of magnitude
faster and laden with nifty features. It doesn't run well remotely or at all on
X-terminals, text terminals or non-SGI machines, but if most of your editing
will be at an SGI console, read no further! FTP to ftp.sgi.com and look in
/graphics/zip.
GNU Emacs, a perennial favorite, isn't just an editor; it's a way of life. It
has a X-windows mode and works on X-windows terminals as well as SGI consoles
and text terminals. Its X-windows support, once rather lackluster, has improved
in the recently released version 19. It may be FTPed from any GNU archive.
Epoch is a derivative of GNU Emacs 18 with better X-windows support. It may be
found at cs.uiuc.edu in /pub/epoch-files/epoch.
Lucid Emacs is a derivative of an early version of GNU Emacs 19. It may be
found at lucid.com in /pub/lemacs. It requires graphics.
Finally, the comp.windows.x FAQ (found at rtfm.mit.edu in
/pub/usenet/comp.windows.x) lists many more editors which run under X-windows,
both free and commercial.
------------------------------
Subject: -3- How can I convert ASCII to PostScript?
Date: 13 Jun 93 00:00:01 EST
- IRIX 4.0.x includes 'lptops', which, because it's called indirectly from
'lp', isn't as well known as it ought to be. Read the 'lptops' and
'gpsinterface' manpages.
- Adobe Transcript, which includes 'enscript' (something like 'lptops') and
'psroff' (nroff/troff-to-PostScript) is available at extra cost from SGI.
Most people manage without it.
- Popular free converters include 'a2ps' (at imag.fr in
/pub/archives/postscript), 'lwf' (in volume 15 of comp.sources.unix) and
'psf' (in volume 35 of comp.sources.misc). The comp.lang.postscript FAQ (at
rtfm.mit.edu in /pub/usenet/comp.lang.postscript) has a much longer list of
such programs, unfortunately no longer including reviews or FTP sites.
------------------------------
Subject: -4- How can I preview PostScript?
Date: 07 May 93 00:00:01 EST
Display Postscript (DPS), which includes the 'xpsview' PostScript previewer,
is an extra-cost option from SGI. Happily, Robert Keller of SGI
<rck@fangio.asd.sgi.com> has made available GNU's GhostScript previewer,
compiled *and* in SGI 'inst' installable form. FTP it from ftp.sgi.com in
/sgi/ghost.
------------------------------
Subject: -5- How can I edit PostScript files?
Date: 07 May 93 00:00:01 EST
Ivan Bach <ib@sgi.com> collected some testimonials from a number of SGIers:
- Adobe Illustrator and Corel Draw can edit PS files of type AI (a simplified
version of PS that facilitates editing).
- If you have DPS extensions on your server and a DPS compile time
environment you can do this quite well with xfig. Check out the version on
crocus.medicine.rochester.edu.
- The InterViews tool `idraw' allows manipulation of EPS (Encapsulated
PostScript) files, and has a `mac-type' interface.
- Island Draw 3.0 has an option to import Postscript, and it seems to accept
arbitrary Postscript. I have fed it single page Postcript files from
Illustrator, Corel, Ventura, Designer, Eroff, and hand-coded files, and it
made Island Draw objects out of them. The file initially opens as one
grouped object, but if you ungroup, you get editible objects. I was quite
impressed. I don't doubt there are ways to fool the interpreter, but it
works for output from drawing and publishing packages, which is what I need
it for.
------------------------------
Subject: -6- How can I format unformatted manpages?
Date: 07 May 93 00:00:01 EST
SGI provides manpages in formatted form, and does not therefore need to provide
us all with the formatting software. Most FTPable software, however, comes with
unformatted manpages.
Manpages are most often formatted with Documenter's Workbench (DWB), which SGI
has had to license separately from USL and we have to buy separately from SGI.
SGI's DWB is based on version 2.1; the current version from USL is 3.3.
Public domain alternatives to DWB include 'groff' and 'awf':
'groff' is by the Free Software Foundation and can be had from any GNU
archive. Compilers beware: it must be compiled with g++ (or another C++
compiler?). However, there are compiled binaries on cb-iris.stanford.edu.
David Hinds <dhinds@allegro.stanford.edu> gives this advice for installing
groff so that it can format manpages on the fly:
Create a script called 'eqn':
> #!/bin/sh
> if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
> geqn $*
and a script called 'neqn':
> #!/bin/sh
> if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
> geqn -Tascii $*
and do:
> ln -s gnroff nroff
and edit the end of the gnroff script to be:
> rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
> exec groff -Wall -mtty-char $T $opts $rest
To get PostScript output from 'man -t', you also need to create a 'psroff'
script similar to 'nroff'. Here are the context diffs:
*** /usr/local/bin/nroff Sat Feb 13 15:51:09 1993
--- /usr/local/bin/psroff Sat Feb 13 17:45:46 1993
***************
*** 1,8 ****
#!/bin/sh
! # Emulate nroff with groff.
prog="$0"
! T=-Tascii
opts=
for i
--- 1,8 ----
#!/bin/sh
! # Emulate psroff with groff.
prog="$0"
! T=-Tps
opts=
for i
***************
*** 25,30 ****
--- 25,33 ----
-Tascii|-Tlatin1)
T=$1
;;
+ -t)
+ # ignore -- default is send to stdout
+ ;;
-T*)
# ignore other devices
;;
***************
*** 49,53 ****
rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
! exec groff -Wall -mtty-char $T $opts $rest
--- 52,56 ----
rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
# This shell script is intended for use with man, so warnings are
! # probably not wanted.
! exec groff -Wall $T $opts $rest
The binaries on cb-iris.stanford.edu have these changes already made.
Henry Spencer's awf ("Amazingly Workable Formatter") is written in 'awk',
which we all have, and does a pretty good job, considering. It can be FTPed
from fresnel.stanford.edu in /pub/4D.
------------------------------
Subject: -7- What about Explorer?
Date: 07 May 93 00:00:01 EST
The IRIS Explorer data visualization system has its own newsgroup,
comp.graphics.explorer. There is an FAQ, which can be found, along with many
other Explorer goodies, at swedishchef.lerc.nasa.gov in the explorer directory.
------------------------------
Subject: + -8- Why isn't Iris Insight working properly?
Date: 16 Sep 93 00:00:01 EST
Iris Insight 2.0 (which came on a CD included in the July/August Pipeline)
uses a different format in the .insightrc file in your home directory. If
there is an .insightrc left over from an older version when you run Insight
2.0, it may emit error messages or not work in various ways. Just delete the
old .insightrc and restart Insight.
------------------------------
Subject: + -9- Why don't the arrow keys work in vi?
Date: 16 Sep 93 00:00:01 EST
Arrow key sequences are more than one character, and vi can misinterpret
them as multiple single-character commands on slow connections. Increase
vi's patience by putting the command 'set timeout=400' (or a larger or
smaller number to your taste) in the file ~/.exrc or the EXINIT envariable.
See also the ex(1) and vi(1) manpages.
------------------------------
Subject: ! -10- What are the correct versions of the Irix Development Option (IDO)
for current versions of IRIX?
Date: 16 Sep 93 00:00:01 EST
IDO 4.1.1 is the most recent version which is compatible with IRIX 4.0.x.
It includes C 3.10.1 and the 3.12 back-end (the part of the compiler
which actually produces the executable; 3.12 is the number you see when
you use the 'file' command on an executable). IDO 4.1 (C 3.10 and the 3.10
back-end) was buggy; upgrade to 4.1.1 ASAP. IDO 4.0.1 (with the 2.40
back-end) was the last stable release before IDO 4.1.x and is acceptable.
IRIX 5.x require IDO 5.x.
------------------------------
Subject: ! -11- Why can't I compile application X?
Date: 16 Sep 93 00:00:01 EST
Plenty of reasons, but here are some of the most common:
- SGI's C compiler is ANSI C by default in IRIX 4.0.x. Use the '-cckr' option
to compile K&R C. You can do this most easily by setting the environment
variable SGI_CC to "-cckr" or by editing the application's Makefile, often
by adding "-cckr" to the CFLAGS variable.
- A related problem is that Makefiles generated by 'imake' most often use
'cc -cckr -prototypes'; missing or incorrect prototypes usually just generate
pages of warnings but may cause an unrecoverable error. This can often be
worked around by removing "-prototypes" from the line where it appears in
the Makefile (not the Imakefile).
- You may be running into one of the many popular bugs in IDO 4.1. See the
previous question.
------------------------------
Subject: ! -12- Why doesn't application X understand NIS?
Date: 13 Jun 93 00:00:01 EST
If you run NIS (aka Yellow Pages), you to link programs which access files
served by NIS with -lsun. The functions in libc.a which deal with these files
are not NIS-aware; the NIS versions are in libsun.a. Using libsun.a usually
means adding '-lsun' to the variable LIBS or LDFLAGS in one's Makefile.
This is only true for IRIX 4.0.x; IRIX 5.x's libc.a is NIS-aware.
------------------------------
Subject: + -13- Where's ranlib?
Date: 16 Sep 93 00:00:01 EST
IRIX doesn't need it. Read the description of the 's' option in the 'ar'
manpage. When the Makefile for a program you're porting wants ranlib,
substitute 'true' or put a little shell script in your PATH to fake it.
------------------------------
Subject: -14- How can I make the 'install' program work like BSD 'install'?
Date: 16 Jun 93 00:00:01 EST
The BSD and System V versions of the 'install' command are incompatible; the
BSD version is most often used by Makefiles. IRIX provides both the System V
version (/etc/install) and the BSD version (/usr/bin/X11/bsdinst.sh). SGI's
'imake' defines INSTALL as /usr/bin/X11/bsdinst.sh, and the Install* rules
use that definition, so Imakefile-generated Makefiles will use the BSD version.
Michael Joosten <joost@ori.cadlab.de> points out that you can also use GNU
install (available from any GNU archive), which emulates the BSD version.
Unlike /usr/bin/X11/bsdinst.sh, it has a manpage.
------------------------------
Subject: ! -15- Why does GNU Emacs not compile, or compile but not run?
Date: 16 Sep 93 00:00:01 EST
Emacs 18.59 is the last release of Emacs version 18. It builds and runs
correctly under IRIX 4.0.x. Some earlier versions failed to compile (because
cc now needs -cckr for K&R C compatibility) or failed to run when stripped
(because of object file format changes). For the latter reasion, the file
unexmips.c in some versions of Epoch and Lucid Emacs should be replaced with
the same-named file from the GNU Emacs 18.59 distribution.
Karsten Kuenne <kuenne@desy.de> has patched Emacs 18.59 to work with IRIX
5.0's new object file format. The patches are at ftp.desy.de in
/pub/gnu/emacs/emacs-irix5.0-patches.
Emacs 19.19 is the most recent release of Emacs version 19; it builds and
runs correctly under IRIX 4.0.x and 5.x with recent compilers (IDO 4.1.1 or
newer). The configure script is usually able to guess what machine and OS
it's running on, but check etc/MACHINES just in case, and note that
src/s/irix5-0.h isn't in etc/MACHINES.
Emacs 19.19 doesn't build under IDO 4.0.1; try 19.16.
------------------------------
Subject: -16- What do I need to do to build gcc/g++?
Date: 16 Jun 93 00:00:01 EST
Before you start, remember that you need the headers and runtime libraries from
SGI's extra-cost development option both to compile and use gcc. (glibc does
not yet work on SGIs.) Of course if you buy the development option you'll get
SGI's compiler anyway; this is comp.sys.sgi.*'s most popular Catch-22.
Don't forget to install the dev.cmplrs_hdr.internal subsystem, which contains
needed headers and is not installed by default. You'll also need some way to
read the manpages (see above) and up to 80Mb of free disk space. You can manage
with as little as 50Mb by compiling without "-g", stripping binaries and
pruning after each build stage.
First, FTP, unzip and untar gcc-2.4.x.tar.gz and libg++-2.3.x.tar.gz from
aeneas.mit.edu in /pub/gnu. (You'll need 'gunzip', described in the README in
the same directory.) The current versions at this writing are gcc 2.4.3.1 (!)
and libg++ 2.3.1. If you're starting over from a failed build, do 'make
distclean' to get rid of previous botches. Read the INSTALL document and follow
the directions.
Michael Joosten <joost@ori.cadlab.de> provides these specifics for gcc-2.4.3:
Run 'configure mips-sgi-irix4loser' instead of mips-sgi-irix4, that allegedly
fixes some bugs with the assembler's instruction reordering (see the INSTALL
file for some more details). You can use mips-sgi-irix4 if you already have the
GNU assambler, 'gas'. Start with [g]make LANGUAGES=c for the first run. Since
2.4.0, fixincludes is run automatically now. Then '[g]make stage1', [g]make
CC="stage1/xgcc -Bstage1/" CFLAGS=-O LANGUAGES="c c++ proto" and repeat that
for stage2. Some hours later 8-) you can run '[g]make compare' to check if the
objects of stage2 and the last make doesn't differ. Finally, you can install it
all with [g]make <all previous flags> install'. READ the INSTALL file if you
are unsure: IRIX is mentioned with other MIPS machines near the end!
Now to libg++-2.3.1. Run 'configure mips-sgi-irix4 [-srcdir=] [-prefix=]'. To
build it without debugging symbols, enter '[g]make CFLAGS=-O CC=gcc CXXFLAGS=-O
LDFLAGS='. If you haven't installed gcc yet, you must give a 'CXX=....', too.
This should take 30-45 minutes. If you are still brave, you can then make all
tests, but be warned! This will make every subdirectory of libg++/etc, too, and
it takes lots of space: without debugging I needed ca 20MB! Furthermore you
need two patches for libg++-2.3.1, that fixes problems in libg++/etc/trie-gen:
===8<=== snip ===8<===
*** Makefile.in- Wed Jun 16 13:46:41 1993
--- Makefile.in Wed Jun 16 13:46:57 1993
***************
*** 101,111 ****
out.cc: trie-gen
@echo "Generating a compacted minimal-prefix trie for files in /bin"
! /bin/ls -1 /bin | ./trie-gen -c > out.cc
check: out.o test.o
$(CXX) out.o test.o $(LIBS)
! /bin/ls -1 /bin | ./a.out -v
run_tests: check
--- 101,111 ----
out.cc: trie-gen
@echo "Generating a compacted minimal-prefix trie for files in /bin"
! /bin/ls /bin | ./trie-gen -c > out.cc
check: out.o test.o
$(CXX) out.o test.o $(LIBS)
! /bin/ls /bin | ./a.out -v
run_tests: check
*** compact.cc- Wed Jun 16 14:00:39 1993
--- compact.cc Wed Jun 16 14:01:02 1993
***************
*** 332,338 ****
;
printf ("\n};\n\nstatic const %s yy_next[%d] = \n{\n ",
! max_number < MAX_SIGNED_CHAR ? "char" : max_number < MAX_SIGNED_SHORT ? "short" : "int",
compressed_len + 1);
for (i = 0; i <= compressed_len; )
--- 332,338 ----
;
printf ("\n};\n\nstatic const %s yy_next[%d] = \n{\n ",
! max_number < MAX_SIGNED_CHAR ? "signed char" : max_number < MAX_SIGNED_SHORT ? "short" : "int",
compressed_len + 1);
for (i = 0; i <= compressed_len; )
===8<=== snip ===8<===
Note that gcc 2.4.x, unlike gcc 2.3.x, can be compiled with optimization, and
has a 'fixincludes' which works properly.
All of the above applies to IRIX 4.0.x; gcc is not known to deal with 5.x.
------------------------------
Subject: -17- Can I use dynamic shared libraries in IRIX?
Date: 07 May 93 00:00:01 EST
IRIX 5.x supports SVR4-style dynamic shared libraries. IRIX 4.0.x does not,
but Jack Jansen <jack@cwi.nl> has written a package to do it anyway. Get the
file /pub/dl-1.3.tar.Z from ftp.cwi.nl by anonymous FTP.
------------------------------
Subject: -18- How can I make Fortran load entirely from a library?
Date: 07 May 93 00:00:01 EST
Bron Nelson <bron@sgi.com> writes:
> Is there any way to tell f77 to load entirely from a library? When using ld
> for C, it is possible to use -u symname to force the loader to start its
> work. This makes it possible to load entirely from a library.
The same trick works for Fortran, but (like all things Fortranish) you have to
do a little dance to make things work out.
The trouble is that the Fortran compiler has an "-u" option, so you have to
arrange to pass the "-u symname" option directly to the loader, by-passing the
Fortran front end.
Try adding the incantation "-Wl,-u,MAIN__" to the link line. e.g.:
f77 -Wl,-u,MAIN__ -o myprog myprog.a
The "-W" option is described in the man page.
------------------------------
Subject: -19- How can I make my 4.0.x Fortran program read binary data files
written by a 3.3.x Fortran program?
Date: 07 May 93 00:00:01 EST
You must compile your program with the -old_rl flag (described in the f77
manpage) _and_ open the file with the option "form='unformatted'", for example:
open(1, file='filename', access='direct', recl=1, form='unformatted')
------------------------------
Subject: -20- Credits
Date: 6 May 93 00:00:01 EST
The comp.sys.sgi FAQs are the collective effort of
Dale Chayes dale@ldeo.columbia.edu
Steve Rikli steve@archone.tamu.edu
Allan Schaffer aschaffe@sgi.com
Dave Schweisguth dcs@neutron.chem.yale.edu
Special thanks are due to
Tom Davis Author of 'zip'
Harry Mangalam Maintainer of the comp.sys.sgi.* WAIS database
Finally, much thanks to all of the SGI employees on Usenet, all of whom have
provided gigabytes of help and information.
Credits for individual contributions are given in the answers.
------------------------------
--
Allan Schaffer
Silicon Graphics
aschaffe@sgi.com
--
Allan Schaffer
Silicon Graphics
aschaffe@sgi.com
Technical Details
Message-ID:
<apps_749904390@holodeck.asd.sgi.com>Path:
arc1-ca.pugleaf.net!senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.kei.com!sol.ctr.columbia.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!sgiblab!sgigate!odin!fido.asd.sgi.com!holodeck.asd.sgi.com!aschaffeReferences:
<admin_749904390@holodeck.asd.sgi.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.kei.com!sol.ctr.columbia.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!sgiblab!sgigate!odin!fido.asd.sgi.com!holodeck.asd.sgi.com!aschaffe From: aschaffe@holodeck.asd.sgi.com (Allan Schaffer) Newsgroups: comp.sys.sgi.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.bugs,comp.sys.sgi.graphics,comp.sys.sgi.hardware,comp.answers,news.answers Subject: SGI apps Frequently Asked Questions (FAQ) Supersedes: <apps_749904092@holodeck.asd.sgi.com> Followup-To: comp.sys.sgi.misc Date: 6 Oct 1993 10:46:36 GMT Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 545 Approved: news-answers-request@MIT.Edu Message-ID: <apps_749904390@holodeck.asd.sgi.com> References: <admin_749904390@holodeck.asd.sgi.com> Reply-To: sgi-faq@archone.tamu.edu NNTP-Posting-Host: holodeck.asd.sgi.com Originator: aschaffe@holodeck.asd.sgi.com