[comp.unix.aix] Problems with compiling sources.

jessea@dynasys.UUCP (Jesse W. Asher) (10/12/90)

I'm trying to help someone compile programs such as elm, bnews, rn, etc.
in order to get him on the net.  He has an RS/6000 and he's not familiar
with C and I'm not familiar with AIX.  Is there some kind of mode that I
can use with cc in order to compile this stuff easier (I'm thinking in
terms of non-ansi compliant mode)?  Can anyone give me some tips on
compiling the above software.  I tried elm and got the following error
message right away:

	cd src; /bin/make - all
	cc  -O -I../hdrs    -c addr_util.c
       45 |      *strchr(), *strcpy(), *strcat(), *strncpy();
    1506-041: (S) Parameter list cannot contain fewer parameters than required by macro  definition.

1254-004  The error code from the last failed command is 1.
Make Quitting.

1254-004  The error code from the last failed command is 1.
Make Quitting.


I would appreciate any help with this.  Also, I didn't find a localize
script for aix in the bnews package.  What should I use instead or
does anyone out there have one?  Thanx again.


---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---
      Jesse W. Asher                             Phone: (901)382-1609 
               6196-1 Macon Rd., Suite 200, Memphis, TN 38134
                UUCP: {fedeva,chromc,rutgers}!dynasys!jessea
 -> Condense soup, not books.

bengsig@oracle.nl (Bjorn Engsig) (10/15/90)

Article <614@dynasys.UUCP> by jessea@dynasys.UUCP (Jesse W. Asher) says:
|
|	cd src; /bin/make - all
|	cc  -O -I../hdrs    -c addr_util.c
|       45 |      *strchr(), *strcpy(), *strcat(), *strncpy();
|    1506-041: (S) Parameter list cannot contain fewer parameters than required by macro  definition.
This result from the redeclaration of in your source of strXXX() routines.
Since strcpy (and one or two more) is a macro with two arguments, you (i.e. elm)
shouldn't redeclare them.  This is totally allowed by the ANSI C standard BTW.
-- 
Bjorn Engsig,         E-mail: bengsig@oracle.com, bengsig@oracle.nl
ORACLE Corporation    From IBM: auschs!ibmaus!cs.utexas.edu!uunet!oracle!bengsig

            "Stepping in others footsteps, doesn't bring you ahead"

tif@doorstop.austin.ibm.com (Paul Chamberlain) (10/16/90)

In article <614@dynasys.UUCP> jessea@dynasys.UUCP (Jesse W. Asher) writes:
>Is there some kind of mode that I
>can use with cc in order to compile this stuff easier
>...
>       45 |      *strchr(), *strcpy(), *strcat(), *strncpy();
>    1506-041: (S) Parameter list cannot contain fewer parameters than required ...

Specifically, this message is because of some whiz-bang stuff to speed up
string operators.  You can #undef the string functions or remove the
declarations from the code.  Seems like there is a -U__STR__ or something ...

Some things have compiled easier for me with -D_NO_PROTO  but I don't
know if that is an "official" method.

Paul Chamberlain | I do NOT represent IBM.     tif@doorstop, sc30661 at ausvm6
512/838-7008     | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif

carl@diemen.utas.edu.au (Carl Lewis) (10/16/90)

Jesse Asher writes :
>I'm trying to help someone compile programs such as elm, bnews, rn, etc.
>in order to get him on the net.  He has an RS/6000 and he's not familiar
>with C and I'm not familiar with AIX.  Is there some kind of mode that I
>can use with cc in order to compile this stuff easier (I'm thinking in
>terms of non-ansi compliant mode)?  Can anyone give me some tips on
>compiling the above software.  I tried elm and got the following error
>message right away:

>    cd src; /bin/make - all
>    cc  -O -I../hdrs    -c addr_util.c
>       45 |      *strchr(), *strcpy(), *strcat(), *strncpy();
>    1506-041: (S) Parameter list cannot contain fewer parameters than required by macro  definition.

>1254-004  The error code from the last failed command is 1.
>Make Quitting.

>1254-004  The error code from the last failed command is 1.
>Make Quitting.

I'm trying to compile ELM at the moment myself. the work around for the first
problem is to use -U__STR__ as an arguement to cc .
This undefines a variable which tells the compiler to do inline 
substitution of strcpy() and another function. Unfortunately the 
substitutions won't compile (at least with reasonble cc arguements :-)

Unfortunately your troubles don't end there.
You'll probably need to use cc (bsdcc) with the suggested 
    -B/lib/ -tp
arguements for most of the source , but without them for one or
two other programs in the ELM suite.

Then .. (Taking a deep breath :-)
You get to the bit where you find out that the tgetent() call in 
curses.c doesn't work . I'm currently trying to find a reasonble work
around at the moment . If any one out there nows why the tgetent() call
seems to be braindead but the underlying setupterm() call seems to work fine,
please, please let me know.


>I would appreciate any help with this.  Also, I didn't find a localize
>script for aix in the bnews package.  What should I use instead or
>does anyone out there have one?  Thanx again.


>---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---*---
>      Jesse W. Asher                             Phone: (901)382-1609 
>               6196-1 Macon Rd., Suite 200, Memphis, TN 38134
>                UUCP: {fedeva,chromc,rutgers}!dynasys!jessea
> -> Condense soup, not books.

Carl Lewis , Programmer with ...

Snail:  Computer Science Dept., University of Tasmania,
        GPO Box 252C, Hobart, TAS, 7001, Australia.
AARN : carl@tasis.eecs.utas.edu.au
FAX  :  (002) 202913
Phone:  (002) 202919