I had the same problem with va_list on my Compaq systems. It's a GCC bug though,
not LPRng related (it breaks all sorts of programs compiling.) I fixed it with
the following change to
/usr/local/lib/gcc-lib/alphaev5-dec-osf4.0e/2.95.2/include/va-alpha.h:

---------------------------------------------------------------------------
*** va-alpha.h.orig     Wed Sep 20 16:57:39 2000
--- va-alpha.h  Wed Sep 20 16:57:02 2000
***************
*** 30,39 ****
--- 30,41 ----
  #if !defined(__GNUC_VA_LIST_1) && (defined (_STDARG_H) || defined
(_VARARGS_H))
  #define __GNUC_VA_LIST_1

+ #if !defined(_VA_LIST)
  #define _VA_LIST
  #define _VA_LIST_

  typedef __gnuc_va_list va_list;
+ #endif

  #if !defined(_STDARG_H)
---------------------------------------------------------------------------

The other problem I'm having is that there is no declaration of the flock()
function. So that causes a compiler warning and a failure to compile. I've
"fixed" that by adding three lines to the /usr/include/sys/file.h include file.
They are:

---------------------------------------------------------------------------
#ifdef _ANSI_C_SOURCE
extern int flock __((int,int));
#endif
---------------------------------------------------------------------------

The funny thing is that there is no error/warning when compiling LPRng-3.6.22.
So why is there a warning with LPRng-3.7.4???

I also had to add the -DAES_SOURCE to the CFLAGS in the configure script as I
had to for ifhp-3.4.4. Without that the setenv/unsetenv functions are not
declared and so cause a compiler warning which stops the build process.

So with AES_SOURCE, va_list, and flock fixed, LPRng-3.7.4 now compiles cleanly
on my Compaq Tru64 V4.0E system. I have not tried it yet so I have do idea if it
works :-)

- Justus





John Perkins <[EMAIL PROTECTED]> on 01/08/2001 12:49:55

Please respond to [EMAIL PROTECTED]


To:   [EMAIL PROTECTED]
cc:    (bcc: Justus J. Addiss/HI-Healthinfo/3M/US)
Subject:  Re: LPRng: ifhp-3.4.4 fails to compile due to IPV6 code



> > 1.  Disable the -Werror flag in src/Makefile.  It will bitch about setenv()
> > and unsetenv() declarations as well as va_list definitions throughout the
> > build.
>
> Now THIS I want to see.  Could you please send me a sample of output
> with the -Werror enabled and also -Werror disable (removed).

This is the sort of error I see when building ifhp (or LPRng, for that matter)
on the alpha platform.

gcc -g -Wall -g -O2 -g -Wall -Wall -DHAVE_CONFIG_H -I. -I.. -I.
-DIFHP_CONF=\"
/s/lprng-3.7/etc/ifhp.conf\" -DLOCALEDIR=\"/s/lprng-3.7/share/locale\"   -c -o
i
fhp.o ifhp.c
In file included from /s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.
0
f/2.95.2/include/stdarg.h:36,
                 from portable.h:556,
                 from ifhp.h:27,
                 from ifhp.c:14:
/s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.0f/2.95.2/include/va-a
l
pha.h:36: warning: redefinition of `va_list'
/s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.0f/2.95.2/include/va_l
i
st.h:7: warning: `va_list' previously declared here
ifhp.c: In function `main':
ifhp.c:92: warning: implicit declaration of function `unsetenv'

gcc -g -Wall -g -O2 -g -Wall -Wall -DHAVE_CONFIG_H -I. -I.. -I.
-DIFHP_CONF=\"
/s/lprng-3.7/etc/ifhp.conf\" -DLOCALEDIR=\"/s/lprng-3.7/share/locale\"   -c -o
t
extps.o textps.c
In file included from /s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.
0
f/2.95.2/include/stdarg.h:36,
                 from portable.h:556,
                 from textps.c:51:
/s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.0f/2.95.2/include/va-a
l
pha.h:36: warning: redefinition of `va_list'
/s/gcc-2.95.2/alpha_dux40f/lib/gcc-lib/alphaev5-dec-osf4.0f/2.95.2/include/va_l
i
st.h:7: warning: `va_list' previously declared here
textps.c: In function `main':
textps.c:266: warning: implicit declaration of function `unsetenv'


>From what I can see, we've got a replacement va_list.h with a duplicate
va_list typedef in it; I'll have to talk to our GCC maintainer about that one.

The implicit declaration of unsetenv can't be blamed on my screwy compiler
setup, though.  :)

> But I have one also:
>
> LPRng/src/common/linksupport.c:inet_ntop()
>
> I am wondering if we have a problem with the order of the calls
> in the liblpr library.
>
> Try using:
>   nm liblpr.a |grep inet_ntop
>
> this will tell you if it is present.  If it is,  and is not
> being found by the linker,  then you have linker problems.  I
> suspect you may need to use the 'ar' facility to build a
> library file index.

Yes, your compatibility library does have those functions in it.

Now, why doesn't LPRng-3.7.4 >INSTALL< that library?  LPRng-3.7.4 doesn't put
it in any of the install directories, and ifhp-3.4.4's configure program
doesn't go looking for it.  Nor is there any mention of it in any of this
library in the ifhp-3.4.4 distribution.

--
============================================================================
   John Perkins                 |   University of Wisconsin-Madison
   Associate Researcher         |   Department of Computer Science
   [EMAIL PROTECTED]        |   1210 W. Dayton St.
   608-262-0438/608-262-9997 FAX  |   Madison, WI  53706-1685
============================================================================




-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------







-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to