You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Br...@jci.com on 2007/02/22 17:38:32 UTC
[mp2] [BUG] [PATCH] Build error: HP-UX 11i error w/ fully pathed gcc
compiler
Using mod_perl 2.0.3.
Error generated is:
<command line>:3:2: missing '(' after predicate
whenever a compile is attempted.
If Perl was compiled with a fully pathed gcc compiler (/opt/hp-gcc/bin/gcc,
for example), lib/Apache2/Build.PL puts the wrong flags on the compiler
command. GCC does not understand the "-Ae" compiler flag, so it fails. I
have looked at the latest development snapshot and they also have this
"problem".
I have seen a previous message that uncommented the #XXX? line in the
source to solve a build problem under gcc on HP-UX. Not sure if this is
the best solution, (cmp against basename or split may be better, for
example), but it addresses this version of the problem. One potential
pitfall I could see is if the compiler name ends in "gcc" but is not
actually GCC (minimal risk, but hey :)
Not sure how to generate a test case for this :)
*** Build.pm.old Thu Feb 22 09:55:18 2007
--- Build.pm Thu Feb 22 09:56:12 2007
***************
*** 623,629 ****
sub ccopts_hpux {
my $cflags = shift;
! return if $Config{cc} eq 'gcc'; #XXX?
return if $$cflags =~ /(-Ae|\+e)/;
$$cflags .= " -Ae ";
}
--- 623,630 ----
sub ccopts_hpux {
my $cflags = shift;
! # Modified to allow fully-pathed gcc executable.
! return if $Config{cc} =~ m/gcc$/; #XXX?
return if $$cflags =~ /(-Ae|\+e)/;
$$cflags .= " -Ae ";
}
Thanks,
Brian
--
Brian T. Wightman brian.t.wightman@jci.com