Subject: Compiler error messages with HP-UX GCC

From: [email-masked] (Ingar Cheung)
Date: Wed, 19 Aug 1998 16:26:38 -0500

I have attempted to compile WU-FTPD 2.4.2 beta 18 on a HP-UX 10.10 system with 
little success.   I found out  that the cc compiler that comes with HP is crap 
and I am attempting to compile with the gcc compiler.    Here are my errors 
messages.    Help!   Can someone assist?

Thanks,
[email-masked]

# ./build CC=gcc hpx
make args are :
make opts are :  CC=gcc
 
Linking Makefiles.
 
Making support library.
        gcc -O   -c fnmatch.c
        gcc -O   -c strcasestr.c
        gcc -O   -c strsep.c
        gcc -O   -c getusershell.c
        gcc -O   -c snprintf.c
        rm -f libsupport.a
        ar cq libsupport.a fnmatch.o strcasestr.o strsep.o getusershell.o 
snprin
tf.o
        touch libsupport.a
 
Making ftpd.
        gcc -Aa -Dunix -D_HPUX_SOURCE -O +Onolimit -I.. -I../support 
+DAportable
  -c ftpd.c
gcc: +Onolimit: No such file or directory
gcc: +DAportable: No such file or directory
*Initialization*:1: missing token-sequence in `#assert'
In file included from /usr/include/hpsecurity.h:22,
                 from ftpd.c:249:
/usr/include/values.h:27: warning: `MAXINT' redefined
/opt/gcc/lib/gcc-lib/hppa1.0-hp-hpux10.10/2.7.2.1/include/sys/param.h:45: 
warnin
g: this is the location of the previous definition
*** Error exit code 1
 
Stop.
 
Making ftpcount.
        gcc -Aa -Dunix -D_HPUX_SOURCE -O +Onolimit -I.. -I../support 
+DAportable
  -o ftpcount ftpcount.c vers.o ../support/libsupport.a -lsec
gcc: +Onolimit: No such file or directory
gcc: +DAportable: No such file or directory
gcc: vers.o: No such file or directory
*Initialization*:1: missing token-sequence in `#assert'
*** Error exit code 1
 
Stop.
 
Making ftpshut.
        gcc -Aa -Dunix -D_HPUX_SOURCE -O +Onolimit -I.. -I../support 
+DAportable
  -o ftpshut ftpshut.c vers.o ../support/libsupport.a -lsec
gcc: +Onolimit: No such file or directory
gcc: +DAportable: No such file or directory
gcc: vers.o: No such file or directory
*Initialization*:1: missing token-sequence in `#assert'
*** Error exit code 1
 
Stop.
 
Making ckconfig.
        gcc -Aa -Dunix -D_HPUX_SOURCE -O +Onolimit -I.. -I../support 
+DAportable
  -o ckconfig ckconfig.c
gcc: +Onolimit: No such file or directory
gcc: +DAportable: No such file or directory
*Initialization*:1: missing token-sequence in `#assert'
*** Error exit code 1
 
Stop.
 
Links to executables are in bin directory:
size:  bin/ftpd:  cannot open
size:  bin/ftpcount:  cannot open
size:  bin/ftpshut:  cannot open
size:  bin/ftpwho:  cannot open
size:  bin/ckconfig:  cannot open
Done

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 19 Aug 1998 18:17:23 -0400 (EDT)

> *Initialization*:1: missing token-sequence in `#assert'

First, make sure you're really using gcc.  Second, it looks like simply
switching the compiler won't do.  You'll need to modify the options given
to the compiler ( +Onolimit and +DAportable look like HP/UX cc options not
gcc options).  The problem with #assert leads me to think you're not using
an ANSI C compiler (gcc).  Beyond that, I cannot help since I don't try
compiling the daemon on HP/UX.

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Christopher Caldwell <[email-masked]>
Date: Wed, 19 Aug 1998 18:30:36 -0400

Gregory is correct.

-Aa is a directive for HP's C/ANSI C compiler, that says
<SNIP man cc>
 Compile under ANSI mode (ANSI programming
language C standard ISO 9899:1990).  When
compiling under ANSI mode, the header files
would define only those names (macros and
typedefs) specified by the Standard. To access
macros and typedefs that are not defined by the
ANSI Standard but are provided by the HPUX
Operating System, define the symbol
_HPUX_SOURCE; or use the extension option
described below.

Your mileage *should* vary with gcc.  A man gcc should tell you which
compiler options are legal for gcc.

---

From: "James B. Byrne" <[email-masked]>
Date: Thu, 20 Aug 1998 16:50:09 -0400

On 19 Aug 98, at 16:26, Ingar Cheung wrote:

<color><param>7F00,0000,0000</param>> 

> I have attempted to compile WU-FTPD 2.4.2 beta 18 on a HP-UX 10.10 system

> with little success.   I found out  that the cc compiler that comes with

> HP is crap and I am attempting to compile with the gcc compiler.    Here

> are my errors messages.    Help!   Can someone assist?

</color>The C that ships with HP-UX is a full featured K&R compliant C. 
 However wu-ftpd requires an ANSI C compiler which the HP 
bundled C is not.  You can get a free ANSI C compiler (gcc) 
from GNU at any of their mirror sites such as 
ftp://ftp.cs.ubc.ca/mirror2/gnu/ .

The HP-UX C can be used to bootstrap build gcc.  It is 
certainly powerful and robust enough to build HP-UX itself.

Regards,

Jim

'tis a poor workman that blames his tools.

<nofill>
---
James B. Byrne                Harte & Lyne Limited
vox: +1 905 561 1241          9 Brockley Drive
fax: +1 905 561 0757          Hamilton, Ontario
mailto:[email-masked]  Canada L8E 3C3