I apologize for continuing to talk to myself... ;]
Here's how I've gotten LPRng-3.8.25 to compile on AIX 5.2 (32 bit),
with IBM's supplied GCC 2.9.0 from the Linux Toolkit. Please note that
I'll be testing the binaries in the coming weeks on a large testing
system, and I'll report if I have any additional problems with the
binaries.
When running configure, include the --disable-werror flag.
The following patches must be applied, one to a gcc header, and two
others to correct common files from LPRng. These fix it complaining
where the variable declarations end and the function begins. I'm not
sure why it was so picky.
--- /usr/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/include/stdlib.h.orig
Fri Feb 20 09:16:44 2004
+++ /usr/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/include/stdlib.h Fri
Feb 20 09:17:12 2004
@@ -473,7 +473,7 @@
#else /* use prototypes */
extern float atoff(char *);
extern float strtof(const char *, char **);
- extern int setenv(const char *, const char *, int);
+ extern int setenv(char *, char *, int);
extern void imul_dbl(long, long, long *);
extern void umul_dbl(unsigned long, unsigned long, unsigned long *);
extern int on_exit(void (*)(int, void *), void *);
--- src/common/getqueue.c.orig Tue Feb 3 18:54:11 2004
+++ src/common/getqueue.c Fri Feb 20 10:22:43 2004
@@ -722,10 +722,10 @@
Get_file_image_and_split( hf_name, 0, 0,
&job->info, Line_ends, 1, Option_value_sep,1,1,1,0);
if( &job->info.count ) {
- struct line_list cf_line_list, *datafile;
- Init_line_list(&cf_line_list);
int i;
char *s;
+ struct line_list cf_line_list, *datafile;
+ Init_line_list(&cf_line_list);
if( (s = Find_str_value(&job->info,HFDATAFILES)) ){
Split(&cf_line_list,s,"\001",0,0,0,0,0,0);
--- src/common/lpd_rcvjob.c.orig Tue Feb 3 18:54:12 2004
+++ src/common/lpd_rcvjob.c Fri Feb 20 10:22:53 2004
@@ -1666,11 +1666,11 @@
char *number = Find_str_value( &job->info,NUMBER);
char *file_hostname = Find_str_value(&job->info,FILE_HOSTNAME);
char *s = safestrdup4("cf",priority,number,file_hostname,__FILE__,__LINE__);
- Set_str_value(&job->info,CFTRANSFERNAME,s);
- if(s) free(s); s = 0;
char *datalines = Find_str_value(&job->info,DATAFILES);
char *openname = Find_str_value(&job->info,OPENNAME);
char *transfername = Find_str_value(&job->info,CFTRANSFERNAME);
+ Set_str_value(&job->info,CFTRANSFERNAME,s);
+ if(s) free(s); s = 0;
for( i = 0; i < job->info.count; ++i ){
char *t = job->info.list[i];
int c;
Russell
On Fri, Feb 20, 2004 at 09:26:05AM -0600, Russell Adams wrote:
> Ok, I've modified the includes that came with GCC to match portable.h,
> removing the const from the char * definitions.
>
> Now its actually trying to compile. ;]
>
> New error, new location, and I don't immediately see what the issue
> is.
>
> gcc -I.. -I. -I./include -I./common -g -W -Wall -Wno-unused -g -O2 -g -W -Wall
> -Wno-unused -DHAVE_CONFIG_H -c ./common/getqueue.c -o getqueue.o
> ./common/getqueue.c: In function `Get_hold_file':
> ./common/getqueue.c:727: parse error before `int'
> ./common/getqueue.c:735: `i' undeclared (first use in this function)
> ./common/getqueue.c:735: (Each undeclared identifier is reported only once
> ./common/getqueue.c:735: for each function it appears in.)
> gmake[1]: *** [getqueue.lo] Error 1
> gmake[1]: Leaving directory `/IDX/home/sysadm/rladams/software/LPRng-3.8.25/src'
> gmake: *** [src] Error 2
>
> I've found the line in getqueue.c, which I've listed a portion of below.
>
> Get_file_image_and_split( hf_name, 0, 0,
> &job->info, Line_ends, 1, Option_value_sep,1,1,1,0);
> if( &job->info.count ) {
> struct line_list cf_line_list, *datafile;
> Init_line_list(&cf_line_list);
> int i;
> char *s;
>
> I don't see a problem with the "int i" line, or the ones above
> it. Opening the file with Emacs and color syntax highlighting also
> didn't show any immediately obvious formatting errors.
>
> Any input is appreciated, thanks!
>
> Russell
>
>
> On Wed, Feb 18, 2004 at 02:44:11PM -0600, Russell Adams wrote:
> > Seeing this, what GCC version are you using?
> >
> > I'd rather not modify what came with GCC, especially since its got a
> > big bold warning at the top. ;]
> >
> > Anything else I can do to resolve this?
> >
> > Russell
> >
> > On Wed, Feb 18, 2004 at 12:27:42PM -0500, Rick Cochran wrote:
> > > Russell Adams wrote:
> > > >I copied and pasted that from the original email to show the header
> > > >error.
> > >
> > > Aha!
> > >
> > > Try this:
> > >
> > > # Hmm. The gcc version of stdlib.h in
> > > # /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.1/include/stdlib.h
> > > # is missing the prototype for 'setenv'. Make sure it's there.
> > >
> > > ***
> > > /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.1/include/stdlib.h.orig
> > > T
> > > ue Sep 4 09:49:52 2001
> > > --- /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.0.1/include/stdlib.h
> > > M
> > > on Aug 19 16:19:37 2002
> > > ***************
> > > *** 474,484 ****
> > > --- 474,486 ----
> > > #ifdef _NO_PROTO
> > > extern float atoff();
> > > extern float strtof();
> > > + extern int setenv();
> > > extern void imul_dbl();
> > > extern void umul_dbl();
> > > #else /* use prototypes */
> > > extern float atoff(char *);
> > > extern float strtof(char *, char **);
> > > + extern int setenv(char *, char *, int);
> > > extern void imul_dbl(long, long, long *);
> > > extern void umul_dbl(unsigned long, unsigned long, unsigned
> > > long *);
> > > #endif /* ifdef _NO_PROTO */
> > >
> > >
> > > --
> > > |Rick Cochran phone: 607-255-7618|
> > > |Cornell CIT - Systems & Operations - Net-Print FAX: 607-255-8521|
> > > |730 Rhodes Hall, Ithaca, N.Y. 14853 email: [EMAIL PROTECTED]|
> > >
> > >
> > > -----------------------------------------------------------------------------
> > > 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.
> > -----------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------
> 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.
-----------------------------------------------------------------------------