You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by J b <mo...@yahoo.com> on 2004/05/13 21:56:10 UTC
building 64-bit
Hello list,
Long time lurker, first time poster. I'm trying (and I think I've
succeeded) to build mod_perl 1.3.29 64-bit with apache 1.3.31 on
Solaris 8. Perl 5.8.4 compiled 64-bit successfully. The problem I'm
having is that modperl's Makefile.PL mutilates the CFLAGS that perl
built with. Specifically, it replaces commas with spaces, as seen
here (line 537):
if($PERL_EXTRA_CFLAGS) {
$PERL_EXTRA_CFLAGS = join(" ", split(",",
$PERL_EXTRA_CFLAGS));
$PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
}
Googling turned up: http://mathforum.org/epigone/modperl/yandqueube
Does it really need to do this? No offense, but it appears to be a
rather inelegant way to replace commas, so it screams "last-minute
hack fix" that has lived on a for a year and half.
The problem is that there is specific flag we built perl with,
"-Wa,xarch=v9", which gets turned into "-Wa xarch=v9", which makes
gcc rather unhappy:
======== Error Output for sanity check ========
cd ..; gcc -DSOLARIS2=280 -DNO_DBM_REWRITEMAP -DMOD_PERL
-DUSE_PERL_SSI -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNO_DL_NEEDED -mcpu=v9
-m64 -mcpu=v9 -m64 -Wa -xarch=v9 -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 `./apaci` -I.
-I/usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/CORE -m64
-o helpers/dummy helpers/dummy.c -lsocket -lnsl -lpthread
-L/usr/local/lib -m64
/usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/auto/DynaLoader/DynaLoader.a
-L/usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/CORE -lperl
-lsocket -lnsl -ldl -lm -lc
gcc: language arch=v9 not recognized
gcc: language arch=v9 not recognized
ld: fatal: file helpers/dummy.c: unknown file type
ld: fatal: File processing errors. No output written to helpers/dummy
collect2: ld returned 1 exit status
make: *** [dummy] Error 1
============= End of Error Report =============
I commented out those 4 lines in Makefile.PL, rather than try to
figure out what it was trying to do, built it, and all tests passed.
That said, the reason we're building it 64-bit is because we need
MySQL 64-bit (because of some insanely large self-joins and other
madness), and DBD::mysql won't build with 64-bit mysql libraries with
a 32-bit perl. So maybe the real solution is a 32-bit DBD::mysql but
a 64-bit mysqld -- we'll try that next, but I figured I'd ask if
there's a reason for this mod_perl craziness in case we're stuck with
64-bit everything.
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: building 64-bit
Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> Stas Bekman <st...@stason.org> writes:
>
> [...]
>
>
>>It should be possible to automate this search by getting cvs version bumped up
>>incrementally and grepping for that split line, untill the change is
>>found. It'd be a nice addition to our toolset.
>
>
> What's wrong with cvs annotate here?
It does the trick, thanks Joe!
--
__________________________________________________________________
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: building 64-bit
Posted by Stas Bekman <st...@stason.org>.
J b wrote:
> Well, I looked through the old code (manually, like an archeologist),
> and it goes way, way, way back to version 1.2 (6 years, 4 months
> ago):
>
> http://cvs.apache.org/viewcvs.cgi/modperl/Makefile.PL?r1=1.2&r2=1.3&diff_format=h
>
> First seen here on line 294 as:
> $EXTRA_CFLAGS .= join(" ", split(",", " $PERL_EXTRA_CFLAGS"))
> if $PERL_EXTRA_CFLAGS;
>
> A subsequent checkin, 1.4, changes it to the form we see today. It
> was the first revision to actually set $PERL_EXTRA_CFLAGS to
> something, apparently relating to expiremental features. Revision
> 1.144 just moves that block around.
>
> Unfortunately I couldn't find any mailing list traffic for January,
> 1998, and the log messages aren't terribly helpful either.
>
> The problem is that as of 1.160, $PERL_EXTRA_CFLAGS gets set to
> include $Config::Config{ccflags}, which may contain all sorts of
> crazy strings that wasn't taken into account at 1.2.
>
> As to the question about the flag causing this mess, "-Wa,xarch=v9",
> I don't think it's an absolute requirement for 64-bit, but I believe
> it's added for you if you build perl on solaris sparcv9 64-bit.
I think it's reasonable that we remove that code. And if that breaks something
we will fix it and document why we did that. I've committed that removal change.
--
__________________________________________________________________
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: building 64-bit
Posted by J b <mo...@yahoo.com>.
Well, I looked through the old code (manually, like an archeologist),
and it goes way, way, way back to version 1.2 (6 years, 4 months
ago):
http://cvs.apache.org/viewcvs.cgi/modperl/Makefile.PL?r1=1.2&r2=1.3&diff_format=h
First seen here on line 294 as:
$EXTRA_CFLAGS .= join(" ", split(",", " $PERL_EXTRA_CFLAGS"))
if $PERL_EXTRA_CFLAGS;
A subsequent checkin, 1.4, changes it to the form we see today. It
was the first revision to actually set $PERL_EXTRA_CFLAGS to
something, apparently relating to expiremental features. Revision
1.144 just moves that block around.
Unfortunately I couldn't find any mailing list traffic for January,
1998, and the log messages aren't terribly helpful either.
The problem is that as of 1.160, $PERL_EXTRA_CFLAGS gets set to
include $Config::Config{ccflags}, which may contain all sorts of
crazy strings that wasn't taken into account at 1.2.
As to the question about the flag causing this mess, "-Wa,xarch=v9",
I don't think it's an absolute requirement for 64-bit, but I believe
it's added for you if you build perl on solaris sparcv9 64-bit.
--- Joe Schaefer <jo...@sunstarsys.com> wrote:
> Stas Bekman <st...@stason.org> writes:
>
> [...]
>
> > It should be possible to automate this search by getting cvs
> version bumped up
> > incrementally and grepping for that split line, untill the change
> is
> > found. It'd be a nice addition to our toolset.
>
> What's wrong with cvs annotate here?
>
> gemini:~/src/apache/modperl$ cvs annotate Makefile.PL | grep
> PERL_EXTRA_CFLAGS
>
> Annotations for Makefile.PL
> ***************
> 1.174 (dougm 23-Dec-00): $PERL_EXTRA_CFLAGS = "";
> 1.4 (hartill 10-Feb-98): $PERL_EXTRA_CFLAGS .= "
> -D${k}=1";
> 1.86 (dougm 28-Aug-98): $PERL_EXTRA_CFLAGS .= "
> -D$_=1";
> 1.81 (dougm 30-Jul-98): $PERL_EXTRA_CFLAGS .= "
> -DPERL_SAFE_STARTUP=1";
> 1.201 (dougm 23-May-02): $PERL_EXTRA_CFLAGS .= "
> $Config{ccflags}";
> 1.201 (dougm 23-May-02): $PERL_EXTRA_CFLAGS =~
> s/-D_GNU_SOURCE//;
> 1.144 (dougm 07-Mar-00): if($PERL_EXTRA_CFLAGS) {
> 1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS =
> join(" ", split(",", $PERL_EXTRA_CFLAGS));
> 1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS =~
> s/\s+/ /g;
> 1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS .= "
> -g";
> 1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS .= "
> -DPERL_DESTRUCT_LEVEL=$PERL_DESTRUCT_LEVEL"
> 1.55 (dougm 25-Jun-98): if($PERL_EXTRA_CFLAGS) {
> 1.55 (dougm 25-Jun-98): $cmd .=
> qq(CFLAGS="$PERL_EXTRA_CFLAGS" );
> 1.4 (hartill 10-Feb-98): $inc .= "
> $PERL_EXTRA_CFLAGS" if $PERL_EXTRA_CFLAGS;
> gemini:~/src/apache/modperl$ cvs log -r1.144 Makefile.PL
>
> RCS file: /home/cvspublic/modperl/Makefile.PL,v
> Working file: Makefile.PL
> head: 1.219
> branch:
> locks: strict
> access list:
> keyword substitution: kv
> total revisions: 219; selected revisions: 1
> description:
> ----------------------------
> revision 1.144
> date: 2000/03/07 03:12:36; author: dougm; state: Exp; lines: +26
> -25
> fix Makefile.PL if $USE_APXS && $PERL_DEBUG
>
=============================================================================
>
> Doesn't look like the cvs log is going to be of much help;
> perhaps checking the list archives in Feb/March 2000 will
> turn up something useful.
>
> --
> Joe Schaefer
>
>
> --
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette:
> http://perl.apache.org/maillist/email-etiquette.html
>
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: building 64-bit
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Stas Bekman <st...@stason.org> writes:
[...]
> It should be possible to automate this search by getting cvs version bumped up
> incrementally and grepping for that split line, untill the change is
> found. It'd be a nice addition to our toolset.
What's wrong with cvs annotate here?
gemini:~/src/apache/modperl$ cvs annotate Makefile.PL | grep PERL_EXTRA_CFLAGS
Annotations for Makefile.PL
***************
1.174 (dougm 23-Dec-00): $PERL_EXTRA_CFLAGS = "";
1.4 (hartill 10-Feb-98): $PERL_EXTRA_CFLAGS .= " -D${k}=1";
1.86 (dougm 28-Aug-98): $PERL_EXTRA_CFLAGS .= " -D$_=1";
1.81 (dougm 30-Jul-98): $PERL_EXTRA_CFLAGS .= " -DPERL_SAFE_STARTUP=1";
1.201 (dougm 23-May-02): $PERL_EXTRA_CFLAGS .= " $Config{ccflags}";
1.201 (dougm 23-May-02): $PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//;
1.144 (dougm 07-Mar-00): if($PERL_EXTRA_CFLAGS) {
1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS = join(" ", split(",", $PERL_EXTRA_CFLAGS));
1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS .= " -g";
1.144 (dougm 07-Mar-00): $PERL_EXTRA_CFLAGS .= " -DPERL_DESTRUCT_LEVEL=$PERL_DESTRUCT_LEVEL"
1.55 (dougm 25-Jun-98): if($PERL_EXTRA_CFLAGS) {
1.55 (dougm 25-Jun-98): $cmd .= qq(CFLAGS="$PERL_EXTRA_CFLAGS" );
1.4 (hartill 10-Feb-98): $inc .= " $PERL_EXTRA_CFLAGS" if $PERL_EXTRA_CFLAGS;
gemini:~/src/apache/modperl$ cvs log -r1.144 Makefile.PL
RCS file: /home/cvspublic/modperl/Makefile.PL,v
Working file: Makefile.PL
head: 1.219
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 219; selected revisions: 1
description:
----------------------------
revision 1.144
date: 2000/03/07 03:12:36; author: dougm; state: Exp; lines: +26 -25
fix Makefile.PL if $USE_APXS && $PERL_DEBUG
=============================================================================
Doesn't look like the cvs log is going to be of much help;
perhaps checking the list archives in Feb/March 2000 will
turn up something useful.
--
Joe Schaefer
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: building 64-bit
Posted by Stas Bekman <st...@stason.org>.
J b wrote:
> Hello list,
>
> Long time lurker, first time poster.
Welcome :)
> I'm trying (and I think I've
> succeeded) to build mod_perl 1.3.29 64-bit with apache 1.3.31 on
> Solaris 8. Perl 5.8.4 compiled 64-bit successfully. The problem I'm
> having is that modperl's Makefile.PL mutilates the CFLAGS that perl
> built with. Specifically, it replaces commas with spaces, as seen
> here (line 537):
>
> if($PERL_EXTRA_CFLAGS) {
> $PERL_EXTRA_CFLAGS = join(" ", split(",",
> $PERL_EXTRA_CFLAGS));
> $PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
> }
>
> Googling turned up: http://mathforum.org/epigone/modperl/yandqueube
>
> Does it really need to do this? No offense, but it appears to be a
> rather inelegant way to replace commas, so it screams "last-minute
> hack fix" that has lived on a for a year and half.
>
> The problem is that there is specific flag we built perl with,
> "-Wa,xarch=v9", which gets turned into "-Wa xarch=v9", which makes
> gcc rather unhappy:
>
> ======== Error Output for sanity check ========
> cd ..; gcc -DSOLARIS2=280 -DNO_DBM_REWRITEMAP -DMOD_PERL
> -DUSE_PERL_SSI -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNO_DL_NEEDED -mcpu=v9
> -m64 -mcpu=v9 -m64 -Wa -xarch=v9 -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 `./apaci` -I.
> -I/usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/CORE -m64
> -o helpers/dummy helpers/dummy.c -lsocket -lnsl -lpthread
> -L/usr/local/lib -m64
> /usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/auto/DynaLoader/DynaLoader.a
> -L/usr/local/perl-5.8.4-64_bit/lib/5.8.4/sun4-solaris-64/CORE -lperl
> -lsocket -lnsl -ldl -lm -lc
> gcc: language arch=v9 not recognized
> gcc: language arch=v9 not recognized
> ld: fatal: file helpers/dummy.c: unknown file type
> ld: fatal: File processing errors. No output written to helpers/dummy
> collect2: ld returned 1 exit status
> make: *** [dummy] Error 1
> ============= End of Error Report =============
>
> I commented out those 4 lines in Makefile.PL, rather than try to
> figure out what it was trying to do, built it, and all tests passed.
That's the unfortunate result of not leaving comments when coding :( If you
have time please browse http://cvs.apache.org/viewcvs.cgi/modperl/Makefile.PL
and try to figure out when this change was done and hopefully there will be a
reason logged in the commit message. This certainly needs to be fixed, but we
need to know first why that s/// was added there in first place. Otherwise by
fixing your problem we will break someone's else code.
It should be possible to automate this search by getting cvs version bumped up
incrementally and grepping for that split line, untill the change is found.
It'd be a nice addition to our toolset. May be someone has writen such
already, shouldn't take more than a few lines of perl or sh code.
> That said, the reason we're building it 64-bit is because we need
> MySQL 64-bit (because of some insanely large self-joins and other
> madness), and DBD::mysql won't build with 64-bit mysql libraries with
> a 32-bit perl. So maybe the real solution is a 32-bit DBD::mysql but
> a 64-bit mysqld -- we'll try that next, but I figured I'd ask if
> there's a reason for this mod_perl craziness in case we're stuck with
> 64-bit everything.
You mean, you need -Wa,xarch=v9 to build 64b?
--
__________________________________________________________________
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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html