Patrick Powell wrote:

>   BAD! Bad Programmer! BAD!  No coffee for you today

[solaris-2.6 :]

> > But still, when I fall back to compiling one arch at a time, it only
> > compiles on linux.  On sun/gcc, it goes :
> >
> >   In file included from include/lp.h:22,
> >                    from common/lpc.c:64:
> >   include/portable.h:265: parse error before "geteuid"
> >   include/portable.h:265: warning: data definition has no type or storage class
> >   In file included from include/lp.h:22,
> >                    from common/lpc.c:64:
> >   include/portable.h:806: conflicting types for `openlog'
> >   /usr/include/syslog.h:23: previous declaration of `openlog'
> >   make[1]: *** [lpc.o] Error 1

NB, line 265 in src/include/portable.h is 

  extern uid_t geteuid (), getegid ();

I have a hunch that this (multiple comma-separated function declarations) 
isn't ANSI....   But never mind, as you wrote:

> In 'portable.h' we have:
> 
> #ifdef HAVE_UNISTD_H
> # include <unistd.h>
> #else
>   extern int dup2 ();
>   extern int execve ();
>   extern uid_t geteuid (), getegid ();
>   extern int setgid (), getgid ();
> #endif
> 
> Check to see if there is a /usr/include/unistd.h file on your
> system.

A more configure-savvy chap here suggested I ran autoconf, to build a new 
configure.  This works better, it now says

  checking for unistd.h... yes

I tried --with-cc=/opt/SUNWspro/bin/cc, works fine! 

But _still_ gcc dies with an "implicit declaration of function `sleep'", and 
yes, my  /usr/include/unistd.h  does contain an extern unsigned sleep(unsigned); 

But after inspecting the gcc -E output from a small test prog, I believe gcc 
insists on using its own sleepless unistd.h:

  $ grep sleep  
/local/gcc-3.0.3/lib/gcc-lib/sparc-sun-solaris2.6/3.0.3/include/unistd.h
  $

Bugger gcc!   Disabling -Werror saves the day again, and as such 
LPRng-3.8.6 now compiles on gcc-3.0.3 too.


> > On alpha:
> 
> What are you running on the Alpha?  Linux?

No, as I said,

> > I have tried for linux (redhat 6.2/gcc version egcs-2.91.66), solaris 2.6
> > (both gcc version 3.0.3  and  "Sun WorkShop 6 update 2 C 5.3 2001/05/15")
> > and alpha (Digital UNIX V4.0G/Digital UNIX Compiler Driver 3.11)

but as you wrote your reply at "06:04:11 -0800 (PST)" and have denied
yourself your coffee, I find it perfectly natural that you missed a 
few details :-)

> >   make[1]: Entering directory `/usit/mikkel/priss_src/PRISS3/LPRng-3.8.6/src'
> >   /usr/bin/cc -I.. -I./include -I./common -std  -std -DHAVE_CONFIG_H 
>[blah-blah-blah]   -c -o lpc.o ./common/lpc.c
> >   cc: Warning: /usr/include/sys/types.h, line 127: In this declaration, the same 
>type specifier occurs more than once. (duptypespec)
> >   typedef unsigned long   size_t;
> >   --------^
>
> I have seen this before,  usually after installing a new version of GCC
> and NOT removing the old one first.

NO repeat NO :-), this isn't gcc.  Again, autoconf is a friend in 
need, it now compiles fine.
 
> You MUST repeat MUST find out what is going on here, or you
> will have other problems on these systems.

Bottom line seems to be that the configure shipped in the tarball
didn't work for these systems.  autoconf on my 3 systems produced
the same configure (more or less), the sun/alpha version can be found
at  http://folk.uio.no/hanspv/lprng-configure-alpha-sun

> > 3.8.1 was reported to work with Mac's, so I guess I'll stick to that
> > for the time being.

Alas, it didn't.  I'll make a separate post about that...


regards,
-- 
Hans Peter       (Unix/printing sysadm, University of Oslo).

-----------------------------------------------------------------------------
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