Subject: Pesky Newbie

From: Thomas Neshite <[email-masked]>
Date: Wed, 23 Jun 1999 11:51:49 -0400 (EDT)

Got 2.5.0. Building on HPUX 10.10.

 Ran "./build CC=gcc hpx"

 Got this result:
---
make args are : 
make opts are :  CC=gcc

Copying Makefiles.

Linking src/config.h

Making support library.
        gcc -Ae -Dunix -O +Onolimit  +DAportable -c authuser.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.
---

Obviously "gcc: +Onolimit: No such file or directory" is, at least,
the initial problem.

Any ideas how to fix this call? I find "+Onolimit" as the "CFLAGS"
in ./support/Makefile . I guess it's passed to the gcc, but then what?

Many thanks,

tjn

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 23 Jun 1999 12:26:03 -0400 (EDT)

> Any ideas how to fix this call? I find "+Onolimit" as the "CFLAGS" in
> ./support/Makefile . I guess it's passed to the gcc, but then what?

I'd suggest attempting to use the HP ANSI C compiler.  gcc does not have
the option flags (+Onolimit +DAportable).  If you want to use gcc you will
need to edit the files to remove those flags; there should be notes about
that somewhere (don't remember where though).

-- 

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

---

From: Thomas Neshite <[email-masked]>
Date: Wed, 23 Jun 1999 14:12:15 -0400 (EDT)

I try to use gcc because it seems like the HPC is brain dead... I
 always get a lot of errors using it. And it holds true in this
 instance... _many_ more errors using hpc (attached below).

 Any idea what the "+Onolimit  +DAportable" options are for? After
 taking them out I get:
 ------------
 Making support library.
        gcc -Ae -Dunix -O   -c authuser.c
*Initialization*:1: missing token-sequence in `#assert'
*** Error exit code 1
----------

-------
*Using hpc

Making support library.
        cc -Ae -Dunix -O +Onolimit  +DAportable -c authuser.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 7000: Model number is unknown; will default to 1.0 code generation. (7000)
        cc -Ae -Dunix -O +Onolimit  +DAportable -c fnmatch.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 7000: Model number is unknown; will default to 1.0 code generation. (7000)
        cc -Ae -Dunix -O +Onolimit  +DAportable -c strcasestr.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 7000: Model number is unknown; will default to 1.0 code generation. (7000)
        cc -Ae -Dunix -O +Onolimit  +DAportable -c strsep.c

---

From: Bob Luckin <[email-masked]>
Date: Wed, 23 Jun 1999 14:04:11 CDT

Thomas Neshite said :-
>  instance... _many_ more errors using hpc (attached below).

As you know, the default C compiler supplied with HP-UX is a cut-down version
suitable for building the kernel, but is non-ANSI compliant.  If you want ANSI
compatibility you have to purchase a license from HP for the full version -
or use something like gcc.  And the WU-FTPD source needs ANSI compatibility.

The options supplied in the makefile are for the full version of the compiler,
which is why it barfs when you only have the default compiler available.

>  Any idea what the "+Onolimit  +DAportable" options are for? After

DAportable tells the compiler to generate code which works on both PA-RISC 1.1
and PA-RISC 2.0 architectures.  You can specify DA<model number> to target
the binary specifically for a certain system.  This gives better performance
on that model, but of course at the expense of not being as portable.

Onolimit tells the compiler not to suppress optimisations which significantly
increase compile-time or memory usage.

I had thought these were still explained in the man page for cc even if the
compiler is not licensed, but perhaps I'm wrong.

>  taking them out I get:

I don't use gcc, but since the -Ae option tells the HP C compiler to use
extended ANSI mode, which includes defining names provided by HP-UX, I doubt
if it has quite the same effect under gcc...  You'd have to check the man
page for GNU C to see if it is doing something useful or not.

I'm sure the question of compiling under gcc for HP-UX has come up before;
you may want to check the mailing list archives (available from the WU-FTPD
Resource Center and possibly elsewhere) to see if there are any useful tips
there.  If/when you do find out what to do, it would also be a good idea to
ask Koos to add it to the FAQ (I assume you checked that before posting).

                    FAQ :- http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
WU-FTPD Resource Center :- http://www.landfield.com/wu-ftpd/

Good luck !

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "Coder, adapt.  FTP Ada, redo C"
                                 [http://www.dhc.net/~luckin/palindromes.html]

---

From: Koos van den Hout _U nix and we all_ <[email-masked]>
Date: Wed, 23 Jun 1999 21:17:11 +0200

> which is why it barfs when you only have the default compiler available.

Time for a version of the Makefile(s) for gcc ?

> ask Koos to add it to the FAQ (I assume you checked that before posting).

This information would be very usefull for the faq indeed.

                                      Koos van den Hout

-- 
 Koos van den Hout                    Expertisecentrum Cetis http://cetis.nl/
 [email-masked] (Work)                     Workphonenumber: +31-30-2586287
 [email-masked] (Home)                   Workfaxnumber: +31-30-2586290
 http://web.cetis.hvu.nl/~koos/  PGP keyid RSA/1024 0xCA845CB5 via keyservers

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 23 Jun 1999 15:28:47 -0400 (EDT)

> Time for a version of the Makefile(s) for gcc ?

The number of times this has come up in the past few months, I'd say the
daemon should switch to using gcc by default on HP/UX with notes about how
to use the for-pay compiler placed in the Makefiles.  either way we're
goning to have questions, but if we go toward gcc, I think we'll have a
few less.

> This information would be very usefull for the faq indeed.

For the past couple of months, HP/UX questions have come up a bit more
often than usual.

--

---

From: "James B. Byrne" <[email-masked]>
Date: Thu, 24 Jun 1999 13:07:16 -0400

> For the past couple of months, HP/UX questions have come up a bit more

Several things to be aware of with gcc.

1.	GCC 2.8.1 has never been ported to HP-UX 11 properly.  People that 
I have corresponded with that use GCC on the HP seem to favour 2.7.2. 
 My problems with getting BeroFTPD built and operating under HP-UX 11 
may have been related to the fact that I was using 2.8.1.

2.	GCC has been turned over to the EGCS people for future development 
and the two products (gcc and egcs) are being rolled together for the 
next general release (gcc 2.95) due out RSN.  In consequence there 
have been no generally available changes or bug fixes to 2.8.1 since 
March 1998 as far as I am aware.

3.	HP-UX 11 is still not a supported platform for GCC 2.95 (as of 
today, it might have changed since I started writing this).]

Regards,
Jim

--
James B. Byrne                      [email-masked]
Harte & Lyne Limited                http://www.harte-lyne.ca
9 Brockley Drive       
Hamilton, Ontario                   fax:+1 905 561 0757
Canada    L8E 3C3                   vox:+1 905 561 1241