Re: compile issue: conflicting types for getline

2003-07-15 Thread Stas Bekman
Stewart, Eric wrote:
	Apologies for duplication - I've discovered some unexpected behavior with the pasting into a W2K session of VPC 6 on Mac 10.2.6 - and then got a little clicky and clicked on the wrong thing. :(

On RedHat Linux 9.0, with Apache 1.3.27, PHP 4.3.2, and mod_perl 1.28, I'm getting a compile error.  These, near as I know, are the latest stable versions of everything - which is why I suspect I'm running into this problem:

make[2]: Entering directory `/usr/local/src/apache_1.3.27/src/support'
gcc -c  -I../os/unix -I../include   -DLINUX=22 -D_REENTRANT -D_GNU_SOURCE 
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  
-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE  `../apaci` htpasswd.c
htpasswd.c:145: conflicting types for `getline'
/usr/include/stdio.h:473: previous declaration of `getline'
make[2]: *** [htpasswd.o] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.27/src/support'
make[1]: *** [build-support] Error 1
make[1]: Leaving directory `/usr/local/src/apache_1.3.27'
make: *** [build] Error 2
I've seen posts that point the finger at mod_perl.  This may be the case as I've 
managed to compile another Apache server without mod_perl on a different system (RH 9 
with PHP).  However, I'm thinking it's more along the lines of a compiler (IOW, 
RedHat's use of gcc 3.2.2) issue.
What I could really use is a solution to get past this point - I'd rather like to avoid 
downgrading either my OS or compiler.  I also kind of need the support tools 
including htpasswd, so skipping them in the compile is highly undesired.  ./configure options or 
even Makefile modifications are preferred.  Code patches are acceptable, even to some extent 
expected, but I'm a lazy systems admin, not a programmer ...
Of course, any assistance at all (as repeated and varied searches on groups.google 
and www.google only verify the problem's existence and have yet to provide a solution) 
is welcome and appreciated.
Not quite a mod_perl problem per se. It's probably perl that includes 
/usr/include/stdio.h. However htpasswd.c's definition is static, so you can 
workaround it by simply doing:

perl -pi -e 's|getline|my_getline|' src/support/*.c

Of course this shouldn't have been a problem in first place, because this 
function is status.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


compile issue: conflicting types for getline

2003-07-10 Thread Stewart, Eric
Apologies for duplication - I've discovered some unexpected behavior with the 
pasting into a W2K session of VPC 6 on Mac 10.2.6 - and then got a little clicky and 
clicked on the wrong thing. :(

On RedHat Linux 9.0, with Apache 1.3.27, PHP 4.3.2, and mod_perl 1.28, I'm getting 
a compile error.  These, near as I know, are the latest stable versions of 
everything - which is why I suspect I'm running into this problem:

make[2]: Entering directory `/usr/local/src/apache_1.3.27/src/support'
gcc -c  -I../os/unix -I../include   -DLINUX=22 -D_REENTRANT -D_GNU_SOURCE 
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  
-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE  `../apaci` htpasswd.c
htpasswd.c:145: conflicting types for `getline'
/usr/include/stdio.h:473: previous declaration of `getline'
make[2]: *** [htpasswd.o] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.27/src/support'
make[1]: *** [build-support] Error 1
make[1]: Leaving directory `/usr/local/src/apache_1.3.27'
make: *** [build] Error 2

I've seen posts that point the finger at mod_perl.  This may be the case as I've 
managed to compile another Apache server without mod_perl on a different system (RH 9 
with PHP).  However, I'm thinking it's more along the lines of a compiler (IOW, 
RedHat's use of gcc 3.2.2) issue.
What I could really use is a solution to get past this point - I'd rather like to 
avoid downgrading either my OS or compiler.  I also kind of need the support tools 
including htpasswd, so skipping them in the compile is highly undesired.  ./configure 
options or even Makefile modifications are preferred.  Code patches are acceptable, 
even to some extent expected, but I'm a lazy systems admin, not a programmer ...
Of course, any assistance at all (as repeated and varied searches on groups.google 
and www.google only verify the problem's existence and have yet to provide a solution) 
is welcome and appreciated.

Eric Stewart - Network Admin - USF Tampa Library - [EMAIL PROTECTED]
SCUBA Diver: 220 Dives  Most Recent: 05/10/03 Chankanaab Park, Cozumel
GeoCacher:58 Found  Most Recent: 07/04/03 GCGBHE - Fun in the Sun
http://www.scubadiving.com/talk/ and http://www.geocaching.com/


Re: compile issue: conflicting types for getline

2003-07-10 Thread Ged Haywood
Hi there,

On Thu, 10 Jul 2003, Stewart, Eric wrote:

 RedHat Linux 9.0, with Apache 1.3.27, PHP 4.3.2, and mod_perl 1.28,
 I'm getting a compile error.  [snip] I'm thinking it's more along
 the lines of a compiler (IOW, RedHat's use of gcc 3.2.2) issue.

It *might* be the compiler, but I doubt it.  I think you might be
running into RH9-related problems, I've had more than enough of them
and I don't even use it on most of my mod_perl boxes...

After I had troubles with 3.2.2 (nothing to do with mod_perl at all) I
upgraded to 3.2.3 which solved the problems.  I never tried to compile
mod_perl with 3.2.2 but I've compiled mod_perl pre-releases (not 1.28
as released) using gcc 3.2.3 no trouble at all.  This was on a system
running Linux 2.5.69, gcc 3.2.3, glibc 2.3.1, perl 5.8.0, Apache 1.3.27
but no PHP.

 I'd rather like to avoid downgrading either my OS or compiler.

Don't do that.  You might want to try upgrading gcc to 3.2.3, cleaning
up your installation and recompiling everything, including Perl.  If it
works that will be useful information, please let me know.

73,
Ged.