bengsig@dkunix9.dk.oracle.com (Bjorn Engsig) (04/09/91)
Frequently Asked Questions - and Answers ======================================== This is the first posting of the list of Frequently Asked Questions - and Answers, in the comp.unix.aix newsgroups. The list is far from complete, and all input is therefore very welcome; please mail such input to me at bengsig@oracle.com. The posting is organized as a digest, so popular newsreader programs should be able to easily look up each item - at least hitting ^G in rn will get you the next one and rn is what I happen to use. You should note that most of this is concerned with AIX v. 3 and the RISC System/6000 computer, i.e. AIX on the PS/2, the 370, and the RT is only covered if specifically noted. Subject: Contents Contents of this list, issue 1: o Is the C environment special in any way? - I cannot make alloca work - How do I compile my BSD programs? - Isn't the linker different from what I am used to? - I get "binder killed by signal 9" when linking my program, why? o The AIX operating system - what is it? - I am used to Unix systems programming, why should I learn SMIT? - What is the Object Database. - How do I get rid of the verbose error messages? o Who has a termcap for the HFT console? Subject: Is the C environment special in any way? Not really. The C compiler has quite a number of options that can be used to control how it works, which "dialect" of C it compiles, how it interprets certain language constructs, etc. InfoExplorer includes a Users' Guide and a Reference Manual. The compiler can be invoked with either xlc to invoke it in ANSI mode and cc to invoke it in RT (i.e. IBM 6150 with AIX 2) compatible mode. The default options for each mode are set in the /ext/xlc.cfg file, and you can actually add another stanza and create a link to the /bin/xlc executable. Subject: I cannot make alloca work A famous routine, in particular in GNU context, is the allocation routine alloca(). Alloca allocates memory in such a way that it is automatically free'd when the block is exited. Most implementations does this by adjusting the stack pointer. Since not all C environments can support it, its use is discouraged, but it is included in the xlc compiler. In order to make the compiler aware that you intend to use alloca, you must put the line #pragma alloca before any other statements in the C source module(s) where alloca is called. If you don't do this, xlc will not recognize alloca as anything special, and you will get errors during linking. Subject: How do I compile my BSD programs? The file /usr/lpp/bos/bsdport contains information on how to port programs written for BSD to AIX 3.1. The contents of this file can actually be very useful for others as well. Subject: Isn't the linker different from what I am used to? Yes. It is not at all like what you are used to: - The order of objects and libraries is normally _not_ important. The linker reads _all_ objects including those from libraries into memory and does the actual linking in one go. Even if you need to put a library of your own twice on the ld command line on other systems, it is not needed on the RS/6000 - doing so will even make your linking slower. - The standard C library /lib/libc.a is linked shared, which means that the actual code is not linked into your program, but is loaded only once and linked dynamically during loading of your program. - The ld program actually calls the socalled binder in /usr/lib/bind, and you can give ld special options to get details about the invocation of the binder. These are found on the ld man page or in InfoExplorer. Subject: I get "binder killed by signal 9" when linking my program, why? Very simple, your paging space is too low. Since the linker is quite different from normal Unix linkers and actually does much more than these, it also uses very much virtual memory. It is not unusual that you need 10000 pages (of 4k) or more to execute a fairly complex linking. 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 you link more than one program at a time? Try linking only one. - 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 objets/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 behaviour of other Unix linkers. Subject: The AIX operating system - what is it? This is best answered by reading the text files in /usr/lpp/bos. The README file there contains general information and the bsdamd file contains useful information if you know BSD and/or SystemV. Subject: I am used to Unix systems programming, why should I learn SMIT? Using SMIT is probably very different from your normal way of doing system administration, but doing it will prove very useful in the long run. In some areas, in particular TCP/IP, NFS, etc., you also have the possibility of doing things the "normal" way, but it is unfortunately difficult to know exactly when the "normal" way works. Again, always using SMIT, is probably your best way to go, even when you have to learn a new tool. What SMIT actually does is to call a large number of specific tools for each part of the system administration. The commands called and the output they produce are stored in the files smit.script and smit.log in your home directory. Looking in smit.script may teach you more about system administra- tion. Subject: What is the Object Database. The Object Database, ODB, stored in /etc/objrepos, is AIX's way of storing all the system management information. Under most circumstances, only SMIT or the commands SMIT call (see above) should be used to change the ODB. The very interested user can use the ODB editor to look in detail into the ODB and even change the ODB. This is, however, strongly discouraged. Subject: How do I get rid of the verbose error messages? Many of the messages from the Unix commands are (will be) available in different languages. This is controlled by the LANG environment with the default En_US, meaning English in the US. All the default messages have a message number associated with them, e.g.: $ cat no-such-file cat: 0652-050 Cannot open no-such file. If you prefer the more normal Unix looking error message, set your environment LANG to C, and you will get: $ cat no-such-file cat: Cannot open no-such file. Subject: Who has a termcap for the HFT console? The console used on the RISC System/6000, the PS/2 and the RT can be used as a terminal on other system with the termcap below. hf|hft|hft-c|ibm8512|ibm8513|IBM_High_Function_Terminal:\ :co#80:li#25:am:ht:\ :cm=\E[%i%d;%dH:ti=\E[25;1H:te=\E[20h:\ :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\ :bs:sf=\E[S:ec=\E[%dX:\ :cl=\E[H\E[J:cd=\E[J:ce=\E[K:\ :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\ :im=\E[4h:ei=\E[4l:mi:\ :dm=\E[4h:ed=\E[4l:\ :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:\ :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ :as=^N:ae=^O:sc=\E[s:rc=\E[u:\ :kl=\E[D:kb=^H:kr=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\ :kn#10:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\ :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\ :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J: Subject: What is missing from this list? Some items have been frequently frequently asked and answered, but I do not have access to that information, since I just used to skip it when it popped up in the newsgroup. I need your input to fill out this. - Where do I get 3rd party hardware? - What is needed to make GNU emacs compile? - How about GNU C? - Problems with X-windows, including X11R4 issues. Subject: Contributors The following persons have been contributing to this list. If you want to contribute anonymously, just let me know - but do tell me who you are. bengsig@oracle.com (Bjorn Engsig) [ I am ordered alphabeticly :-) ] Subject: Epilogue - This list is far from complete, but I need your input to improve it. Please mail all changes to me, and I will acknowledge the receipt. I will not guarantee to pick up posted changes. I do not have a predetermined update rate, but the expiration date is set about two months ahead. - I hate non-domain addresses. If I try to mail to joesmachine!joe and it bounces, I don't care, don't try any uucp path, and don't ask in posting "where is joe". At least, I expect reliable From: or Reply-To: addresses. - I won't mail the FAQ list - if you want it, get access to news. - All input must be E-mailed to me at any of the addresses bengsig@oracle.com or bengsig@dk.oracle.com on the Internet. If you insist on using a uucp address you can use uunet!oracle!bengsig. Subject: Trademarks IBM is a registered trademark and InfoExplorer, RISC System/6000, AIX, PS/2, and RT are trademarks of International Business Machines Corporation. NFS is a trademark of Sun Microsystems. Unix is a registered trademark of AT&T. -- Bjorn Engsig, ORACLE Corporation, Maintainer of FAQ list of comp.unix.aix Internet: bengsig@oracle.com, uucp: uunet!oracle!bengsig
bengsig@dkunix9.dk.oracle.com (Bjorn Engsig) (04/15/91)
The response to this has been overwhelming, and I will post a very updated list as soon as my other workload permits. It will probably be in a week or so. At this point, I only want to remind you all of the subject, in particular the two last words: I am not doing support, only compiling questions _and_ answers. Thank you all, -- Bjorn Engsig, ORACLE Corporation, Maintainer of FAQ list of comp.unix.aix Internet: bengsig@oracle.com, uucp: uunet!oracle!bengsig