Closed p5pRT closed 20 years ago
This error produced by the syslog packages:
Warning: Use of "defined" without parens is ambiguous at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 2. Can't use subscript on subroutine entry at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 2\, near "} }" syntax error at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 4\, near "unless" BEGIN failed--compilation aborted at /tmp/junk line 4.
seems to come from this file:
# This file was created by h2ph version 1 unless (defined &) { sub () { "" } }
unless (defined &__STDC__) { sub __STDC__() { 1 } }
unless (defined &__sun) { sub __sun() { 1 } }
unless (defined &__unix) { sub __unix() { 1 } }
unless (defined &sparc) { sub sparc() { 1 } }
unless (defined &sun) { sub sun() { 1 } }
unless (defined &unix) { sub unix() { 1 } }
That first line looks bogus. I assume this is extracted from the c compiler that built perl\, but I haven't tracked down where that test/storage took place (in config.sh\, presumably). The compiler used to build perl is the Sun workshop cc:
Sun WorkShop Compiler C Version 4.200 (plus some jumbo patch)
I commented out this strange initial defined line & scripts seem to work ok.
On Mon\, Feb 07\, 2000 at 04:49:45PM -0800\, Michael Helm wrote:
This is a bug report for perl from helm@es.net\, generated with the help of perlbug 1.26 running under perl 5.00503.
----------------------------------------------------------------- [Please enter your report here] This error produced by the syslog packages:
Warning: Use of "defined" without parens is ambiguous at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 2. Can't use subscript on subroutine entry at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 2\, near "} }" syntax error at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread/_h2ph_pre.ph line 4\, near "unless" BEGIN failed--compilation aborted at /tmp/junk line 4.
Thanks for the bug report. Would you mind trying the latest development Perl\, version 5.5.640? I think that the bug is fixed\, but I don't have a Solaris 2.6 machine ready at hand . . . .
Peace\, * Kurt Starsinic (kstar@orientation.com) ---------- Senior Network Engineer * | `Before a war\, military science seems a real science\, like astronomy. | | After a war it seems more like astrology.' -- Rebecca West |
I took a little extract from the h2ph script:
#!/usr/local/bin/perl eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell;
use Config; use File::Path qw(mkpath); use Getopt::Std;
my (%define) = _extract_cc_defines();
sub _extract_cc_defines { my %define; my $allsymbols = join " "\, @Config{ccsymbols\, cppsymbols\, cppccsymbols};
# Split compiler pre-definitions into `key=value' pairs: foreach (split /\s+/\, $allsymbols) { /(.*?)=(.*)/; $define{$1} = $2;
print STDERR "$_: $1 -> $2\n"; }
return %define; }
Result:
: -> __STDC__=1: __STDC__ -> 1 __sun=1: __sun -> 1 __unix=1: __unix -> 1 sparc=1: sparc -> 1 sun=1: sun -> 1 unix=1: unix -> 1
my $allsymbols = join " "\, @Config{ccsymbols\, cppsymbols\, cppccsymbols}; seems to happen because this is empty ^
On Tue\, Feb 08\, 2000 at 12:04:33AM -0800\, Michael Helm wrote:
I took a little extract from the h2ph script:
#!/usr/local/bin/perl eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell;
use Config; use File::Path qw(mkpath); use Getopt::Std;
my (%define) = _extract_cc_defines();
sub _extract_cc_defines { my %define; my $allsymbols = join " "\, @Config{ccsymbols\, cppsymbols\, cppccsymbols};
\# Split compiler pre\-definitions into \`key=value' pairs​: foreach \(split /\\s\+/\, $allsymbols\) \{ /\(\.\*?\)=\(\.\*\)/; $define\{$1\} = $2; print STDERR "$\_​: $1 \-> $2\\n"; \} return %define;
}
Result:
: -> __STDC__=1: __STDC__ -> 1 __sun=1: __sun -> 1 __unix=1: __unix -> 1 sparc=1: sparc -> 1 sun=1: sun -> 1 unix=1: unix -> 1
my $allsymbols = join " "\, @Config{ccsymbols\, cppsymbols\, cppccsymbols}; seems to happen because this is empty ^
Thanks\, got it\, patch to follow.
Peace\, * Kurt Starsinic (kstar@orientation.com) ---------- Senior Network Engineer * | `The term `Internet' has the meaning given that term in | | section 230(f)(1) of the Communications Act of 1934.' | | -- H.R. 3028\, Trademark Cyberpiracy Prevention Act |
Migrated from rt.perl.org#2114 (status was 'resolved')
Searchable as RT2114$