home *** CD-ROM | disk | FTP | other *** search
- Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!usc!elroy.jpl.nasa.gov!ames!sgi!fido.asd.sgi.com!holodeck.csd.sgi.com!aschaffe
- From: aschaffe@holodeck.csd.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_742714517@fido.asd.sgi.com>
- Followup-To: comp.sys.sgi.misc
- Date: 15 Jul 1993 07:00:58 GMT
- Organization: Silicon Graphics, Inc., Mountain View, CA
- Lines: 525
- Approved: news-answers-request@MIT.Edu
- Expires: 13 Aug 1993 07:01:01 GMT
- Message-ID: <apps_742719661@fido.asd.sgi.com>
- References: <misc_742719661@fido.asd.sgi.com>
- Reply-To: sgi-faq@archone.tamu.edu
- NNTP-Posting-Host: holodeck.csd.sgi.com
- Originator: aschaffe@holodeck.csd.sgi.com
- Xref: senator-bedfellow.mit.edu comp.sys.sgi.misc:3348 comp.sys.sgi.admin:2208 comp.sys.sgi.apps:1070 comp.sys.sgi.bugs:1109 comp.sys.sgi.graphics:1592 comp.sys.sgi.hardware:1774 comp.answers:1308 news.answers:10355
-
-
- 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- What about Explorer?
- ! -4- How can I make the 'install' program work like BSD 'install'?
- + -5- How can I convert ASCII to PostScript?
- ! -6- How can I preview PostScript?
- -7- How can I edit PostScript files?
- -8- How can I format unformatted manpages?
- ! -9- Why can't I compile application X?
- ! -10- Why does GNU Emacs not compile, or compile but not run?
- -11- Why doesn't Xarchie 1.3 work?
- + -12- What are the correct versions of the Irix Development Option (IDO)
- for current versions of IRIX?
- ! -13- What do I need to do to build gcc/g++?
- -14- Can I use dynamic shared libraries in IRIX?
- -15- How can I make Fortran load entirely from a library?
- -16- How can I make my 4.0.x Fortran program read binary data files
- written by a 3.3.x Fortran program?
- -17- 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 GNU Emacs 19 with better X-windows support (than
- GNU Emacs 18). It may be found at labrea.stanford.edu in /pub/gnu/lucid.
-
- 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- 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: ! -4- 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: + -5- 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: ! -6- 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: -7- 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: -8- 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: ! -9- Why can't I compile application X?
- Date: 13 Jun 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).
-
- - If you run NIS (aka Yellow Pages), programs which access files served by NIS
- need to be linked 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.
-
- ------------------------------
-
- Subject: ! -10- Why does GNU Emacs not compile, or compile but not run?
- Date: 14 Jun 93 00:00:01 EST
-
- Emacs 18.59 is the last release of Emacs version 18, and 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 same 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.
-
- Emacs 19.13 is the most recent release of Emacs version 19. The following
- patch, from Thomas Eberhardt <thomas@mathematik.uni-bremen.de>, fixes a
- problem with setpgrp wihich breaks subprocess calling:
-
- ---- cut here ---------- cut here ---------- cut here ---------- cut here ----
- *** callproc.c- Tue May 25 08:38:06 1993
- --- callproc.c Tue Jun 8 21:40:50 1993
- ***************
- *** 520,526 ****
- --- 520,528 ----
- close (err);
-
- #ifdef USG
- + #ifndef IRIX /* This would kill the controlling tty set up in create_process */
- setpgrp (); /* No arguments but equivalent in this case */
- + #endif
- #else
- setpgrp (pid, pid);
- #endif /* USG */
- ---- cut here ---------- cut here ---------- cut here ---------- cut here ----
-
- 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 version 19 is not yet known to
- work under IRIX 5.0.
-
- ------------------------------
-
- Subject: -11- Why doesn't Xarchie 1.3 work?
- Date: 07 May 93 00:00:01 EST
-
- The app-defaults file supplied with Xarchie 1.3 used fonts which did not exist
- on some versions of IRIX, resulting in invisible text and sometimes program
- lockups. You can either replace the "fixed" and "fixed*bold" fonts with
- "screen13" and "screen-bold13" everywhere they appear in the Xarchie.ad file,
- or better yet upgrade to Xarchie 2.0, in which this problem has been fixed.
- The current version of Xarchie can be found on export.lcs.mit.edu in the
- contrib directory.
-
- ------------------------------
-
- Subject: + -12- What are the correct versions of the Irix Development Option (IDO)
- for current versions of IRIX?
- Date: 13 Jun 93 00:00:01 EST
-
- IDO 4.1.1, which includes the 3.10.1 back-end, is the most recent version of
- IDO suitable for IRIX 4.0.5x. Earlier versions compatible with IRIX 4.0.5x
- include IDO 4.0.1, which includes the 2.40 back-end, and IDO 4.1, which
- includes the 3.10 back-end. IRIX 5.0 requires IDO 5.0.
-
- ------------------------------
-
- Subject: ! -13- 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: -14- Can I use dynamic shared libraries in IRIX?
- Date: 07 May 93 00:00:01 EST
-
- IRIX 5.0 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: -15- 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: -16- 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: -17- 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
- aschaffe@sgi.com
- --
- Allan Schaffer
- aschaffe@sgi.com
-