victor@watson.ibm.com (Victor Miller) (04/17/91)
I've found the secret to building Perl 4.003 on RS/6000 AIX 3.1: use bsdcc as the compiler instead of cc. You can even specify -O (it passes all regression tests.). However, there is one remaining strangeness: If I answer 'y' to the questions "Run make depend now?" in Configure, various errors are detected: all the files that include perly.h cause the compiler to complain about an empty input file. If I try to do a make anyway, the compiler spews out various wierd error messages. If I then try to run makedepend after this, the compiler then complains about perly.h not being found. I then did a make perly.h and then makedepend. All seemed to go well. Doing a make then proceeded normally. Why should running makedepend from within Configure not work properly? Does anyone have any ideas? -- Victor S. Miller Vnet and Bitnet: VICTOR at WATSON Internet: victor@watson.ibm.com IBM, TJ Watson Research Center
victor@watson.ibm.com (Victor Miller) (04/18/91)
The following was pointed out to me: a minor point - the 'bsdcc' stanza is not part of /etc/xlc.cfg by default. it is described in /usr/lpp/bos/bsdport which is shipped to everyone. To clarify this for those who don't know about these AIX'isms (which included me before this morning), AIX has a number of different aliases for the cc command. When invoked, cc looks into /etc/xlc.cfg to find out what default options it should use. If for some reason you don't want to (or can't) install bsdcc, here are the options that it uses (for cc): -H512 -T512 -qlanglvl=extended -qnoro -D_BSD -D_NONSTD_TYPES -D_NO_PROTO -D_BSD_INCLUDES -bnodelcsect -U__STR__ -U__MATH__ -- Victor S. Miller Vnet and Bitnet: VICTOR at WATSON Internet: victor@watson.ibm.com IBM, TJ Watson Research Center
abe@mace.cc.purdue.edu (Vic Abell) (04/18/91)
In article <VICTOR.91Apr17125653@irt.watson.ibm.com>, victor@watson.ibm.com (Victor Miller) writes: > I've found the secret to building Perl 4.003 on RS/6000 AIX 3.1: use > bsdcc as the compiler instead of cc. You can even specify -O (it > passes all regression tests.). Under AIX 3.1 (3003) on my system, using bsdcc to compile Perl 4.0, patch level 3 causes the return value of signal() to be miscast as int. This can be corrected by adding the following to config.h #define _MBI void However, cc can also be used with only a single correction -- the test for casting the return value of sprintf() in config.h needs to be modified. The following diffs illustrate the change: *** perl.h.b4 Wed Apr 17 11:01:32 1991 --- perl.h Wed Apr 17 11:02:22 1991 *************** *** 377,383 **** # define I286 #endif ! #ifndef __STDC__ #ifdef CHARSPRINTF char *sprintf(); #else --- 377,383 ---- # define I286 #endif ! #if !defined(__STDC__) && !defined(_IBMR2) #ifdef CHARSPRINTF char *sprintf(); #else Vic Abell <abe@mace.cc.purdue.edu>
victor@watson.ibm.com (Victor Miller) (04/18/91)
My grumbles about make depend on RS/6000's were ill founded (I shouldn't try to do anything complicated in the morning). I just rebuilt and tested perl-4.003 to test it: the only thing necessary is to use bsdcc as the compiler instead of cc (-O works fine). The compiler's complaints about empty files were about the empty version of perly.h used in the make depend process (unfortunately the compiler's error message leaves much to be desired. It made me think that perl.c was empty, which didn't make me very happy). The compiler also gave warnings about type mismatches in eval.c: ihand = signal(SIGINT, SIG_IGN); eval.c: qhand = signal(SIGQUIT, SIG_IGN); util.c: hstat = signal(SIGHUP, SIG_IGN); util.c: istat = signal(SIGINT, SIG_IGN); util.c: qstat = signal(SIGQUIT, SIG_IGN); Perhaps some casts are needed (things seem to work correctly, but some compilers may be more picky than mine). -- Victor S. Miller Vnet and Bitnet: VICTOR at WATSON Internet: victor@watson.ibm.com IBM, TJ Watson Research Center