Bug #669: gawk: cmd. line:2: (END OF FILE)

Started by PostgreSQL Bugs Listalmost 24 years ago7 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

Ralph Lecessi (ralph.lecessi@lmco.com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
gawk: cmd. line:2: (END OF FILE)

Long Description
gawk complains of "parse error" & "END OF FILE" when called from
genbki.sh in the src/backend/catalog directory.

here are the paths to gmake & gawk:
$ whence gmake
/home/rlecessi/bin/gmake
$ whence gawk
/sw/wrappers/gawk

Here is the gmake output & error messages:
gmake[3]: Entering directory `/home/rlecessi/postgresql-7.2.1/src/backend/catalog'
CPP='gcc -E' AWK='gawk' /bin/sh genbki.sh -o postgres -I../../../src/include ../../../src/include/catalog/pg_proc.h ../../../src/include/catalog/pg_type.h ../../../src/include/catalog/pg_attribute.h ../../../src/include/catalog/pg_class.h ../../../src/include/catalog/pg_attrdef.h ../../../src/include/catalog/pg_relcheck.h ../../../src/include/catalog/pg_inherits.h ../../../src/include/catalog/pg_index.h ../../../src/include/catalog/pg_operator.h ../../../src/include/catalog/pg_opclass.h ../../../src/include/catalog/pg_am.h ../../../src/include/catalog/pg_amop.h ../../../src/include/catalog/pg_amproc.h ../../../src/include/catalog/pg_language.h ../../../src/include/catalog/pg_largeobject.h ../../../src/include/catalog/pg_aggregate.h ../../../src/include/catalog/pg_statistic.h ../../../src/include/catalog/pg_rewrite.h ../../../src/include/catalog/pg_trigger.h ../../../src/include/catalog/pg_listener.h ../../../src/include/catalog/pg_description.h ../../../src/include/catalog/pg_database.h ../../../src/include/catalog/pg_shadow.h ../../../src/include/catalog/pg_group.h ../../../src/include/catalog/indexing.h --set-version=7.2.1
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
expr: syntax error
gmake[3]: *** [postgres.bki] Error 2
gmake[3]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src/backend/catalog'
gmake[2]: *** [catalog-recursive] Error 2
gmake[2]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src'
gmake: *** [all] Error 2

Sample Code
gmake[3]: Entering directory `/home/rlecessi/postgresql-7.2.1/src/backend/catalog'
CPP='gcc -E' AWK='gawk' /bin/sh genbki.sh -o postgres -I../../../src/include ../../../src/include/catalog/pg_proc.h ../../../src/include/catalog/pg_type.h ../../../src/include/catalog/pg_attribute.h ../../../src/include/catalog/pg_class.h ../../../src/include/catalog/pg_attrdef.h ../../../src/include/catalog/pg_relcheck.h ../../../src/include/catalog/pg_inherits.h ../../../src/include/catalog/pg_index.h ../../../src/include/catalog/pg_operator.h ../../../src/include/catalog/pg_opclass.h ../../../src/include/catalog/pg_am.h ../../../src/include/catalog/pg_amop.h ../../../src/include/catalog/pg_amproc.h ../../../src/include/catalog/pg_language.h ../../../src/include/catalog/pg_largeobject.h ../../../src/include/catalog/pg_aggregate.h ../../../src/include/catalog/pg_statistic.h ../../../src/include/catalog/pg_rewrite.h ../../../src/include/catalog/pg_trigger.h ../../../src/include/catalog/pg_listener.h ../../../src/include/catalog/pg_description.h ../../../src/include/catalog/pg_database.h ../../../src/include/catalog/pg_shadow.h ../../../src/include/catalog/pg_group.h ../../../src/include/catalog/indexing.h --set-version=7.2.1
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
gawk: cmd. line:2: (END OF FILE)
gawk: cmd. line:2: parse error
expr: syntax error
gmake[3]: *** [postgres.bki] Error 2
gmake[3]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src/backend/catalog'
gmake[2]: *** [catalog-recursive] Error 2
gmake[2]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/rlecessi/postgresql-7.2.1/src'
gmake: *** [all] Error 2

No file was uploaded with this report

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

pgsql-bugs@postgresql.org writes:

gawk complains of "parse error" & "END OF FILE" when called from
genbki.sh in the src/backend/catalog directory.

What platform is this? What is your /bin/sh? Offhand this seems like
it is probably the shell's fault, and not directly gawk's.

regards, tom lane

#3Lecessi, Ralph
ralph.lecessi@lmco.com
In reply to: Tom Lane (#2)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

Sun OS 5.6
/bin/sh is a Bourne shell.

I changed the environment to use /bin/csh , then /bin/ksh & got the same
results.

Regards,
Ralph Lecessi
ralph.lecessi@lmco.com

Show quoted text

----------
From: Tom Lane[SMTP:tgl@sss.pgh.pa.us]
Sent: Tuesday, May 21, 2002 10:31 AM
To: ralph.lecessi@lmco.com; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Bug #669: gawk: cmd. line:2: (END OF FILE)

pgsql-bugs@postgresql.org writes:

gawk complains of "parse error" & "END OF FILE" when called from
genbki.sh in the src/backend/catalog directory.

What platform is this? What is your /bin/sh? Offhand this seems like
it is probably the shell's fault, and not directly gawk's.

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lecessi, Ralph (#3)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

"Lecessi, Ralph" <ralph.lecessi@lmco.com> writes:

Sun OS 5.6
/bin/sh is a Bourne shell.

Hmph. Nothing particularly unusual-seeming about that.

Do you have another flavor of awk available to try? I still doubt that
it's gawk's fault, but we need to eliminate possibilities.

Another thing to check is whether you might have a corrupted copy of
genbki.sh. In 7.2.1 I get these numbers from "wc genbki.sh":
424 1609 10863
If yours match then it's probably okay.

regards, tom lane

#5Lecessi, Ralph
ralph.lecessi@lmco.com
In reply to: Tom Lane (#4)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

Do you have another flavor of awk available to try? I still doubt

that

it's gawk's fault, but we need to eliminate possibilities.

I ran with nawk (/usr/bin/nawk) & the parse error went away. Is their any
way I can check if the
awk output is valid (is their anything I can check for or compare with) ?

Thanks for your help,

Ralph Lecessi

Show quoted text

----------
From: Tom Lane[SMTP:tgl@sss.pgh.pa.us]
Sent: Tuesday, May 21, 2002 11:17 AM
To: Lecessi, Ralph
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Bug #669: gawk: cmd. line:2: (END OF FILE)

"Lecessi, Ralph" <ralph.lecessi@lmco.com> writes:

Sun OS 5.6
/bin/sh is a Bourne shell.

Hmph. Nothing particularly unusual-seeming about that.

Do you have another flavor of awk available to try? I still doubt that
it's gawk's fault, but we need to eliminate possibilities.

Another thing to check is whether you might have a corrupted copy of
genbki.sh. In 7.2.1 I get these numbers from "wc genbki.sh":
424 1609 10863
If yours match then it's probably okay.

regards, tom lane

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lecessi, Ralph (#5)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

"Lecessi, Ralph" <ralph.lecessi@lmco.com> writes:

Do you have another flavor of awk available to try? I still doubt that
it's gawk's fault, but we need to eliminate possibilities.

I ran with nawk (/usr/bin/nawk) & the parse error went away.

Interesting. What version of gawk have you got? People build all the
time using gawk on Linux, and no one's ever reported such a failure that
I can recall. (FWIW, "gawk --version" reports 3.1.0 on my Linux box,
and I also build successfully with gawk 3.0.4 on my HPUX box.)

Is their any way I can check if the awk output is valid (is their
anything I can check for or compare with) ?

If you can initdb and run the regression tests successfully, then you
can be quite certain genbki worked.

regards, tom lane

#7Lecessi, Ralph
ralph.lecessi@lmco.com
In reply to: Tom Lane (#6)
Re: Bug #669: gawk: cmd. line:2: (END OF FILE)

Gawk --version returns :
GNU awk 3.0.2

Thanks for the help . I'll try initdb as soon as I'm done building.

Regards,
Ralph Lecessi

Show quoted text

----------
From: Tom Lane[SMTP:tgl@sss.pgh.pa.us]
Sent: Tuesday, May 21, 2002 12:57 PM
To: Lecessi, Ralph
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Bug #669: gawk: cmd. line:2: (END OF FILE)

"Lecessi, Ralph" <ralph.lecessi@lmco.com> writes:

Do you have another flavor of awk available to try? I still doubt that
it's gawk's fault, but we need to eliminate possibilities.

I ran with nawk (/usr/bin/nawk) & the parse error went away.

Interesting. What version of gawk have you got? People build all the
time using gawk on Linux, and no one's ever reported such a failure that
I can recall. (FWIW, "gawk --version" reports 3.1.0 on my Linux box,
and I also build successfully with gawk 3.0.4 on my HPUX box.)

Is their any way I can check if the awk output is valid (is their
anything I can check for or compare with) ?

If you can initdb and run the regression tests successfully, then you
can be quite certain genbki worked.

regards, tom lane