Compile error on STDOUT format on NT platform 
Author Message
 Compile error on STDOUT format on NT platform

I am going through the Perl Camel book and trying the examples on
my NT machine. The following program for some reason does not compile
and I am not able to find any reference anywhere indicating what am I
doing wrong.

Can some one , kindly look at this code and tell me why it does not
compile on NT.

Thanks in advance

Magid T.

-------

#!/usr/bin/perl        
        while ($filename=<*.secret>) {

        open (WORDSLIST, $filename);
        if (-M WORDSLIST < 7) {
        while ($name=<WORDSLIST>) {
                chop($name);
                $word=<WORDSLIST>;
                chop($word);
                $words{$name}=$word;
                write;
                                 }
        } else {
              print "bad file name = $filename \n";
              close(WORDSLIST);
              open (RENAME, "|rename $filename $filename.old");
              close RENAME;
             }
        close(WORDSLIST);
                }
        format STDOUT=

        $filename, $name, $word
        .
--------------------------------------------------------
C:\PerlCGI\PERL5>perl kir33.pl
Format not terminated at kir33.pl line 25, at end of line
Format not terminated at kir33.pl line 25, at end of line
Missing right bracket at kir33.pl line 25, at end of line
syntax error at kir33.pl line 25, at EOF
Execution of kir33.pl aborted due to compilation errors.



Mon, 21 Jun 1999 03:00:00 GMT  
 Compile error on STDOUT format on NT platform

Hello, merry X-mas and a happy New Year

I have a problem compiling Pearl 5.003 on a digital ALPHAstation.
sh ./config wors well and does all fine.
make dep even.
make:
---------------------------
`sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
          CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include
-D__LANGUAGE_C__ -D_NO_PROTO -O  
In file included from perl.h:619,
                 from miniperlmain.c:10:
av.h:12: parse error before `xav_fill'
av.h:12: warning: no semicolon at end of struct or union
av.h:13: warning: data definition has no type or storage class
av.h:22: parse error before `}'
In file included from perl.h:803,
                 from miniperlmain.c:10:
/usr/local/lib/gcc-lib/alpha-dec-osf3.2/2.7.2.1.f.1/include/math.h:106:
warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf3.2/2.7.2.1.f.1/include/math.h:109:
warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf3.2/2.7.2.1.f.1/include/math.h:118:
warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf3.2/2.7.2.1.f.1/include/math.h:120:
warning: conflicting types for built-in function `sqrtf'
*** Exit 1
Stop.
-----------------------------

I attached my config.sh file

PLEEEASE help!
Thanks, Thorsten


config.sh:
--------------
#!/bin/sh
#
# This file was produced by running the Configure script. It holds all
the
# definitions figured out by Configure. Should you modify one of these
values,
# do not forget to propagate your changes by running "Configure -der".
You may
# instead choose to run each of the .SH files by yourself, or "Configure
-S".
#

# Configuration time: Fri Dec 20 18:35:35 MET 1996
# Configured by: bti006
# Target system: osf1 bti0xd.bitoek.uni-bayreuth.de v3.2 148 alpha

Author=''
Date='$Date'
Header=''
Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source=''
State=''
afs='false'
alignbytes='8'
aphostname=''
ar='ar'
archlib='/usr/local/lib/perl5/alpha-dec_osf/5.003'
archlibexp='/usr/local/lib/perl5/alpha-dec_osf/5.003'
archname='alpha-dec_osf'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
bin='/usr/local/bin'
binexp='/usr/local/bin'
bison=''
byacc='byacc'
byteorder='12345678'
c='\c'
castflags='0'
cat='cat'
cc='gcc'
cccdlflags='-fpic'
ccdlflags=' '
ccflags='-DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO'
cf_by='bti006'

cf_time='Fri Dec 20 18:35:35 MET 1996'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm='comm'
compress=''
contains='grep'
cp='cp'
cpio=''
cpp='cpp'
cpp_stuff='42'
cppflags='-DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__
-D_NO_PROTO'
cpplast='-'
cppminus='-'
cpprun='gcc -E'
cppstdin='gcc -E'
cryptlib=''
csh='csh'
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
d_access='define'
d_alarm='define'
d_archlib='define'
d_attribut='define'
d_bcmp='define'
d_bcopy='define'
d_bsd='undef'
d_bsdpgrp='define'
d_bzero='define'
d_casti32='define'
d_castneg='define'
d_charvspr='undef'
d_chown='define'
d_chroot='define'
d_chsize='undef'
d_closedir='define'
d_const='define'
d_crypt='define'
d_csh='define'
d_cuserid='define'
d_dbl_dig='define'
d_difftime='define'
d_dirnamlen='define'
d_dlerror='define'
d_dlopen='define'
d_dlsymun='undef'
d_dosuid='undef'
d_dup2='define'
d_eofnblk='define'
d_eunice='undef'
d_fchmod='define'
d_fchown='define'
d_fcntl='define'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
d_fgetpos='define'
d_flexfnam='define'
d_flock='define'
d_fork='define'
d_fpathconf='define'
d_fsetpos='define'
d_getgrps='define'
d_gethent='define'
d_gethname='undef'
d_getlogin='define'
d_getpgrp2='undef'
d_getpgrp='define'
d_getppid='define'
d_getprior='define'
d_htonl='define'
d_index='undef'
d_isascii='define'
d_killpg='define'
d_link='define'
d_locconv='define'
d_lockf='define'
d_lstat='define'
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
d_memset='define'
d_mkdir='define'
d_mkfifo='define'
d_mktime='define'
d_msg='define'
d_msgctl='define'
d_msgget='define'
d_msgrcv='define'
d_msgsnd='define'
d_mymalloc='define'
d_nice='define'
d_oldarchlib='define'
d_oldsock='undef'
d_open3='define'
d_pathconf='define'
d_pause='define'
d_phostname='undef'
d_pipe='define'
d_poll='define'
d_portable='define'
d_pwage='undef'
d_pwchange='undef'
d_pwclass='undef'
d_pwcomment='define'
d_pwexpire='undef'
d_pwquota='define'
d_readdir='define'
d_readlink='define'
d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy='undef'
d_safemcpy='undef'
d_seekdir='define'
d_select='define'
d_sem='define'
d_semctl='define'
d_semget='define'
d_semop='define'
d_setegid='define'
d_seteuid='define'
d_setlinebuf='define'
d_setlocale='define'
d_setpgid='define'
d_setpgrp2='undef'
d_setpgrp='define'
d_setprior='define'
d_setregid='define'
d_setresgid='undef'
d_setresuid='undef'
d_setreuid='define'
d_setrgid='define'
d_setruid='define'
d_setsid='define'
d_shm='define'
d_shmat='define'
d_shmatprototype='define'
d_shmctl='define'
d_shmdt='define'
d_shmget='define'
d_shrplib='undef'
d_sigaction='define'
d_sigintrp=''
d_sigsetjmp='undef'
d_sigvec='define'
d_sigvectr='undef'
d_socket='define'
d_sockpair='define'
d_statblks='define'
d_stdio_cnt_lval='undef'
d_stdio_ptr_lval='undef'
d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
d_strerrm='strerror(e)'
d_strerror='define'
d_strxfrm='define'
d_suidsafe='undef'
d_symlink='define'
d_syscall='define'
d_sysconf='define'
d_sysernlst=''
d_syserrlst='define'
d_system='define'
d_tcgetpgrp='define'
d_tcsetpgrp='define'
d_telldir='define'
d_time='define'
d_times='define'
d_truncate='define'
d_tzname='define'
d_umask='define'
d_uname='define'
d_vfork='undef'
d_void_closedir='define'
d_voidsig='define'
d_voidtty=''
d_volatile='define'
d_vprintf='define'
d_wait4='define'
d_waitpid='define'
d_wcstombs='define'
d_wctomb='define'
d_xenix='undef'
date='date'
db_hashtype='int'
db_prefixtype='int'
defvoidused='15'
direntrytype='struct dirent'
dlext='so'
dlsrc='dl_dlopen.xs'
dynamic_ext='Fcntl FileHandle NDBM_File ODBM_File POSIX SDBM_File Safe
Socket'
eagain='EAGAIN'
echo='echo'
egrep='egrep'
emacs=''
eunicefix=':'
exe_ext=''
expr='expr'
extensions='Fcntl FileHandle NDBM_File ODBM_File POSIX SDBM_File Safe
Socket'
find='find'
firstmakefile='makefile'
flex=''
fpostype='fpos_t'
freetype='void'
full_csh='/usr/bin/csh'
full_sed='/usr/bin/sed'
gcc=''
gccversion='2.7.2.1.f.1'
gidtype='gid_t'
glibpth='/usr/shlib  /lib/pa1.1 /usr/lib/large /lib /usr/lib
/usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib
/usr/ucblib /usr/shlib '
grep='grep'
groupcat=''
groupstype='gid_t'
h_fcntl='false'
h_sysfile='true'
hint='recommended'
hostcat='ypcat hosts'
huge=''
i_bsdioctl=''
i_db='undef'
i_dbm='define'
i_dirent='define'
i_dld='undef'
i_dlfcn='define'
i_fcntl='undef'
i_float='define'
i_gdbm='undef'
i_grp='define'
i_limits='define'
i_locale='define'
i_malloc='define'
i_math='define'
i_memory='undef'
i_ndbm='define'
i_neterrno='undef'
i_niin='define'
i_pwd='define'
i_rpcsvcdbm='undef'
i_sgtty='undef'
i_stdarg='define'
i_stddef='define'
i_stdlib='define'
i_string='define'
i_sysdir='define'
i_sysfile='define'
i_sysfilio='undef'
i_sysin='undef'
i_sysioctl='define'
i_sysndir='undef'
i_sysparam='define'
i_sysselct='define'
i_syssockio=''
i_sysstat='define'
i_systime='define'
i_systimek='undef'
i_systimes='define'
i_systypes='define'
i_sysun='define'
i_termio='undef'
i_termios='define'
i_time='undef'
i_unistd='define'
i_utime='define'
i_varargs='undef'
i_varhdr='stdarg.h'
i_vfork='undef'
incpath=''
inews=''
installarchlib='/usr/local/lib/perl5/alpha-dec_osf/5.003'
installbin='/usr/local/bin'
installman1dir='/usr/local/man_tmp_man1'
installman3dir='/usr/local/man_tmp/man3'
installprivlib='/usr/local/lib/perl5'
installscript='/usr/local/bin'
installsitearch='/usr/local/lib/perl5/site_perl/alpha-dec_osf'
installsitelib='/usr/local/lib/perl5/site_perl'
intsize='4'
known_extensions='DB_File Fcntl FileHandle GDBM_File NDBM_File ODBM_File
POSIX SDBM_File Safe Socket'
ksh=''
large=''
ld='ld'
lddlflags='-shared -expect_unresolved "*" -s -hidden -L/usr/local/lib'
ldflags=' -L/usr/local/lib'
less='less'
lib_ext='.a'
libc='/usr/shlib/libc.so'
libpth='/usr/local/lib /usr/shlib /lib /usr/lib /usr/ccs/lib
/usr/share/lib /usr/sys/BINARY/lib'
libs='-lnet -ldbm -lm -lc -lbsd -lPW'
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun
m c cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
lkflags=''
ln='ln'
lns='/usr/bin/ln -s'
locincpth='/usr/local/include /opt/local/include /usr/gnu/include
/opt/gnu/include /usr/GNU/include /opt/GNU/include'
loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib
/usr/GNU/lib /opt/GNU/lib'
lp=''
lpr=''
ls='ls'
lseektype='off_t'
mail=''
mailx=''
make=''
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
man1dir='/usr/local/man_tmp_man1'
man1direxp='/usr/local/man_tmp_man1'
man1ext='1'
man3dir='/usr/local/man_tmp/man3'
man3direxp='/usr/local/man_tmp/man3'
man3ext='3'
medium=''
mips=''
mips_type=''
mkdir='mkdir'
models='none'
modetype='mode_t'
more='more'
mv=''
myarchname='alpha-dec_osf'
mydomain='.bitoek.uni-bayreuth.de'
myhostname='bti0xd'
myuname='osf1 bti0xd.bitoek.uni-bayreuth.de v3.2 148 alpha '
n=''
nm_opt='-p'
nm_so_opt=''
nroff='nroff'
o_nonblock='O_NONBLOCK'
obj_ext='.o'
oldarchlib='/usr/local/lib/perl5/alpha-dec_osf'
oldarchlibexp='/usr/local/lib/perl5/alpha-dec_osf'
optimize='-O'
orderlib='false'
osname='dec_osf'
osvers='3.2'
package='perl5'
pager='/usr/bin/more'
passcat=''
patchlevel='3'
path_sep=':'
perl='perl'

perlpath='/usr/local/bin/perl'
pg='pg'
phostname='hostname'
plibpth=''
pmake=''
pr=''
prefix='/usr/local'
prefixexp='/usr/local'
privlib='/usr/local/lib/perl5'
privlibexp='/usr/local/lib/perl5'
prototype='define' ...

read more »



Tue, 22 Jun 1999 03:00:00 GMT  
 Compile error on STDOUT format on NT platform

[posted, mailed to original poster, and forwarded to p5p]

Quote:

>I have a problem compiling Pearl 5.003 on a digital ALPHAstation.
>sh ./config wors well and does all fine.

>`sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
>          CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include
>-D__LANGUAGE_C__ -D_NO_PROTO -O  
>In file included from perl.h:619,
>                 from miniperlmain.c:10:
>av.h:12: parse error before `xav_fill'

Summary:
Perl does not build straight-out-of-the-box on DEC OSF1.

Diagnosis:
Look at the compiler options -DSTANDARD_C -D__LANGUAGE_C__
-D_NO_PROTO. They're telling the compiler that it should be K&R and
ANSI at the same time. The DEC OSF1 system include files can't
handle this combination. The result is a whole boatload of errors,
one of which is the following setting in your config.sh file:

Quote:
>ssizetype=''

This in turn results in

#define SSize_t  /* signed count of bytes */

in the config.h file. This in turn clobbers av.h.

Cause:
when Configure said

Let me guess what the preprocessor flags are...

It made a DEAD WRONG guess, and you accepted it. There's a deeper
cause that makes Configure make such a stupid guess, but this is
the root cause of your problems.

Workaround:
Rerun the configure and override the stupid guess. Simply use the
guess without the -D_NO_PROTO junk.

I'm forwarding this to the p5p group.

--
Dave Hammen / LinCom Corporation



Tue, 22 Jun 1999 03:00:00 GMT  
 Compile error on STDOUT format on NT platform

See below.  Bill

Quote:

> I am going through the Perl Camel book and trying the examples on
> my NT machine. The following program for some reason does not compile
> and I am not able to find any reference anywhere indicating what am I
> doing wrong.

> Can some one , kindly look at this code and tell me why it does not
> compile on NT.

> Thanks in advance

> Magid T.

> -------

> #!/usr/bin/perl
>         while ($filename=<*.secret>) {

>         open (WORDSLIST, $filename);
>         if (-M WORDSLIST < 7) {
>         while ($name=<WORDSLIST>) {
>                 chop($name);
>                 $word=<WORDSLIST>;
>                 chop($word);
>                 $words{$name}=$word;
>                 write;
>                                  }
>         } else {
>               print "bad file name = $filename \n";
>               close(WORDSLIST);
>               open (RENAME, "|rename $filename $filename.old");
>               close RENAME;
>              }
>         close(WORDSLIST);
>                 }
>         format STDOUT=

>         $filename, $name, $word
>         .

        ^^^^^
Shouldn't the period be in column one to terminate the format spec?

Bill

Quote:
> --------------------------------------------------------
> C:\PerlCGI\PERL5>perl kir33.pl
> Format not terminated at kir33.pl line 25, at end of line
> Format not terminated at kir33.pl line 25, at end of line
> Missing right bracket at kir33.pl line 25, at end of line
> syntax error at kir33.pl line 25, at EOF
> Execution of kir33.pl aborted due to compilation errors.

--
-----------------------------------------------------------------------

Tiburon, Inc./3333 Durham-Chapel Hill Blvd Suite E-100/Durham, NC 27707


Thu, 24 Jun 1999 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MacPerl: format STDOUT error

2. do does'nt do anything with compiled Perl - Activestate PDK - PERLAPP - (error message do Failed)

3. compiling perl scripts under win32 platform

4. Multi-platform Perl compiles

5. Compile script to exe on many platforms

6. Multi-platform Perl compiles

7. Compiling Perl to .exe for Windows Platform

8. Howto compile Tk widgets on a windows platform??

9. alternating formats on STDOUT

10. Format Oracle Stdout

11. Using the Perl 'format' to STDOUT

12. multiple STDOUT formats

 

 
Powered by phpBB® Forum Software