Re: [OT] EAPI strangeness
On Tue, 4 Jun 2002, Matt Sergeant wrote: > OK, I'm applying the following diff. Does it make sense to you? (I'm > completely lost as to why I need to do this, so any guidance is most > welcome!) looks right to me. same issues that have been plaguing modperl itself ever since 5.6.0 was released. the largefile flags change the sizeof(request_rec), so everything that dereferences the request_rec must be compiled with or without these flags. normally the issue is just between modperl and apache, but since axkit extends with xs and dereferences request_rec, if the lfs flags were ripped out when building modperl, they must also be ripped out when building axkit. this is likely only the case when modperl is built with USE_APXS. when modperl is linked static or USE_DSO=1 and modperl compiles apache, the lfs flags are added to the apache build to avoid the size mismatches. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] EAPI strangeness
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 04 June 2002 12:25 am, Doug MacEachern wrote: > On Tue, 4 Jun 2002, Matt Sergeant wrote: > > Seems to be I think - but then this isn't a bug I've been able to > > replicate. I asked the person to try recompiling with an explicit -DEAPI > > and it made no difference. AxKit uses Apache::src to get the headers and > > CFLAGS. > > > > Does the request_rec contents make any sense to you? It doesn't seem to > > be a subrequest, yet per_dir_config is null... > > actually, this looks related to largefiles. you might need to do > something like: > > #from modperl-2.0/lib/Apache/Build.pm > use Config; > > sub strip_lfs { > my($cflags) = @_; > return $cflags unless $Config{uselargefiles}; > my $lf = $Config{ccflags_uselargefiles} > > || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'; > > $cflags =~ s/$lf//; > $cflags; > } > > WriteMakefile(CFLAGS => strip_lfs($Config{cflags}, ...); > > sadly, this would also need to be conditional. doing it unless > $Apache::MyConfig::Setup{PERL_USELARGEFILES} == 1 > > either that or have the user rebuild perl with -Uuselargefiles > > yes, it is a bloody nightmare. OK, I'm applying the following diff. Does it make sense to you? (I'm completely lost as to why I need to do this, so any guidance is most welcome!) Index: Makefile.PL === RCS file: /home/cvs/xml-axkit/Makefile.PL,v retrieving revision 1.6 diff -b -u -r1.6 Makefile.PL - --- Makefile.PL 2 Apr 2002 16:27:53 - 1.6 +++ Makefile.PL 3 Jun 2002 23:43:44 - @@ -50,6 +50,7 @@ } require Apache::src; +require Apache::MyConfig; my $xml_parser_found = 0; @@ -229,6 +230,10 @@ my %prereq_pm = %{delete $config{PREREQ_PM}||{}}; +unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES} == 1) { +$config{CFLAGS} = strip_lfs($config{CFLAGS}); +} + foreach my $k (keys %config) { push @ARGV, "$k=$config{$k}"; } @@ -274,6 +279,14 @@ else { $RUNNING_UNDER_CPAN = $ENV{RUNNING_UNDER_CPAN} || 0; } +} + +sub strip_lfs { +my($cflags) = @_; +return $cflags unless $Config{uselargefiles}; +my $lf = $Config{ccflags_uselargefiles} || '-D_LARGEFILE_SOURCE - -D_FILE_OFFSET_BITS=64'; +$cflags =~ s/$lf//; +$cflags; } sub rm_f { - -- <:->get a SMart net -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE8+/+xVBc71ct6OywRAiv2AJ4jDIhVYba3PMdWkkfh0qr+KqDZJwCgmYPY tHC1+HGWA1LnxkZhlWvXx+o= =w73O -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] EAPI strangeness
On Tue, 4 Jun 2002, Matt Sergeant wrote: > Seems to be I think - but then this isn't a bug I've been able to replicate. I > asked the person to try recompiling with an explicit -DEAPI and it made no > difference. AxKit uses Apache::src to get the headers and CFLAGS. > > Does the request_rec contents make any sense to you? It doesn't seem to be a > subrequest, yet per_dir_config is null... actually, this looks related to largefiles. you might need to do something like: #from modperl-2.0/lib/Apache/Build.pm use Config; sub strip_lfs { my($cflags) = @_; return $cflags unless $Config{uselargefiles}; my $lf = $Config{ccflags_uselargefiles} || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'; $cflags =~ s/$lf//; $cflags; } WriteMakefile(CFLAGS => strip_lfs($Config{cflags}, ...); sadly, this would also need to be conditional. doing it unless $Apache::MyConfig::Setup{PERL_USELARGEFILES} == 1 either that or have the user rebuild perl with -Uuselargefiles yes, it is a bloody nightmare. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] EAPI strangeness
On Mon, 3 Jun 2002, Matt Sergeant wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Sorry for the off topic post, but I'm not sure where else to post... > > Has anyone here ever seen "bugs" with requests on an EAPI enabled Apache where > r->per_dir_config is NULL? I haven't managed to replicate the bug yet, but a > number of AxKit users are seeing segfaults with EAPI enabled Apache's on > directory requests when I try and do ap_get_module_config(r->per_dir_config, > &XS_AxKit) (it segvs because ap_get_module_config is a macro that tries to > expand the per_dir_config). was axkit compiled with the eapi flags? -DEAPI or something i think. it should be if axkit is using the Apache::src stuff to get cflags from apxs. and it needs to be compiled with the eapi flags. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]