You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2002/03/21 05:55:34 UTC

cannot built apache-1.3 with -D_GNU_SOURCE

Threaded perl 5.8.0 (still 5.7.3 now) needs to be compiled with 
-D_GNU_SOURCE to get the _struct_crypt right. This breaks apache-1.3 build:

gcc -c  -I../os/unix -I../include   -DLINUX=22 -I/usr/include/db1 
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -O2 -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -D_GNU_SOURCE 
`../apaci` htpasswd.c
htpasswd.c:145: conflicting types for `getline'
/usr/include/bits/stdio.h:103: previous declaration of `getline'
make: *** [htpasswd.o] Error 1

This cannot be fixed in Perl, can this be fixed in apache-1.3?

Building Apache as

CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow 
-D_GNU_SOURCE" \
./configure --enable-shared=max --enable-module=most

p.s. mod_perl-2.0/httpd-2.0 have no such a problem.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Geoffrey Young wrote:
> 
> Stas Bekman wrote:
> >
> > Threaded perl 5.8.0 (still 5.7.3 now) needs to be compiled with
> > -D_GNU_SOURCE to get the _struct_crypt right. This breaks apache-1.3 build:
> 
> can you elaborate on this a bit - I wasn't able to follow all the
> threads on all the lists, but I'm able to build the 1.3 tree just fine
> with 5.7.3 and -Dusethreads...
>

whoops, I spoke too soon... httpd was built two days ago.  right now
bleedperl gives

http_protocol.c:861: conflicting types for `getline'
/usr/include/stdio.h:423: previous declaration of `getline'

which is what you were seeing.  sorry for the waste of bandwidth :)

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Stas Bekman wrote:
> 
> Threaded perl 5.8.0 (still 5.7.3 now) needs to be compiled with
> -D_GNU_SOURCE to get the _struct_crypt right. This breaks apache-1.3 build:

can you elaborate on this a bit - I wasn't able to follow all the
threads on all the lists, but I'm able to build the 1.3 tree just fine
with 5.7.3 and -Dusethreads...

details below...

--Geoff

Server Version: Apache/1.3.24-dev (Unix) mod_perl/1.26_01-dev
Perl/v5.7.3
Server Built: Mar 20 2002 02:00:02

[geoff@mainsheet geoff]$ perl -V
Summary of my perl5 (revision 5.0 version 7 subversion 3 patch 15378)
configuration:
  Platform:
    osname=linux, osvers=2.2.14-5.0, archname=i686-linux-thread-multi
    uname='linux mainsheet.laserlink.net 2.2.14-5.0 #1 tue mar 7
21:07:39 est 2000 i686 unknown '
    config_args='-des -Dusethreads -Dprefix=/src/bleedperl
-Doptimize=-g -Dusedevel -Dinstallusrbinperl -Uversiononly'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2
release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix
-lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
    libc=/lib/libc-2.1.3.so, so=so, useshrplib=false,
libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches:
        DEVEL15372
  Built under linux
  Compiled at Mar 20 2002 22:04:56
  @INC:
    /src/bleedperl/lib/5.7.3/i686-linux-thread-multi
    /src/bleedperl/lib/5.7.3
    /src/bleedperl/lib/site_perl/5.7.3/i686-linux-thread-multi
    /src/bleedperl/lib/site_perl/5.7.3
    /src/bleedperl/lib/site_perl/5.7.2/i686-linux-thread-multi
    /src/bleedperl/lib/site_perl/5.7.2
    /src/bleedperl/lib/site_perl
    .

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Stas Bekman <st...@stason.org>.
damn, sent to the wrong dev list... but still relevant as FYI :)

Stas Bekman wrote:
> Threaded perl 5.8.0 (still 5.7.3 now) needs to be compiled with 
> -D_GNU_SOURCE to get the _struct_crypt right. This breaks apache-1.3 build:
> 
> gcc -c  -I../os/unix -I../include   -DLINUX=22 -I/usr/include/db1 
> -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -O2 -Wall 
> -Wstrict-prototypes -Wmissing-prototypes -Wshadow -D_GNU_SOURCE 
> `../apaci` htpasswd.c
> htpasswd.c:145: conflicting types for `getline'
> /usr/include/bits/stdio.h:103: previous declaration of `getline'
> make: *** [htpasswd.o] Error 1
> 
> This cannot be fixed in Perl, can this be fixed in apache-1.3?
> 
> Building Apache as
> 
> CFLAGS="-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow 
> -D_GNU_SOURCE" \
> ./configure --enable-shared=max --enable-module=most
> 
> p.s. mod_perl-2.0/httpd-2.0 have no such a problem.
> 
> _____________________________________________________________________
> Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
> http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
> mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Doug MacEachern <do...@covalent.net>.
On Sun, 24 Mar 2002, Stas Bekman wrote:
 
> no, this patch documents the problem, not fixing it.

oh.  didn't look close, just assumed, since i don't have any -D_GNU_SOURCE 
in $Config{ccflags}, yet noticed some things in perl were built with it.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> ok, i do have that pesky flag, i didn't see it due to symlink pointing to 
> older perl.  i've applied your patch to Makefile.PL, and a change to 
> Apache::ExtUtils that'll have the same effect as your 
> apaci/mod_perl.config.sh patch. 

cool!

> i'm certain this flag is not required for 
> modperl+apache-1.3.x, as we don't call any of the functions who's 
> prototypes would change and apache-1.3.x isn't multithreaded on linux 
> anyhow.

The -D_GNU_SOURCE was needed to get _crypt_struct right in the threaded 
perl.

I've tested on my side with the latest bleadperl and it works.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Doug MacEachern <do...@covalent.net>.
ok, i do have that pesky flag, i didn't see it due to symlink pointing to 
older perl.  i've applied your patch to Makefile.PL, and a change to 
Apache::ExtUtils that'll have the same effect as your 
apaci/mod_perl.config.sh patch.  i'm certain this flag is not required for 
modperl+apache-1.3.x, as we don't call any of the functions who's 
prototypes would change and apache-1.3.x isn't multithreaded on linux 
anyhow.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> On Thu, 21 Mar 2002, Stas Bekman wrote:
>  
> 
>>This cannot be fixed in Perl, can this be fixed in apache-1.3?
> 
> 
> looks like this has been fixed in Perl:

no, this patch documents the problem, not fixing it.

See the patch I've sent to you and Andreas which crudely solves this in 
mod_perl.

> ____________________________________________________________________________
> [ 15414] By: jhi                                   on 2002/03/22  13:25:17
>         Log: Subject: Re: Change 15398: Assuming the Apache 1.3 -D_GNU_SOURCE problem       
>              From: andreas.koenig@anima.de (Andreas J. Koenig)
>              Date: Fri, 22 Mar 2002 15:16:19 +0100
>              Message-ID: <m3...@anima.de>
>              
>              (plus reformat)
>      Branch: perl
> 	   ! pod/perldelta.pod



-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cannot built apache-1.3 with -D_GNU_SOURCE

Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 21 Mar 2002, Stas Bekman wrote:
 
> This cannot be fixed in Perl, can this be fixed in apache-1.3?

looks like this has been fixed in Perl:

____________________________________________________________________________
[ 15414] By: jhi                                   on 2002/03/22  13:25:17
        Log: Subject: Re: Change 15398: Assuming the Apache 1.3 -D_GNU_SOURCE problem       
             From: andreas.koenig@anima.de (Andreas J. Koenig)
             Date: Fri, 22 Mar 2002 15:16:19 +0100
             Message-ID: <m3...@anima.de>
             
             (plus reformat)
     Branch: perl
	   ! pod/perldelta.pod


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org