home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-11-03 | 68.5 KB | 1,882 lines |
- Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!portc01.blue.aol.com!newsfeed.skycache.com!Cidera!nntp-out.teleweb.pt!news.teleweb.pt!not-for-mail
- From: bofh@mail.teleweb.pt
- Newsgroups: comp.unix.aix,comp.answers,news.answers
- Subject: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
- Supersedes: <aix-faq-4-973024721@mail.teleweb.pt>
- Followup-To: comp.unix.aix
- Date: 2 Nov 2000 15:53:10 +0100
- Organization: What ?
- Lines: 1858
- Approved: news-answers-request@mit.edu
- Distribution: world
- Expires: 07 Dec 2000 15:25:21
- Message-ID: <aix-faq-4-973175121@mail.teleweb.pt>
- References: <aix-faq-1-973175121@mail.teleweb.pt>
- Reply-To: bofh@mail.teleweb.pt (Jose Pina Coelho)
- NNTP-Posting-Host: p140a55.teleweb.pt
- X-Trace: srvlis16.teleweb.pt 973177342 1432 212.16.140.55 (2 Nov 2000 15:02:22 GMT)
- X-Complaints-To: abuse@teleweb.pt
- NNTP-Posting-Date: 2 Nov 2000 15:02:22 GMT
- Summary: This posting contains AIX Frequently Asked Questions
- and their answers. AIX is IBM's version of Unix.
- Keywords: AIX RS/6000 questions answers
- Xref: senator-bedfellow.mit.edu comp.unix.aix:191693 comp.answers:42949 news.answers:195011
-
- Posted-By: auto-faq 3.3 (Perl 5.005)
- Archive-name: aix-faq/part4
- Revision: 1.14 2000/01/04 02:34:26
- Posting-Frequency: monthly
-
- ------------------------------
-
- Subject: 2.05: How do I make my own shared library?
-
- To make your own shared object or library of shared objects, you should
- know that a shared object cannot have undefined symbols. Thus, if your
- code uses any externals from /lib/libc.a, the latter MUST be linked with
- your code to make a shared object. Mike Heath (mike@pencom.com) said it
- is possible to split code into more than one shared object when externals
- in one object refer to another one. You must be very good at
- import/export files. Perhaps he or someone can provide an example.
-
- Assume you have one file, sub1.c, containing a routine with no external
- references, and another one, sub2.c, calling stuff in /lib/libc.a. You
- will also need two export files, sub1.exp, sub2.exp. Read the example
- below together with the examples on the ld man page.
-
- ---- sub1.c ----
- int addint(int a, int b)
- {
- return a + b;
- }
- ---- sub2.c ----
- #include <stdio.h>
-
- void printint(int a)
- {
- printf("The integer is: %d\n", a);
- }
- ---- sub1.exp ----
- #!
- addint
- ---- sub2.exp ----
- #!
- printint
- ---- usesub.c ----
- main()
- {
- printint( addint(5,8) );
- }
-
- The following commands will build your libshr.a, and compile/link the
- program usesub to use it.
-
- $ cc -c sub1.c
- $ cc -bM:SRE -bnoentry -bE:sub1.exp -o sub1shr.o sub1.o
- $ cc -c sub2.c
- $ cc -bM:SRE -bnoentry -bE:sub2.exp -o sub2shr.o sub2.o
- $ ar r libshr.a sub1shr.o sub2shr.o
- $ cc -o usesub usesub.c -L: libshr.a
- $ usesub
- The integer is: 13
- $
-
- A similar example can be found in the AIX manual online on the web at:
-
- <http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/create_shared_lib.htm>
-
- ------------------------------
-
- Subject: 2.06: Linking my program fails with strange errors. Why?
-
- Very simple, the linker (actually called the binder), cannot get the
- memory it needs, either because your ulimits are too low or because you
- don't have sufficient paging space. Since the linker is quite different
- >from normal Unix linkers and actually does much more than these, it also
- uses a lot of virtual memory. It is not unusual to need 10000 pages (of
- 4k) or more to execute a fairly complex linking.
-
- If you get 'BUMP error', either ulimits or paging is too low, if you get
- 'Binder killed by signal 9' your paging is too low.
-
- First, check your memory and data ulimits; in korn shell 'ulimit -a' will
- show all limits and 'ulimit -m 99999' and 'ulimit -d 99999' will
- increase the maximum memory and data respectively to some high values.
- If this was not your problem, you don't have enough paging space.
-
- If you will or can not increase your paging space, you could try this:
-
- - Do you duplicate libraries on the ld command line? That is never
- necessary.
-
- - Do more users link simultaneously? Try having only one linking going
- on at any time.
-
- - Do a partwise linking, i.e. you link some objects/libraries with the
- -r option to allow the temporary output to have unresolved references,
- then link with the rest of your objects/libraries. This can be split
- up as much as you want, and will make each step use less virtual memory.
-
- If you follow this scheme, only adding one object or archive at a
- time, you will actually emulate the behavior of other Unix linkers.
-
- If you decide to add more paging space, you should consider adding a new
- paging space on a second hard disk, as opposed to just increasing the
- existing one. Doing the latter could make you run out of free space on
- your first harddisk. It is more involved to shrink a paging space
- but easier to delete one.
-
- ------------------------------
-
- Subject: 2.07: Why does it take so long to compile "hello world" with xlc?
-
- Some systems have experienced delays of more than 60 seconds in
- compiling "#include <stdio.h> int main () {printf ("Hello world");}"
- The problem is with the license manager contact IBM to make sure
- you've got the latest PTF.
-
- ------------------------------
-
- Subject: 2.08: What's with malloc()?
-
- malloc() uses a late allocation algorithm based on 4.3 BSD's malloc()
- for speed. This lets you allocate very large sparse memory spaces,
- since the pages are not actually allocated until they are touched for
- the first time. Unfortunately, it doesn't die gracefully in the face of
- loss of available memory. See the "Paging Space Overview" under
- InfoExplorer, and see the notes on the linker in this document for an
- example of an ungraceful death.
-
- If you want your program to get notified when running out of memory, you
- should handle the SIGDANGER signal. The default is to ignore it.
- SIGDANGER is sent to all processes when paging space gets low, and if
- paging space gets even lower, processes with the highest paging space
- usage are sent the SIGKILL signal.
-
- malloc() is substantially different in 3.2, allocating memory more
- tightly. If you have problems running re-compiled programs on 3.2,
- try running them with MALLOCTYPE=3.1.
-
- Early Page Space Allocation (EPSA) added to AIX 3.2: see
- /usr/lpp/bos/README.PSALLOC - IX38211 / U422496 Allows setting of
- early allocation (vs. default late allocation) on a per-process basis.
-
- ------------------------------
-
- Subject: 2.09: Why does xlc complain about 'extern char *strcpy()'
-
- The header <string.h> has a strcpy macro that expands strcpy(x,y) to
- __strcpy(x,y), and the latter is then used by the compiler to generate
- inline code for strcpy. Because of the macro, your extern declaration
- contains an invalid macro expansion. The real cure is to remove your
- extern declaration but adding -U__STR__ to your xlc will also do the
- trick, although your program might run a bit more slowly as the compiler
- cannot inline the string functions any more.
-
- ------------------------------
-
- Subject: 2.10: Why do I get 'Parameter list cannot contain fewer ....'
-
- This is the same as above (2.9).
-
- ------------------------------
-
- Subject: 2.11: Why does xlc complain about
- '(sometype *)somepointer = something'
-
- Software that is developed using gcc may have this construct. However,
- standard C does not permit casts to be lvalues, so you will need to
- change the cast and move it to the right side of the assignment. If you
- compile with 'cc', removing the cast completely will give you a warning,
- 'xlc' will give you an error (provided somepointer and something are of
- different types - but else, why would the cast be there in the first place?)
-
- ------------------------------
-
- Subject: 2.12: Some more common errors
-
- Here are a few other common errors with xlc:
-
- 305 | switch((((np)->navigation_type) ? (*((np)->navigation_type)) :
- ((void *)0)))
- .a...........
- a - 1506-226: (S) The second and third operands of the conditional
- operator must be of the same type.
-
- The reason for this is that xlc defines NULL as (void *)0, and it does
- not allow two different types as the second and third operand of ?:.
- The second argument above is not a pointer and the code used NULL
- incorrectly as a scalar. NULL is a nil pointer constant in ANSI C and
- in some traditional compilers.
-
- You should change NULL in the third argument above to an integer 0.
-
-
- ------------------------------
-
- Subject: 2.13: Can the compiler generate assembler code?
-
- Starting with version 1.3 of xlc and xlf the -S option will generate a
- .s assembly code file prior to optimization. The option -qlist will
- generate a human readable one in a .lst file.
-
- There is also a disassembler in /usr/lpp/xlc/bin/dis include with the
- 1.3 version of xlc (and in /usr/lpp/xlC/bin/dis with the 2.1 version
- of xlC) that will disassemble existing object or executable files.
-
- ------------------------------
-
- Subject: 2.14: Curses
-
- Curses based applications should be linked with -lcurses and _not_ with
- -ltermlib. It has also been reported that some problems with curses are
- avoided if your application is compiled with -DNLS.
-
- Peter Jeffe <peter@ski.austin.ibm.com> also notes:
-
- >the escape sequences for cursor and function keys are *sometimes*
- >treated as several characters: eg. the getch() - call does not return
- >KEY_UP but 'ESC [ C.'
-
- You're correct in your analysis: this has to do with the timing of the
- escape sequence as it arrives from the net. There is an environment
- variable called ESCDELAY that can change the fudge factor used to decide
- when an escape is just an escape. The default value is 500; boosting
- this a bit should solve your problems.
-
- Christopher Carlyle O'Callaghan <asdfjkl@wam.umd.edu> has more comments
- concerning extended curses:
-
- 1) The sample program in User Interface Programming Concepts, page 7-13
- is WRONG. Here is the correct use of panes and panels.
-
- #include <cur01.h>
- #include <cur05.h>
-
- main()
- {
- PANE *A, *B, *C, *D, *E, *F, *G, *H;
- PANEL *P;
-
- initscr();
-
- A = ecbpns (24, 79, NULL, NULL, 0, 2500, Pdivszp, Pbordry, NULL, NULL);
- D = ecbpns (24, 79, NULL, NULL, 0, 0, Pdivszf, Pbordry, NULL, NULL);
- E = ecbpns (24, 79, D, NULL, 0, 0, Pdivszf, Pbordry, NULL, NULL);
- B = ecbpns (24, 79, A, D, Pdivtyh, 3000, Pdivszp, Pbordry, NULL, NULL);
- F = ecbpns (24, 79, NULL, NULL, 0, 0, Pdivszf, Pbordry, NULL, NULL);
- G = ecbpns (24, 79, F, NULL, 0, 5000, Pdivszp, Pbordry, NULL, NULL);
- H = ecbpns (24, 79, G, NULL, 0, 3000, Pdivszp, Pbordry, NULL, NULL);
- C = ecbpns (24, 79, B, F, Pdivtyh, 0, Pdivszf, Pbordry, NULL, NULL);
- P = ecbpls (24, 79, 0, 0, "MAIN PANEL", Pdivtyv, Pbordry, A);
-
- ecdvpl (P);
- ecdfpl (P, FALSE);
- ecshpl (P);
- ecrfpl (P);
- endwin();
- }
-
- 2) DO NOT include <curses.h> and any other <cur0x.h> file together.
- You will get a bunch of redefined statements.
-
- 3) There is CURSES and EXTENDED CURSES. Use only one or the other. If the
- manual says that they're backwards compatible or some other indication
- that you can use CURSES routines with EXTENDED, don't believe it. To
- use CURSES you need to include <curses.h> and you can't (see above).
-
- 4) If you use -lcur and -lcurses in the same link command, you will get
- Memory fault (core dump) error. You CANNOT use both of them at the same
- time. -lcur is for extended curses, -lcurses is for regular curses.
-
- 5) When creating PANEs, when you supply a value (other than 0) for the
- 'ds' parameter and use Pdivszf value for the 'du' parameter, the 'ds'
- will be ignored (the sample program on page 7-13 in User Interface
- Programming Concepts is wrong.) For reasons as yet undetermined,
- Pdivszc doesn't seem to work (or at least I can't figure out how to
- use it.)
-
- 6) If you're running into bugs and can't figure out what is happening,
- try the following:
- include -qextchk -g in your compile line
- -qextchk will check to make sure you're passing the right number of
- parameters to the functions
- -g enables debug
-
- 7) Do not use 80 as the number of columns if you want to use the whole
- screen. The lower right corner will get erased. Use 79 instead.
-
- 8) If you create a panel, you must create at least 1 pane, otherwise you
- will get a Memory fault (core dump).
-
- 9) When creating a panel, if you don't have a border around it, any title
- you want will not show up.
-
- 10) to make the screen scroll down:
- wmove (win, 0, 0);
- winsertln (win)
-
- 11) delwin(win) doesn't work in EXTENDED WINDOWS
-
- To make it appear as if a window is deleted, you need to do the following:
- for every window that you want to appear on the screen
- touchwin(win)
- wrefresh(win)
-
- you must make sure that you do it in the exact same order as you put
- them on the screen (i.e., if you called newwin with A, then C, then B,
- then you must do the loop with A, then C, then B, otherwise you won't
- get the same screen back). The best thing to do is to put them into
- an array and keep track of the last window index.
-
- 12) mvwin(win, line, col) implies that it is only used for viewports and
- subwindows. It can also be used for the actual windows themselves.
-
- 13) If you specify the attribute of a window using wcolorout(win), any
- subsequent calls to chgat(numchars, mode) or any of its relatives
- will not work. (or at least they get very picky.)
-
- ------------------------------
-
- Subject: 2.15: How do I speed up linking
-
- Please refer to sections 2.03 and 2.06 above.
-
- From: losecco@undpdk.hep.nd.edu (John LoSecco) and
- hook@chaco.aix.dfw.ibm.com (Gary R. Hook)
-
- From oahu.cern.ch in /pub/aix3 you can get a wrapper for the existing
- linker called tld which can reduce link times with large libraries by
- factors of 3 to 4.
-
- ------------------------------
-
- Subject: 2.16: What is deadbeef?
-
- When running the debugger (dbx), you may have wondered what the
- 'deadbeef' is you occasionally see in registers. Do note, that
- 0xdeadbeef is a hexadecimal number that also happens to be some kind
- of word (the RS/6000 was built in Texas!), and this hexadecimal number
- is simply put into unused registers at some time, probably during
- program startup.
-
-
- ------------------------------
-
- Subject: 2.17: How do I make an export list from a library archive?
- From: d.dennerline@bull.com (Dave Dennerline)
-
- [ This script has been moved to section 8.10 ]
-
- ------------------------------
-
- Subject: 2.19: Building imake, makedepend
- From: crow@austin.ibm.com (David L. Crow)
-
- [Editor's note: if you have AIX 4.x, you need the X11.adt.imake LPP
- and probably most if not all of the X11.adt.* LPPs. Imake, xmkmf and
- other utilities are delivered precompiled.]
-
- You need X11dev.src release 1.2.3.0 (ie the R5 release) [on AIX 3.2].
-
-
- Unless you have an R5 release of AIXwindows, there is no xmkmf.
- These are the steps that I use to make imake, makedepend and all
- of it's config files, and then install them in the working tree
- (ie not the Xamples) for daily use:
-
- cd /usr/lpp/X11/Xamples
- make Makefile
- make SUBDIRS="config util" Makefiles
- make SUBDIRS="config util" linklibs
- make SUBDIRS="config util" depend
- make SUBDIRS="config util"
- make SUBDIRS="config util" install
-
- Then redo the steps everytime you apply an X11 update.
-
- ------------------------------
-
- Subject: 2.20: How can tell what shared libraries a binary is linked with?
-
- Use "dump -H <execfilename>" and see if anything other than /unix is
- listed in the loader section (at the bottom). The first example is
- /bin/sh (statically linked) and the second example is
- /usr/local/bin/bash (shared).
-
- INDEX PATH BASE MEMBER
- 0 /usr/lib:/lib
- 1 / unix
-
- INDEX PATH BASE MEMBER
- 0 ./lib/readline/:./lib/glob/:/usr/lib:/lib
- 1 libc.a shr.o
- 2 libcurses.a shr.o
-
- The freeware tool "ldd" lists all the shared libraries needed
- by an executable, including those recursively included by other
- shared libraries. See question 2.27 "Where can I find ldd for AIX?".
-
- ------------------------------
-
- Subject: 2.21: Can I get a PTF for my C/C++ compiler from the net?
-
- <http://service.software.ibm.com/> contains pointers to most PTFs, including
- compilers. You'll need the fixdist program (see 1.142) to retrieve them.
-
- ------------------------------
-
- Subject: 2.22: Why does "install"ing software I got from the net fail?
-
- Note that the RS/6000 has two install programs, one with System V flavor
- in the default PATH (/etc/install with links from /usr/bin and /usr/usg),
- and one with BSD behavior in /usr/ucb/install.
-
- ------------------------------
-
- Subject: 2.23: What is Linker TOC overflow error 12?
-
- There is a hard coded limit in the AIX 3.2.5 linker that is fixed in
- AIX 4.1. A kind soul donated the following information to help people
- get the 3.2.5 fix
-
- The LPS (paperwork)
- AIX TOC Data Binder/6000 #P91128
- Version 1.1
- Program Number 5799-QDY
- Reference No. GC23-2604-00, FC 5615
- Pre Reqs listed were AIX 3.2.5
- IBM C Set++ V2 (5765-186)
-
- The above is not available any longer, see section 1.006.
-
- You could also put some of the application code into shared libraries
- or, in the case of gcc, use -mminimal-toc.
-
- ------------------------------
-
- Subject: 2.24: What is the limit on number of shared memory segments
- I can attach?
-
- Each process has 16 segments. One is used for private code, one for
- stack, one for heap; those, if memory serves, are segments 0, 1, and
- 2. (If you look in sys/shm.h, you'll see that SHMLOSEG is 3 -- the
- lowest segment, in number and in the process' virtual address space,
- available to shmat.)
-
- SHMHISEG, the highest segment you can attach to (also defined in
- sys/shm.h), is 12. Segments 3 through 12 are available to shmat,
- giving the 10 segments your program used successfully. (NSHMSEGS in
- sys/shm.h will give you this value, though it's of limited use, since
- most platforms that I've seen don't define it.)
-
- Segment 13 is used by shared code your program has attached to;
- I think one of the others might be for kernel-mode data.
-
- See also mmap.
-
- ------------------------------
-
- Subject: 2.25: I deleted libc.a by accident --- how do I recover?
- From: Ed Ravin <eravin@panix.com>
-
- You can recover from this without rebooting or reinstalling, if you
- have another copy of libc.a available that is also named "libc.a". If
- you moved libc.a to a different directory, you're in luck -- do the
- following:
-
- export LIBPATH=/other/directory
-
-
- And your future commands will work. But if you renamed libc.a, this
- won't do it. If you have an NFS mounted directory somewhere, you can
- put libc.a on the that host, and point LIBPATH to that directory as
- shown above.
-
- Failing that, turn off your machine, reboot off floppies or other
- media, and get a root shell. I don't think you should do "getrootfs"
- as you usually do when accessing the root vg this way -- AIX may start
- looking for libc.a on the disk, and you'll just run into the same
- problem. So do an importvg, varyonvg, and then mount /usr somewhere,
- then manually move libc.a back or copy in a new one from floppy.
-
- ------------------------------
-
- Subject: 2.26: Where can I find dlopen, dlclose, and dlsym for AIX?
-
- An implementation of these dynamic code loading functions was written by
- Jens-Uwe Mager <jum@anubis.han.de> and can be found at
- <http://www.han.de/~jum/aix/dlfcn.shar>
-
- From: Gary R. Hook <hook@austin.ibm.com>
-
- Starting with AIX 4.2 a dlopen et. al. are included in the base OS in
- the libdl.a library. Under AIX 4.1 this is available as SLHS (Shared
- Library Hookable Symbols) as APAR IX IX71849 for the runtime package and
- APAR IX IX72973 for the development tools.
-
- ------------------------------
-
- Subject: 2.27: Where can I find ldd for AIX?
- From: Jens-Uwe Mager <jum@anubis.han.de>
-
- Try <http://www.han.de/~jum/aix/ldd.c>. Also the "aix.tools"
- package from <http://www-frec.bull.com>
-
- ------------------------------
-
- Subject: 2.28: How do I make my program binary executable on the
- POWER, POWER2, and POWERPC architecures?
-
- AIX will emulate those instructions not available in POWERPC processors, but
- you can avoid this emulation and consequent performance degradtation by
- using only the common to all.
-
- If you are using IBM's xlc (cc) compiler, the default is to use the common
- instruction set. If you want to be explicit, use the -qarch=com option.
-
- The option -mcpu=common makes GCC use the common instruction set. Please
- note that (unlike xlc) this is *not* the default with GCC on AIX.
-
- ------------------------------
-
- Subject: 2.29: How do I access more than 256 Megabytes of memory?
-
- By default each program gets one segment register (see 2.24) for its
- data segment. As each segment register covers 256 MB, any calls to
- malloc more will fail. Also programs that declare large global or static
- arrays may fail to load. To allocate more segment registers to your
- program, use the linker option -bmaxdata to specify the number of bytes
- you need in the data segment as follows:
-
- cc -o myprog -bmaxdata:0x20000000 myprog.c
-
- The example above would allocate an additional segment register to allow
- for 512MB of data.
-
- ------------------------------
-
- Subject: 2.30: How do I use POSIX threads with gcc 2.7.x?
- From: David Edelsohn <dje@watson.ibm.com>
-
- The code generated by GCC is compatible with threads, but gcc-2.7
- was released so long ago that it did not provide an option to perform
- the extra link steps necessary to support threads:
-
- 1) Compile all source files with "-D_THREAD_SAFE" macro defined.
- 2) Link with "-L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a"
- to obtain the pthreads support
- and add "-nostartfiles /usr/lib/crt0_r.o" to the beginning of the
- link command line (using gcc to link!) to initialize threads.
-
- ------------------------------
-
- Subject: 2.31: Why does pthread_create return the error code 22?
-
- Using Posix threads under AIX requires a special C runtime startup
- initialization as well as special versions of some libraries. The IBM C
- compiler includes these special libraries if called by the name xlc_r
- (or xlC_r for C++). There also other maing variations to support various
- defaults, consult the file /etc/xlC.cf for details.
-
- ------------------------------
-
- Subject: 2.32: How do I build programs under a later AIX release that run
- under earlier releases as well?
-
- IBM develops AIX only for binary compatibility with older AIX releases,
- not the other way around. You will thus need to build programs on the
- oldest AIX release the program is supposed to run on. You will also need
- to link programs dynamically, if you link in the system libraries
- statically the program will probably only run on the machine you
- performed the link on.
-
- With some preparation it is appearently possible to get around that
- limitation. Bob Halblutzel has put together a web page describing the
- detailed steps how to set up such a build environment at the following
- web page:
-
- <http://www.hablutzel.com/aix_compatibility_build.html>
-
- Please not that this is not a supported way to build your programs, you
- will probably receive not any support by IBM if you have problems with
- that environment.
-
- ------------------------------
-
- Subject: 3.00: Fortran and other compilers
-
- This section covers all compilers other than C/C++. On Fortran, there
- seem to have been some problems with floating point handling, in
- particular floating exceptions.
-
- ------------------------------
-
- Subject: 3.01: I have problems mixing Fortran and C code, why?
-
- A few routines (such as getenv, signal, and system) exist in both the
- Fortran and C libraries but with different parameters. In the recent
- past, if you have a mixed program that calls getenv from both C and
- Fortran code, you have to link them carefully by specifying the correct
- library first on your command line. This is no longer needed starting
- with version 1.5 of the compilers.
-
-
- ------------------------------
-
- Subject: 3.02: How do I statically bind Fortran libraries and dynamically
- bind C libraries?
- From: amaranth@vela.acs.oakland.edu (Paul Amaranth)
-
- [ Editor's note: Part of this is also discussed above under the C compiler
- section, but I felt it was so valuable that I have left it all in.
- I've done some minor editing, mostly typographical. ]
-
- The linker and binder are rather versatile programs, but it is not
- always clear how to make them do what you want them to. In particular,
- there are times when you do not want to use shared libraries, but
- rather, staticly bind the required routines into your object. Or, you
- may need to use two versions of the same routine (eg, Fortran & C). Here
- are the results of my recent experiments. I would like to thank Daniel
- Premer and Brad Hollowbush, my SE, for hints. Any mistakes or omissions
- are my own and I have tended to interchange the terms "linker" and
- "binder". These experiments were performed on AIX 3.1.2. Most of this
- should be applicable to later upgrades of 3.1.
-
- 1) I have some C programs, I want to bind in the runtime routines. How
- do I do this? [Mentioned in section 2.04 of this article as well, ed.]
-
- You can put the -bnso binder command on the link line. You should
- also include the -bI:/lib/syscalls.exp control argument:
-
- $ cc *.o -bnso -bI:/lib/syscalls.exp -o foo
-
- This will magically do everything you need. Note that this will bind
- _all_ required routines in. The -bI argument tells the linker that
- these entry points will be resolved dynamically at runtime (these are
- system calls). If you omit this you will get lots of unresolved
- reference messages.
-
- 2) I want to statically bind in the Fortran runtime so a) my customers
- do not need to buy it and b) I don't have to worry about the runtime
- changing on a new release. Can I use the two binder arguments in
- 1) to do this?
-
- You should be able to do so, but, at least under 3002, if you do
- you will get a linker error referencing getenv. In addition, there
- are a number of potential conflicts between Fortran and C routines.
- The easy way just does not work. See the section on
- 2 stage linking for C and Fortran on how to do this. The getenv
- problem is a mess, see the section on Comments & Caveats for more.
-
- From: Gary R. Hook <hook@austin.ibm.com>
-
- The xlf runtime is a no-charge feature, you can download and install
- it without having to buy it. This change was made >2 years ago.
-
- 3) I have a mixture of C and Fortran routines, how can I make sure
- that the C routines reference the C getenv, while the Fortran routines
- reference the Fortran getenv (which has different parameters and, if
- called mistakenly by a C routine results in a segmentation fault)?
-
- From Mike Heath (mike@pencom.com):
-
- Use -brename:symbol1,symbol2 when pre-linking the modules from one
- of the languages. It does not matter which one you choose.
-
- 4) I have C and Fortran routines. I want to bind in the xlf library, while
- letting the rest of the libraries be shared. How do I do this?
-
- You need to do a 2 stage link. In the first stage, you bind in the
- xlf library routines, creating an intermediate object file. The
- second stage resolves the remaining references to the shared libraries.
-
- This is a general technique that allows you to bind in specific system
- routines, while still referencing the standard shared libraries.
-
- Specifically, use this command to bind the xlf libraries to the Fortran
- objects:
-
- $ ld -bh:4 -T512 -H512 <your objects> -o intermediat.o \
- -bnso -bI:/lib/syscalls.exp -berok -lxlf -bexport:/usr/lib/libg.exp \
- -lg -bexport:<your export file>
-
- The argument -bexport:<your export file> specifies a file with the
- name of all entry points that are to be visible outside the intermediate
- module. Put one entrypoint name on a line. The -bI:/lib/libg.exp line
- is required for proper functioning of the program. The -berok argument
- tells the binder that it is ok to have unresolved references, at least
- at this time (you would think -r would work here, but it doesn't seem to).
- The -bnso argument causes the required modules to be imported
- into the object. The -lxlf, of course, is the xlf library.
-
- Then, bind the intermediate object with the other shared libraries in
- the normal fashion:
-
- $ ld -bh:4 -T512 -H512 <C or other modules> intermediate.o \
- /lib/crt0.o -lm -lc
-
- Note the absence of -berok. After this link, all references should
- be resolved (unless you're doing a multistage link and making another
- intermediate).
-
- NOTE THE ORDER OF MODULES. This is extremely important if, for example,
- you had a subroutine named "load" in your Fortran stuff. Putting the
- C libraries before the intermediate module would make the C "load"
- the operable definition, rather than the Fortran version EVEN THOUGH
- THE FORTRAN MODULE HAS ALREADY BEEN THROUGH A LINK AND ALL REFERENCES
- TO THE SYMBOL ARE CONTAINED IN THE FORTRAN MODULE. This can
- be extremely difficult to find (trust me on this one :-) Is this
- a bug, a feature, or what?
-
- [As mentioned in section 2.03 of this article, it is a feature that you
- can replace individual objects in linked files, ed.]
-
- The result will be a slightly larger object than normal. (I say slightly
- because mine went up 5%, but then it's a 2 MB object :-)
-
-
- Comments & Caveats:
-
- From the documentation the -r argument to the linker should do what
- -berok does. It does not. Very strange results come from using the
- -r argument. I have not been able to make -r work in a sensible manner
- (even for intermediate links which is what it is supposed to be for).
-
- Note from Mike Heath (mike@pencom.com):
-
- 'ld -r' is essentially shorthand for 'ld -berok -bnogc -bnoglink'.
- Certainly, using -berok with an export file (so garbage collection
- can be done) is preferable to ld -r, but the latter is easier.
-
- When binding an intermediate module, use an export file to define the
- entry points you want visible in the later link. If you don't do this,
- you'll get the dreaded "unresolved reference" error. Import files name
- entry points that will be dynamically resolved (and possibly where).
-
- If you are in doubt about what parameters or libraries to link, use the
- -v arg when linking and modify the exec call that shows up into
- an ld command. Some thought about the libraries will usually yield an
- idea of when to use what. If you don't know what an argument is for,
- leave it in. It's there for a purpose (even if you don't understand it).
-
- Watch the order of external definitions (ie, libraries) when more than
- one version of a routine may show up, eg "load". The first one defined
- on the ld command line is the winner.
-
- The getenv (and system and signal) problem is a problem that started out
- minor, got somewhat worse in 3003 and, eventually will be correctly fixed.
- Basically, you should extract the 3002 version of these three routines
- from xlf.a before doing the update and save them away, then link these
- routines in if you use these Fortran system services.
-
-
- ------------------------------
-
- Subject: 3.03: How do I check if a number is NaN?
- From: sdl@glasnost.austin.ibm.com (Stephen Linam)
-
- NaN is "Not a Number". It arises because the RISC System/6000 uses
- IEEE floating point arithmetic.
-
- To determine if a variable is a NaN you can make use of the property
- that a NaN does not compare equal to anything, including itself.
- Thus, for real variable X, use
-
- IF (X .NE. X) THEN ! this will be true if X is NaN
-
- Floating point operations which cause exceptions (such as an overflow)
- cause status bits to be set in the Floating Point Status and Control
- Register (FPSCR). There is a Fortran interface to query the FPSCR, and
- it is described in the XLF Fortran manuals -- I don't have the manuals
- right here, but look for FPGETS and FPSETS.
-
- The IBM manual "Risc System/6000 Hardware Technical Reference - General
- Information" (SA23-2643) describes what floating point exceptions can
- occur and which bits are set in the FPSCR as a result of those exceptions.
-
-
- ------------------------------
-
- Subject: 3.04: Some info sources on IEEE floating point.
-
- 1. ANSI/IEEE STD 754-1985 (IEEE Standard for Binary Floating-Point
- Arithmetic) and ANSI/IEEE STD 854-1987 (IEEE Standard for
- Radix-Independent Floating-Point Arithmetic), both available from IEEE.
-
- 2. David Goldberg, "What Every Computer Scientist Should Know About
- Floating-Point Arithmetic", ACM Computing Surveys, Vol. 23, No. 1,
- March 1991, pp. 5-48.
-
- ------------------------------
-
- Subject: 3.05: Why does it take so long to compile "hello world" with xlf?
-
- [read 2.07]
-
- ------------------------------
-
- Subject: 4.00: GNU and Public Domain software
-
- GNU software comes from the Free Software Foundation and various other
- sources. A number of ftp sites archive them. Read the GNU license for
- rules on distributing their software.
-
- Lots of useful public domain software have been and continue to be ported
- to the RS/6000. See below for ftp or download information.
-
- ------------------------------
-
- Subject: 4.01: How do I find sources?
- From: jik@GZA.COM (Jonathan Kamens)
-
- There is a newsgroup devoted to posting about how to get a certain
- source, comp.sources.wanted. An archive of information about sources,
- including FTP sites is available from
-
- ------------------------------
-
- Subject: 4.02: Are there any ftp or WWW sites?
-
- SMIT-installable precompiled packages of popular freeware for AIX 4.x at
- <http://www-frec.bull.com/>. Download the ".exe" files with your WWW
- browser. These are auto-uncompressing files, just like on PCs (it uses
- similar technology to PKZIP). Mark the file as executable (chmod +x),
- then execute it to generate a .bff file. The .bff file can then be
- installed using "smit install_latest". For more information
- read the INSTALL.txt file on the server.
-
- There are mirrors of this site at http://www.bull.de/ and
- http://ftp.univie.ac.at/aix/.
-
- The package explicitly referenced below are ones Ciaran consideres
- "solid." That is, the binary has been "tested by lots of people."
-
- Bull provides many other freeware packages as well. If you use the
- service, be sure and thank Ciaran and Bull.
-
- Below are some ftp sites that are supposed to have RS/6000 specific
- software. I haven't verified all the entries.
-
- US sites:
- <ftp://aixpdslib.seas.ucla.edu/pub/>
- <ftp://aix.boulder.ibm.com/>
- <ftp://software.watson.ibm.com/>
-
- European sites:
- <ftp://nic.funet.fi/pub/unix/AIX/RS6000/>
- <ftp://ftp.uni-stuttgart.de/sw/rs_aix32/>
-
- The first one is dedicated to software running on AIX. It might not
- always be the latest versions of the software, but it has been ported
- to AIX (normally AIX version 3 only). Please use the European sites
- very sparingly. They are primarily to serve people in Europe and most
- of the software can be found in the US sites originally.
-
- The remaining sites are simply ones that archie indicated contained
- AIX related materials.
-
- <ftp://ftp.u.washington.edu/pub/RS6000/>
- <ftp://aixive.unb.ca/>
- <ftp://ftp-aix.polytechnique.fr/pub/binaries/rios/>
-
- ------------------------------
- Subject: 4.03: Why does "install"ing software I got from the net fail?
-
- This answer was moved to section 2.22
-
- ------------------------------
-
- Subject: 4.04: GNU Emacs
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>.
-
- If you get a segmentation fault in GNU EMACS 19.* during hilit19 use,
- you can set locale to C (export LC_ALL=C) to get around the AIX bug.
-
- Version 18.57 of GNU Emacs started to have RS/6000 support. Use
- s-aix3-2.h for AIX 3.2. Emacs is going through rapid changes recently.
- Current release is 19.x.
-
- Emacs will core-dump if it is stripped, so don't strip when you install
- it. You can edit a copy of the Makefile in src replacing all 'install -s'
- with /usr/ucb/install.
-
- ------------------------------
-
- Subject: 4.05: gcc/gdb
-
- GNU C version 2.0 and later supports the RS/6000, and compiles straight
- out of the box on AIX 3 and AIX 4.1 and 4.2. You may, however,
- experience that compiling it requires large amounts of paging space.
-
- On AIX 4.3, compiling gcc appears to be much more difficult due to
- changes for the 64 bit environment. A precompiled gcc is available in
- the form of egcs in the Bull archive at <http://www-frec.bull.com/>.
-
- From: Ciaran Deignan <Ciaran.Deignan@bull.net>
-
- Note:
- - there is a link problem on AIX 4.3. Until I find a way of building
- a distribution on AIX 4.3, you'll have to use 'ld'.
- - The package gnu.egcs-1.1.0.0.exe does not contain the C++ compiler
- (G++). However since you can't link a G++ object file with 'ld',
- this is just part of the same problem.
-
- [Editor's note: from the latest postings it appears that the latest
- (post 1.1b) egcs snapshots fixes the problem with collect2. The problem
- here is that there are no binary distributions yet, one has to bootstrap
- this version using IBM's C compiler.]
-
- From: Brent Burkholder <bburk@bicnet.net>
-
- In order to compile and link using egcs on AIX you first
- need to download and apply fix APAR IX87327
- from
- <http://service.boulder.ibm.com/cgi-bin/support/rs6000.support/downloads>
- Looking up the APAR # should allow you to download
- bos.rte.bind_cmds.4.3.2.2 which fixes all problems.
-
- ------------------------------
-
- Subject: 4.06: GNU Ghostscript
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>.
-
- The PostScript interpreter GNU Ghostscript Version 2.3 and later supports
- the RS/6000 and can be found on various ftp sites. Current version is 2.6.1.
-
- Compile time problems:
- Compile idict.c and zstack.c _without_ optimization, add the following
- to the Makefile:
-
- idict.o: idict.c
- $(CC) -c idict.c
-
- zstack.o: zstack.c
- $(CC) -c zstack.c
-
- Run time problems:
- Running ghostview-1.5 with ghostscript-2.6.1, I get
- gs: Malformed ghostview color property.
- Solution: replace buggy version of ghostscript-2.6.1 X11 driver
- with at least 2.6.1pl4
-
- ------------------------------
-
- Subject: 4.07 TeX - Document processing
- From: "Patrick TJ McPhee" <ptjm@ican.net>
-
- TeX can be retrieved via ftp from the comprehensive TeX archive
- network (CTAN). The principle sites are
- ftp.tex.ac.uk (UK)
- ftp.dante.de (Deutschland)
- ftp.tug.org (USA)
- but there are many mirrors. finger ctan@ftp.tex.ac.uk for a list.
-
- ------------------------------
-
- Subject: 4.08 Perl - Scripting language
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>.
-
- If you want the source code, <http://www.perl.com/perl/> is good place
- to start.
-
- As of AIX 4.3.3, perl is packaged with AIX but not supported.
-
- ------------------------------
-
- Subject: 4.09: X-Windows
-
- AIX 4.x ships with X11R5 and Motif 1.2.
-
- On AIX 3.2 the base version has X11R4 and Motif 1.1 and the extended
- version has X11R5 as AIXwindows 1.2.3. See question 1.500 for more
- information about determining your revision.
-
- AIXwindows version 1.2.0 (X11rte 1.2.0) is X11R4 with Motif 1.1
- AIXwindows version 1.2.3 (X11rte 1.2.3) is X11R5 with Motif 1.1
- 'lslpp -h X11rte.motif1.2.obj' should tell you if you are
- running Motif 1.2.
-
- ------------------------------
-
- Subject: 4.10 Bash - /bin/ksh alternative from FSF
-
- Bash is an alternative to ksh and is availible from prep.ai.mit.edu
- and places that mirror the GNU software. /etc/security/login.cfg
- needs to be modified if this will be used as a default shell.
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>.
-
- [Editor's note: bash's command line expansion and new
- meta-expressions make it an absolute "must" for system
- administrators]
- ------------------------------
-
- Subject: 4.11: Elm
-
- A very nice replacement for mail. Elm should be pretty straightforward,
- the only thing to remember is to link with -lcurses as the only
- curses/termlib library. You may also run into the problem listed under
- point 2.13 above.
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>.
-
- ------------------------------
-
- Subject: 4.12: Oberon 2.2
- From: afx@muc.ibm.de (Andreas Siegert)
-
- Oberon is Wirth's follow on to Modula-2, but is not compatible. A free
- version of Modula-3 is available from DEC/Olivetti at
- gatekeeper.dec.com. This is not a Modula-2 replacement but a new
- language. There are currently two M2 compilers for the 6000 that I
- know of. One from Edinburgh Portable Compilers, +44 31 225 6262 (UK)
- and the other from Gardens Point is availible through A+L in
- Switzerland (+41 65 520311) or Real Time Associates in the UK
- (info@rtal.demon.co.uk).
-
- Oberon can be obtained via anonymous ftp from neptune.inf.ethz.ch
- (129.132.101.33) under the directory Oberon/RS6000 or gatekeeper.dec.com
- (16.1.0.2).
-
- ------------------------------
-
- Subject: 4.13: Kermit - Communications
- From: Frank da Cruz <fdc@watsun.cc.columbia.edu>
-
- Available for all versions of AIX on RS/6000, PowerPC, PS/2, RT PC,
- and 370-Series mainframes. For complete information on Kermit software
- for AIX and hundreds of other platforms, visit the Kermit Web site:
-
- <http://www.columbia.edu/kermit/>
-
- C-Kermit 6.0 was announced November 30, 1996:
-
- <http://www.columbia.edu/kermit/ck60.html>
-
- The nonprofit Kermit Project is funded primarily by manual sales.
- For C-Kermit 6.0 the manual is the new second edition of "Using C-Kermit":
-
- <http://www.columbia.edu/kermit/ck60manual.html>
-
- For RS/6000 and PowerPC with AIX 3.x or 4.x:
-
- <ftp://kermit.columbia.edu/kermit/archives/cku192.tar.Z> (or .gz)
-
- Uncompress, untar (tar xvf cku192.tar) then:
-
- make rs6aix32c <-- For AIX 3.x
- make rs6aix41c <-- For AIX 4.x
-
- This produces an exutable called "wermit". Before installing, read the
- instructions in ckuins.doc from the tar file.
-
- If you don't have a C compiler, you can get binaries at:
-
- <http://www.columbia.edu/kermit/ck60ubin.html>
-
- Send questions to kermit-support@columbia.edu.
-
- ------------------------------
-
- Subject: 4.14: Gnu dbm
- From: doug@cc.ysu.edu (Doug Sewell)
-
- Here's the fixes for RS/6000's:
-
- apply this to testgdbm.c:
- 158c158
- < char opt;
- ---
- > int opt;
- 166c166
- < while ((opt = getopt (argc, argv, "rn")) != -1)
- ---
- > while ((opt = getopt (argc, argv, "rn")) != EOF)
-
- Apply this to systems.h:
- 111a112,114
- > #ifdef RS6000
- > #pragma alloca
- > #else
- 112a116
- > #endif
-
- To compile, edit the Makefile. Set CC to bsdcc (see /usr/lpp/bos/bsdport
- if you don't have 'bsdcc' on your system) and set CFLAGS to -DRS6000 and
- whatever options (-g, -O) you prefer. Don't define SYSV.
-
- ------------------------------
-
- Subject: 4.15 tcsh - an alternative shell
- From: cordes@athos.cs.ua.edu (David Cordes)
-
- tcsh is available from <ftp://ftp.deshaw.com/pub/tcsh>
- Compiles with no problems. You must edit /etc/security/login.cfg to
- permit users to change to this shell (chsh), adding the path where the
- shell is installed (in my case, /usr/local/bin/tcsh).
-
- >From: "A. Bryan Curnutt" <bryan@Stoner.COM>
-
- Under AIX 3.2.5, you need to modify the "config.h" file, changing
- #define BSDSIGS
- to
- #undef BSDSIGS
-
- ------------------------------
-
- Subject: 4.16: Kyoto Common Lisp
-
- The sources are available from cli.com. The kcl package is the needed
- base; also retrieve the latest akcl distribution. akcl provides a
- front-end that "ports" the original kcl to a number of different
- platforms. The port to the 6000 worked with no problems. However, you
- must be root for make to work properly with some memory protection
- routines.
-
- ------------------------------
-
- Subject: 4.17 Tcl/Tk - X-Windows scripting
-
- Current versions: Tcl 8.0b2 and Tk 8.0b2. They are available from
- <ftp://ftp.sunlabs.com/pub/tcl/>. The Tcl/Tk web page is at
- <http://sunscript.sun.com/>.
-
- Prebuilt installp (smit) installable packages for several versions of Tcl and
- Tk are available from <http://www-frec.bull.com/>.
-
- ------------------------------
-
- Subject: 4.18: Expect
- From: Doug Sewell <DOUG@YSUB.YSU.EDU>
-
- To build the command-interpreter version, you must have the tcl library
- built successfully. The expect library doesn't require tcl. Note:
- Expect and its library are built with bsdcc, so applications using
- the library probably also need to be developed with bsdcc.
-
- I ftp'd expect from ftp.cme.nist.gov.
-
- You need to change several lines in the makefile. First you need
- to customize source and target directories and files:
- #
- TCLHDIR = /usr/include
- TCLLIB = -ltcl
- MANDIR = /usr/man/manl (local man-pages)
- MANEXT = l
- BINDIR = /u/local/bin
- LIBDIR = /usr/lib
- HDIR = /usr/include
- ...
- Next set the compiler, switches, and configuration options:
- #
- CC = bsdcc
- CFLAGS = -O
- ...
- PTY_TYPE = bsd
- ...
- INTERACT_TYPE = select
- ...
- Then you need to make these changes about line 90 or so:
- comment out CFLAGS = $(CLFLAGS)
- un-comment these lines:
- CFLAGS = $(CLFLAGS) $(CPPFLAGS)
- LFLAGS = ($CLFLAGS)
-
- Then run 'make'.
-
- You can't run some of the examples without modification (host name,
- etc). I don't remember if I ran all of them or not, but I ran enough
- that I was satisfied it worked.
-
- ------------------------------
-
- Subject: 4.19: Public domain software on CD
- From: mbeckman@mbeckman.mbeckman.com (Mel Beckman)
-
- The Prime Time Freeware CD collection is a package of two CD's and docs
- containing over THREE GIGABYTES of compressed Unix software. It costs $69
- >from Prime Time Freeware, 415-112 N. Mary Ave., Suite 50, Sunnyvale, CA
- 94086. Phone 408-738-4832 voice, 408-738-2050 fax. No internet orders as
- far as I can tell.
-
- I've extracted and compiled a number of the packages, and all have worked
- flawlessly so far on my 220. Everything from programming languages to 3D
- solid modeling is in this bonanza!
-
- [Ed: The O'Reilly book, Unix Power Tools, also contains a CD-ROM with lots
- of useful programs compiled for the RS/6000, among other platforms.]
-
- ------------------------------
-
- Subject: 4.20: Andrew Toolkit
- From: Gary Keim <gk5g+@andrew.cmu.edu>
-
- The Andrew Toolkit Consortium of Carnegie Mellon University's School of
- Computer Science has released new versions of the Andrew User
- Environment, Andrew Toolkit, and Andrew Message System.
-
- The Andrew User Environment (AUE) is an integrated set of applications
- beginning with a 'generic object' editor, ez, a help system, a system
- monitoring tool (console), an editor-based shell interface (typescript),
- and support for printing multi-media documents.
-
- The Andrew Toolkit (ATK) is a portable user-interface toolkit that runs
- under X11. It provides a dynamically-loadable object-oriented
- environment wherein objects can be embedded in one another. Thus, one
- could edit text that, in addition to containing multiple fonts, contains
- embedded raster images, spreadsheets, drawing editors, equations, simple
- animations, etc. These embedded objects can also be nested.
-
- The Andrew Message System (AMS) provides a multi-media interface to mail
- and bulletin-boards. AMS supports several mail management strategies
- and implements many advanced features including authentication, return
- receipts, automatic sorting of mail, vote collection and tabulation,
- enclosures, audit trails of related messages, and subscription
- management. It has interfaces that support ttys, personal computers,
- and workstations.
-
- Release 5.1 of Andrew contains many bug fixes and updates. There is now
- support for the new Internet MIME (Multipurpose Internet Mail Extensions)
- standards for multipart, and multimedia mail. For more information on
- MIME, please see the CHANGES files in the ftp directory on
- emsworth.andrew.cmu.edu.
-
- This release can be obtained as follows. The sources are available via
- anonymous ftp from export.lcs.mit.edu (18.30.0.238) in the
- ./contrib/andrew tree. For details, see ./contrib/andrew/README.
-
- PATCH for AIX3.2: A patch to the AUIS 5.1 sources can be ftp'ed from
- emsworth.andrew.cmu.edu (128.2.45.40) in ./aixpatch. For those without
- internet access, a 3.5" diskette can be ordered for a nominal fee of $10
- by sending, or faxing, a purchase order to the Consortium address below.
-
- Andrew, as well as a variety of other CMU software, can also be ftp'ed
- >from emsworth.andrew.cmu.edu (128.2.30.62). Those with AFS access look
- at /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp.
-
- Remote Andrew Demo Service
-
- This network service allows you to run Andrew Toolkit applications
- without obtaining or compiling the Andrew software. You need a host
- machine running X11 on the Internet. A simple "finger" command will let
- you experience ATK applications firsthand. You'll be able to compose
- multimedia documents, navigate through the interactive Andrew Tour, and
- use the Andrew Message System to browse through CMU's three thousand
- bulletin boards and newsgroups.
-
- To use the Remote Andrew Demo service, run the following command:
-
- finger help@atk.itc.cmu.edu
-
- The service will give you further instructions.
-
- Information Sources
-
- Your bug reports are welcome; kindly send them to
- info-andrew-bugs@andrew.cmu.edu and we will periodically post a status
- report to the mailing list info-andrew@andrew.cmu.edu. To be added to
- the mailing list or make other requests, send mail to
- info-andrew-request@andrew.cmu.edu.
-
- We also distribute the following related materials:
-
- ATK and AMS sources and binaries on CDROM. Binaries are available
- for the following system types:
-
- IBM RiscSystem/6000
- Sun SparcStation
- HP 700 Series
- DECstation
-
- ATK and AMS sources on QIC and Iotamat tapes Hardcopies of the
- documentation for ATK and AMS. Introductory video tape: Welcome to
- Andrew: An Overview of the Andrew System. Technical video tape: The
- Andrew Project: A Session at the Winter 1988 Usenix Conference.
-
- More information about these materials is available from:
-
- Information Requests
- Andrew Toolkit Consortium
- Carnegie Mellon University
- 4910 Forbes Avenue, UCC 214
- Pittsburgh, PA 15213-3890
- USA
- phone: +1-412-268-6710
- fax: +1-412-621-8081
- info-andrew-request@andrew.cmu.edu
-
- There is also a netnews distribution list, comp.soft-sys.andrew, which
- is identical to the info-andrew list except that it does not support the
- multi-media capabilities of info-andrew.
-
- ------------------------------
-
- Subject: 4.21: sudo
-
- Sudo (superuser do) allows a system administrator to give certain users (or
- groups of users) the ability to run some (or all) commands as root while
- logging all commands and arguments. Sudo operates on a per-command basis, it
- is not a replacement for the shell.
-
- The latest version of sudo is cu-sudo v1.5. There is a web page for sudo at
- <http://www.courtesan.com/courtesan/products/sudo/sudo.html>. The program
- itself can be obtained from <ftp://ftp.courtesan.com/pub/sudo/>. Sudo's
- author, Todd Miller < Todd.Miller@courtesan.com> reports that sudo works on
- both AIX 3.2.X and 4.1.X.
-
-
- ------------------------------
-
- Subject: 4.22: Flexfax/HylaFax and other fax software
- From: Christian Zahl <czahl@cs.tu-berlin.de>
-
- Sam Leffler has released a new version of FlexFax called HylaFax. It
- is availible from <ftp://sgi.com/sgi/fax/>. There is a HlyaFax web
- page at <http://www.vix.com/hylafax/>. Version V3.0pl1
- supported many types of Class 1/2 fax modems and several UNIX systems
- including AIX 3.2.3 or greater. There is also a fax modem review
- document at the same site as <ftp://sgi.com/pub/fax/bakeoff>. The FlexFax
- related files on sgi.com are replicated on ftp.bsc.no as well.
-
- >From: michael@hal6000.thp.Uni-Duisburg.DE (Michael Staats)
-
- We're using mgetty+sendfax for the basic modem I/O, I wrote a printer
- backend for the modem so that users can send faxes as easy as they print
- postscript. I also wrote a little X interface composer to generate a
- fax form that makes sending faxes very easy. You can find these
- programs at hal6000.thp.Uni-Duisburg.DE under /pub/source.
-
- program comment
-
- mgetty+sendfax-0.14.tar.gz basic modem I/O, needs hacking for AIX
- X11/xform-1.1.tar.gz small and simple X interface composer
- with an example fax form. Needs
- libxview.a incl. headers.
- faxiobe.tar.gz fax backend, needs configuring for
- your local site
-
- If you need a binary version of libxview.a and the headers you'll find
- them under /pub/binaries/AIX-3-2/lxview.tar.gz.
-
- ------------------------------
-
- Subject: 4.23: lsof - LiSt Open Files
- From: abe@purdue.edu (Vic Abell)
-
- Q. How can I determine the files that a process has opened?
- Q. How can I locate the process that is using a specific network address?
- Q. How can I locate the processes that have files open on a file system?
-
- A. Use lsof (LiSt Open Files).
-
- From: "Juan G. Ruiz Pinto" <jgruiz@cyber1.servtech.com>
-
- Lsof is available via anonymous ftp from
- <ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof.tar.Z>
- (for the most current version). There are binary distributions in the
- "binary" directory.
-
- A prebuilt installp (smit) installable package is available from
- <http://www-frec.bull.com/>. The installation scripts in this package
- automatically creates a group "kmem" during the install
- and uses "acledit" to allow the kmem group to read /dev/mem and /dev/kmem.
- This configuration is recommended by Vic Abell <abe@purdue.edu>, the
- author of lsof.
-
- ------------------------------
-
- Subject: 4.24: popper - POP3 mail daemon
-
- The POP server is available via anonymous ftp from
- ftp.qualcomm.com:/quest/unix/servers/popper
- The makefile supports AIX
- ftp.CC.Berkeley.EDU (128.32.136.9, 128.32.206.12).
- There are two versions in the pub directory: a compressed tar file
- popper-version.tar.Z and a Macintosh StuffIt archive in BinHex format
- called MacPOP.sit.hqx.
-
- Problems building some versions of popper can sometimes be resolved by
- compiling with bsdcc or -D_BSD.
-
- The pine 3.95 package on <http://www-frec.bull.com/> contains "plug
- and play" support for both POP3 and IMAP mail reading protocols. You
- can also get a compiled version of qpopper 2.2 there also.
-
- ------------------------------
-
- Subject: 4.26: mpeg link errors version 2.0
- From: Nathan Lane <nathan@seldon.foundation.tricon.com>
-
- .XShmCreateImage
- .XShmDetach
- .XShmAttach
- .XShmGetEventBase
- .XShmPutImage
- .XShmQueryExtension
-
- ... are for the Shared Memory extension of the X server.
- You can either choose to build it with shared memory or without. I
- always do it without the performance increase is not really
- incredible, except on something like a 2x0 machine with the local bus
- graphics adapter. Just take out "DSH_MEM" in the CFLAGS in the
- makefile for mpeg_play. There is more information about shared memory
- link errors in section 1.513.
-
- Also, in the module "video.c" for mpeg_play it will complain about not
- having enough memory to fully optimize one of the loops. You can get
- around that by specificying "qmaxmem=8000" in your cflags line, BUT,
- the extra optimization does little good in my tests.
-
- ------------------------------
-
- Subject: 4.27: NNTP, INN
-
- Link errors compiling nntp may occur because your machine lacks the
- "patch" command. Patch can be obtained from GNU repositories. See question
- 4.29 for more information on patch.
-
- ------------------------------
-
- Subject: 4.28: Zmodem - File transfer
-
- RZSZ is Chuck Forsberg's script for Z-modem. It is available by ftp at
- <ftp://oak.oakland.edu/pub/unix-c/xyzmodem/rzsz9305.tar.Z> or
- directly from Forsberg at Omen Technology BBS at 503-621-3746.
-
- Hints:
- 0. Build with "make posix"
- 1. Use an 8-bit clean version of rlogin or telnet (Note: below)
- 2. Set the system to be transparent, I use "terminal download"
- 3. Ensure hardware flow-control
-
- Note, carlson@xylogics.com (James Carlson) suggests: Rlogin is
- "slightly" unclean -- if an FF FF 73 73 appears in the datastream, it
- can be ripped out by rlogind as a 'window size change' request.
-
- [Ed note: The important part is using an 8-bit clean application,
- since there are several implemenations of rlogin and telnet availible
- you may need to try both and hunt down manuals to find the right flags
- for your system]
-
- ------------------------------
-
- Subject: 4.29: Patch - automated file updates
-
- AIX 3.2.5 does not ship with patch, a utility to apply the differences
- between two files to make them identical. This tool is often used to
- update source code.
-
- <ftp://ftp.x.org/pub/R6untarred/xc/util/patch/>
- <ftp://prep.ai.mit.edu/pub/gnu/patch-2.1.tar.gz>
-
- ------------------------------
-
- Subject: 4.30: XNTP - network time protocol, synchronizes clocks
- From: Joerg Schumacher <schuma@ips.cs.tu-bs.de>
-
- AIX 4: xntpd in bos.net.tcp.client
- source: ftp://ftp.udel.edu/pub/ntp/
- WWW: http://www.eecis.udel.edu/~ntp/
-
-
- ------------------------------
-
- Subject: 4.31: GNU Screen and AIX 4.1.x
-
- Once again, binaries can be had from <http://www-frec.bull.com/>.
-
- ------------------------------
-
- Subject: 4.32: SCSI scanner software
-
- There is the SANE project that strives to deliver an open source scanner
- solution for Unix:
-
- <http://www.mostang.com/sane/>
-
- ------------------------------
-
- Subject: 4.33: Pager/Paging software
-
- There is information on Paging, Paging programs and listing of the
- Archive sites to download at the web site:
- <ftp://ftp.airnote.net:/pub/paging-info/ixo.faq>.
-
- HylaFAX (see 4.22) supports sending messages to alphanumeric pagers.
-
- Commercially there is: AlphaPage(r) MD2001 from Information Radio
- Technology, Inc. in Cleveland, OH.
-
- ------------------------------
-
- Subject: 4.34: JAVA Development Kit
- From: Curt Finch <curt@tkg.com>
-
- <http://ncc.hursley.ibm.com/javainfo/>
-
- ------------------------------
-
- Subject: 4.35: Sendmail
-
- <ftp://ftp.sendmail.org/sendmail/>
-
- If you want to use SRC to start and stop BSD sendmail, do the following
- after installing it:
-
- chssys -s sendmail -S -n 15 -f 9 -a -d99.100
-
- This tells SRC that sendmail may be stopped with signals 15 and 9. It also
- arranges for sendmail not to daemonize itself, since it will run under SRC.
-
- ------------------------------
- Subject: 5.00: Third party products
-
- [ Ed.: Entries in this section are edited to prevent them from looking
- like advertising. Prices given may be obsolete. Companies mentioned
- are for reference only and are not endorsed in any fashion. ]
-
- ------------------------------
-
- Subject: 5.01: Non-IBM AIX hosts.
-
- Bull <http://www.bull.com/> manufactures and sells AIX systems. To
- find a distributor in your country, check the web page at
- <http://www.bull.com/contact/cscall.htm> and/or
- <http://www.bull.com/bullsite/bsit01_a.htm>.
-
- Other vendors and manufactures include Motorola, Harris, General
- Automation and Apple.
-
- Kenetics Technology Inc.
- 35 Campus Drive
- Edison NJ 08837
- Contact : Brian Walsh
- Phone - 908-805-0998
- Fax - 908-346-1288
-
- Manufactures a Power PC based RS-6000 clone that runs AIX versions
- 3.2.5 and 4.1.4.
-
- A typical configuration with a 100 MHz Power PC 601 and 32 MB RAM, and 2
- GB Hard drive, monitor, keyboard and networking is about $4995.00
-
- ------------------------------
-
- Subject: 5.02: Disk/Tape/SCSI
- From: anonymous
-
- - Most SCSI disk drives work (IBM resells Maxtor, tested Wren 6&7 myself);
- use osdisk when configuring (other SCSI disk).
-
- - Exabyte: Unfortunately only the ones IBM sells are working.
- A few other tape drives will work;
- use ostape when configuring (other SCSI tape).
-
- - STK 3480 "Summit": Works with Microcode Version 5.2b
-
-
- >From: bell@hops.larc.nasa.gov (John Bell)
-
- In summary, third party tape drives work fine with the RS/6000 unless
- you want to boot from them. This is because IBM drives have 'extended
- tape marks', which IBM claims are needed because the standard marks
- between files stored on the 8mm tape are unreliable. These extended
- marks are used when building boot tapes, so when the RS/6000 boots, it
- searches for an IBM tape drive and refuses to boot without it.
-
- >From: jrogers@wang.com (John Rogers)
-
- On booting with non-IBM SCSI tape drives: I haven't tried it myself but
- someone offered:
-
- Turn machine on with key in secure position.
- Wait until LED shows 200 and 8mm tape has stopped loading.
- Turn key to service position.
-
-
- >From: amelcuk@gibbs.clarku.edu (Andrew Mel'cuk)
-
- The IBM DAT is cheap and works. If you get all the patches beforehand
- (U407435, U410140) and remember to buy special "Media Recognition
- System" tapes (Maxell, available from APS 800.443.4461 or IBM #21F8758)
- the drive can even be a pleasure to use. You can also flip a DIP switch
- on the drive to enable using any computer grade DAT tapes (read the
- hardware service manual).
-
- Other DAT drives also work. I have tried the Archive Python (works) and
- experimented extensively with the Archive TurboDAT. The TurboDAT is a
- very fast compression unit, is not finicky with tapes and doesn't
- require the many patches that the IBM 7206 does. Works fine with the
- base AIX 3.2 'ost' driver.
-
-
- >From: pack@acd.ucar.edu (Daniel Packman)
-
- >>You can boot off of several different brands of non-IBM Exabytes.
- >>At least TTI and Contemporary Cybernetics have done rather complete
- >>jobs of emulating genuine IBM products.
-
- A model that has worked for us from early AIX 3.1 through 3.2 is a TTI
- CTS 8210. This is the old low density drive. The newer 8510 is dual
- density (2.2gig and 5gig). Twelve dip switches on the back control the
- SCSI address and set up the emulation mode. These drives have a very
- useful set of lights for read-outs (eg, soft error rate, tape remaining,
- tape motion, etc.).
-
- ------------------------------
-
- Subject: 5.03: Memory
-
- Nordisk Computer Services (Portland 503-598-0111, Seattle
- 206-242-7777) is reputed to have memory for use on AIX platforms.
-
- 5xx & 9xx machines have 8 memory slots, 3x0s have 2, and 3x5s have
- only one. You need to add memory in pairs for the 5xx & 9xx machines
- excepting the 520.
- Some highend 5xx's & 9xx's get memory as 2, 4, 4+4 cards.
-
- RS/6000 Models M20, 220, 230 and 250 can use "PS/2" style SIMM memory.
- All have 8 SIMM sockets. 60ns or better is needed for the 250, 70ns
- should be OK in the M20, 220 and 230. The M20, 220 and 230 are limited
- to 64MB of memory, the 250 is limited to 256MB.
-
- 40P, C10, C20, 41T and 42T also user SIMM memory.
-
- G30 & G40 have two memory slots.
- J30, J40, J50, R30, R40, R50 have four memory slots.
- These eight models have cards populated with DIMM-like memory.
-
- 7248 (Old 43P's) and 7043 (New 43P's) use DIMM-like memory.
-
- F40, F50 & H50 use have two memory slots.
-
- S70, S7A & S80 get memory "books".
-
- Still unidentified: E20, E30, F30, B50, H70
-
- Caveat: Do not mix manufacturers or batches in the same memory card/bank.
-
- PS: [Ed's notice] I say DIMM-like memory because it won't even fit on
- my PC's DIMM slots.
-
- ------------------------------
-
- Subject: 5.04: Others
- From: anonymous
-
- IBM RISC System/6000 Interface Products
-
- National Instruments Corporation markets a family of instrumentation
- interface products for the IBM RISC System/6000 workstation family. The
- interface family consists of three products that give the RISC
- System/6000 connectivity to the standards of VMEbus, VXIbus and GPIB.
- For more information, contact National Instruments Corporation,
- 512-794-0100 or 1-800-433-3488.
-
- ------------------------------
-
- Subject: 5.05: C++ compilers
-
- Several C++ compilers are available. You can choose from Glockenspiel,
- Greenhills, IBM's xlC (sold seperately :), and GNU's g++. Glockenspiel
- may now be part of Computer Associates. Comeau Computing
- (718-945-0009) offers Comeau C++ 3.0 with Templates. For a full
- development environment there's ObjectCenter's C++ (formerly Saber
- C++).
-
- ------------------------------
-
- Subject: 5.06: Memory leak detectors
-
- IBM's xlC comes with a product called the HeapView debugger that can
- trace memory problems in C and C++ code.
-
- SENTINEL has full memory access debugging capabilities including detection
- of memory leaks. Contact info@vti.com (800) 296-3000 or (703) 430-9247.
-
- Insight from ParaSoft (818) 792-9941.
- There is also a debug_malloc posted in one of the comp.sources groups.
-
- A shareware dmalloc is available. Details at
- <http://www.letters.com/dmalloc/>.
-
- TestCenter is now available for the RS/6000. It supports AIX 3.2.5
- and AIX 4.1 on POWER, POWER2 and PowerPC machines. More information
- is available from <http://www.centerline.com/>.
-
- Purify (408) 720-1600 is not availible for the RS/6000.
-
- ZeroFault detects memory violations and leaks without recompiling or
- relinking. Works on all RS/6000 systems running AIX 3.2.5 or later,
- DCE and pthreads. Contact The Kernel Group, Inc. +1 512 433 3333,
- email <ZeroFault@tkg.com>, <http://www.tkg.com/>.
-
- ------------------------------
-
- Subject: 5.07: PPP
-
- PPP does not come with AIX 3.2.x (only SLIP).
-
- PPP support was announced for AIX 4.1.4, see:
- <http://www.austin.ibm.com/software/OS/aix414.html>
-
- David Crow caught the announcement of a non-IBM ppp package that
- claims to support AIX 4.x. More information is availible from
- <http://www.thoughtport.com:8080/PPP/> or
- <ftp://dcssoft.anu.edu.au/pub/ppp/ppp-2.2b1.tar.gz>
-
- A comercial PPP for AIX is availible from Morningstar
- (sales@morningstar.com or marketing@morningstar.com) (800) 558 7827.
-
- ------------------------------
-
- Subject: 5.08: Graphics adapters
-
- Abstract Technologies Inc. (Austin TX, 512-441-4040, info@abstract.com)
- has several high performance graphics adapters for the RS/6000.
- 1600x1200, 24-bit true-color, and low cost 1024x768 adapters are
- available. Retail prices are between US$1000-2000.
-
- ------------------------------
-
- Subject: 5.09: Training Courses
-
- Email training@skilldyn.com with "help" in the body of the message for
- information about how to receive a list course descriptions for AIX*
- and/or UNIX* courses offered by Skill Dynamics.
-
- ------------------------------
-
- Subject: 5.10: Hardware Vendors
-
- New & Used RS6000s, peripherals
-
- Core Systems Inc
- 1605 12th Ave
- Seattle WA 98122
- Phone (800) 329-2449
- Fax (206) 329-3799
- <http://www.corsys.com/homeworld>
-
- Optimus Solutions
- 5825-A Peachtree Corners East
- Norcross GA 30092
- Phone 770-447-1951
- Fax 678-291-9201
- email mark@optimussolutions.com
- <http://www.optimussolutions.com/>
-
- ------------------------------
-
- Subject: 5.11: Debugging aides
- From: Curt Finch <curt@tkg.com>
-
- SCTrace reports system calls (and more) made by an AIX process.
- SCTrace from SevOne Software <http://www.tkg.com>. It is $199 and a
- demo is available from <ftp://ftp.tkg.com/pub/sevone/sctrace-demo.tar.Z>.
-
- ------------------------------
-
- Subject: 6.00: Miscellaneous other stuff
-
- Information that defies catagories. ;-)
-
- ------------------------------
-
- Subject: 6.01: Can I get support by e-mail?
-
- In general, no, <aixbugs@austin.ibm.com> and <services@austin.ibm.com>
- are no longer supported.
-
- IBM does maintain a fee based system, the AIX Support Family Services
- at 1-800-CALL-AIX (1-800-225-5249) option 8.
-
- In Canada:
-
- Gary Tomic mentioned that Canadian customers can get support from their
- BBS, cac.toronto.ibm.com at 142.77.253.16.
-
- In Germany:
-
- Thomas Braunbeck reported that German customers with ESS (extended
- software service) contracts can get support by e-mail too. They can
- obtain information by sending mail with Subject: help to
- aixcall@aixserv.mainz.ibm.de.
-
- Various flavors of service offerings are available. Contact your IBM rep
- for details.
-
- ------------------------------
-
- Subject: 6.02: List of useful faxes
-
- You can get some informative faxes by dialing IBM's Faxserver at
- 1-800-IBM-4FAX. 1-415-855-4329 from outside the US. If you're calling
- for the first time, push 3 then 2 to request a list of RS/6000 related faxes.
-
- IBM's AIX Support WWW site,
- <http://service.software.ibm.com/www/support/aix/index.html>,
- contains many of the same documents. Select a country or region from the
- menu, then look for "Technical Tips from IBM" on the returned page.
-
- ------------------------------
-
- Subject: 6.03: IBM's gopher, WWW, aftp presence.
-
- There is now a new section dedicated to AIX on IBM's main web server:
-
- <http://www.ibm.com/servers/aix>
-
- The following are various other resources:
-
- (verified Aug 9 1996 by Frank Wortner)
- Thanks to Ronald S. Woan <woan@austin.ibm.com>
-
- <http://service.software.ibm.com/> (FixDist ptfs)
- <ftp://software.watson.ibm.com/pub/> (rlogin fixes & more)
- <gopher://gopher.ibmlink.ibm.com> (anonouncements & press releases)
- <http://www.austin.ibm.com/> (software, hardware, service & support)
-
- General IBM information like product announcements and press releases
- are available through World Wide Web at <http://www.ibm.com/>.
-
- Specific information on the RISC System/6000 product line and AIX
- (highlights include marketing information, technology White Papers and
- the POWER 2 technology book online before it hits the presses,
- searchable APAR database and AIX support FAX tips online so you don't
- have to type in all those scripts) is available at
- <http://www.austin.ibm.com/>
-
- ------------------------------
-
- Subject: 6.04: Some RS232 hints
- From: graeme@ccu1.aukuni.ac.nz, sactoh0.SAC.CA.US!jak
-
- Q: How do you connect a terminal to the RS232 tty ports when not using
- the standard IBM cable & terminal transposer?
- A: 1- Connect pins 2->3, 3->2, 7->7 on the DB25's
- 2- On the computer side, most of the time cross 6->20 (DSR, DTR).
- Some equipment may require connecting 6, 8, and 20 (DSR, DCD, DTR).
-
- Also, pin 1 (FG) should be a bare metal wire and the cable should be
- shielded with a connection all the way through. Most people don't run
- pin 1 because pins 1 & 7 (SG) are jumpered on many equipment.
-
- When booting from diskettes, the port speed is always 9600 baud. If you
- use SMIT to set a higher speed (38400 is nice) for normal use, remember
- to reset your terminal before booting.
-
- Q: How do you connect a printer to the RS232 tty ports
- A: 1- Connect pins 2->3, 3->2, 7->7 on the DB25's
- 2- On the computer side, loop pins 4->5 (CTS & RTS)
-
-