develooper Front page | perl.perl5.porters | Postings from February 2000

[ID 20000207.004] h2ph produces bad compiler defs file

From:
Michael Helm
Date:
February 7, 2000 16:50
Subject:
[ID 20000207.004] h2ph produces bad compiler defs file
Message ID:
200002080049.QAA03537@fionn.es.net

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.

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.


[Please do not change anything below this line]
-----------------------------------------------------------------

---
Site configuration information for perl 5.00503:

Configured by helm at Sat Jul 24 13:20:16 PDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris-thread
    uname='sunos fionn 5.6 generic_105181-15 sun4u sparc '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-g -O', gccversion=
    cppflags='-D_REENTRANT -DDEBUGGING -I/usr/local/include'
    ccflags ='-D_REENTRANT -DDEBUGGING -I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lposix4 -lpthread -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl 5.00503:
    /usr/local/lib/perl5/5.00503/sun4-solaris-thread
    /usr/local/lib/perl5/5.00503
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread
    /usr/local/lib/perl5/site_perl/5.005
    .

---
Environment for perl 5.00503:
    HOME=/export/home/helm
    LANG=en_US
    LANGUAGE (unset)
    LC_COLLATE=en_US
    LC_CTYPE=en_US
    LC_MESSAGES=C
    LC_MONETARY=en_US
    LC_NUMERIC=en_US
    LC_TIME=en_US
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin:/usr/afsws/bin:/usr/openwin/bin:.:/usr/ccs/bin:/usr/local/mh/bin:/opt/SUNWdat/bin
    PERL_BADLANG (unset)
    SHELL=/bin/csh



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About