non-POSIX use in yacc with getdate.y

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

non-POSIX use in yacc with getdate.y

Osipov, Michael
Hi folks,

I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:

> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect

Change introduced in
https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.

I contacted HPE about this and it turned out that their yacc
implementation does not support extensions as the GNU or BSD
counterparts do.

I'd like to have this fixed somehow and there are several ways to do this:

* Remove this line manually before compiling on the platform which does
not support this "%expect" extension
* Revert the commit and live with the verbose output
* Test for this extension in the configure.ac script
* Require GNU bison if yacc is POSIX only. Note I am reluctant to this
because this is merely one line for less verbose output?

Any comments from the devs?

Regards,

Michael
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Greg Hudson
On 09/25/2018 06:46 AM, Osipov, Michael wrote:
> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:
>
>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect
>
> Change introduced in
> https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.

That was part of a series of changes to eliminate all warnings in build
under clang (gcc still issues some warnings).  I didn't notice at the
time that we were using an extension in a nominally yacc-compatible grammar.

Aside from the options you listed, we could check the bison output into
the tree like we do with lib/krb5/krb/x-deltat.y.  But we might just
revert the commit and live with the warning.  That warning shouldn't
cause an error in a -Werror build since it isn't coming from the compiler.
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Robbie Harwood
In reply to this post by Osipov, Michael
"Osipov, Michael" <[hidden email]> writes:

> Hi folks,
>
> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:
>
>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect
>
> Change introduced in
> https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.
>
> I contacted HPE about this and it turned out that their yacc
> implementation does not support extensions as the GNU or BSD
> counterparts do.
>
> I'd like to have this fixed somehow and there are several ways to do this:
>
> * Remove this line manually before compiling on the platform which does
> not support this "%expect" extension
> * Revert the commit and live with the verbose output
> * Test for this extension in the configure.ac script
> * Require GNU bison if yacc is POSIX only. Note I am reluctant to this
> because this is merely one line for less verbose output?
>
> Any comments from the devs?
As the author of the change, it wasn't my intent to mandate GNU bison
here.  Platform checking/configure tests seem like overkill for just a
warning.  The intent was to get the codebase to be warning-free on clang
on Travis to help with code reviews.

I've opened https://github.com/krb5/krb5/pull/849 to revert this change.

Thanks,
--Robbie

________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos

signature.asc (847 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Osipov, Michael
In reply to this post by Greg Hudson


Am 2018-09-25 um 19:23 schrieb Greg Hudson:
 > On 09/25/2018 06:46 AM, Osipov, Michael wrote:
 >> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed
 >> with:
 >>
 >>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or
 >>> illegal reserved word: expect
 >>
 >> Change introduced in
 >>
https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.

 >>
 >
 > That was part of a series of changes to eliminate all warnings in build
 > under clang (gcc still issues some warnings).  I didn't notice at the
 > time that we were using an extension in a nominally yacc-compatible
 > grammar.

Me neither on RHEL or FreeBSD, but this man page [1] clearly describes
it as extension.

 > Aside from the options you listed, we could check the bison output into
 > the tree like we do with lib/krb5/krb/x-deltat.y.  But we might just
 > revert the commit and live with the warning.  That warning shouldn't
 > cause an error in a -Werror build since it isn't coming from the
compiler.
I check the x-deltat.y and do not fully understand what you mean by
 > ..we could check the bison output into the tree..

The won't affect the compilation since only the generated file is
process by CC.

[1]
https://www.freebsd.org/cgi/man.cgi?query=yacc&sourceid=opensearch#EXTENSIONS

Michael
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Osipov, Michael
In reply to this post by Robbie Harwood


Am 2018-09-25 um 19:25 schrieb Robbie Harwood:

> "Osipov, Michael" <[hidden email]> writes:
>
>> Hi folks,
>>
>> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:
>>
>>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect
>>
>> Change introduced in
>> https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.
>>
>> I contacted HPE about this and it turned out that their yacc
>> implementation does not support extensions as the GNU or BSD
>> counterparts do.
>>
>> I'd like to have this fixed somehow and there are several ways to do this:
>>
>> * Remove this line manually before compiling on the platform which does
>> not support this "%expect" extension
>> * Revert the commit and live with the verbose output
>> * Test for this extension in the configure.ac script
>> * Require GNU bison if yacc is POSIX only. Note I am reluctant to this
>> because this is merely one line for less verbose output?
>>
>> Any comments from the devs?
>
> As the author of the change, it wasn't my intent to mandate GNU bison
> here.  Platform checking/configure tests seem like overkill for just a
> warning.  The intent was to get the codebase to be warning-free on clang
> on Travis to help with code reviews.

Hi Robbie,

I never assumed anything else ;-) Bison also has a YACC mode with '-y',
but I do not know whether extensions will be disabled.

> I've opened https://github.com/krb5/krb5/pull/849 to revert this change.

Looks promising, but I would leave the %expect as a comment and add a
comment above why we cannot enable this.

Thank you for the quick response,

Michael
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Robbie Harwood
"Osipov, Michael" <[hidden email]> writes:

> Am 2018-09-25 um 19:25 schrieb Robbie Harwood:
>> "Osipov, Michael" <[hidden email]> writes:
>>
>>> Hi folks,
>>>
>>> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:
>>>
>>>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect
>>>
>>> Change introduced in
>>> https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.
>>>
>>> I contacted HPE about this and it turned out that their yacc
>>> implementation does not support extensions as the GNU or BSD
>>> counterparts do.
>>>
>>> I'd like to have this fixed somehow and there are several ways to do this:
>>>
>>> * Remove this line manually before compiling on the platform which does
>>> not support this "%expect" extension
>>> * Revert the commit and live with the verbose output
>>> * Test for this extension in the configure.ac script
>>> * Require GNU bison if yacc is POSIX only. Note I am reluctant to this
>>> because this is merely one line for less verbose output?
>>>
>>> Any comments from the devs?
>>
>> As the author of the change, it wasn't my intent to mandate GNU bison
>> here.  Platform checking/configure tests seem like overkill for just a
>> warning.  The intent was to get the codebase to be warning-free on clang
>> on Travis to help with code reviews.
>
> Hi Robbie,
>
> I never assumed anything else ;-) Bison also has a YACC mode with '-y',
> but I do not know whether extensions will be disabled.
>
>> I've opened https://github.com/krb5/krb5/pull/849 to revert this change.
>
> Looks promising, but I would leave the %expect as a comment and add a
> comment above why we cannot enable this.
Sounds reasonable; updated.

Thanks,
--Robbie

________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos

signature.asc (847 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: non-POSIX use in yacc with getdate.y

Osipov, Michael


Am 2018-09-26 um 18:43 schrieb Robbie Harwood:

> "Osipov, Michael" <[hidden email]> writes:
>
>> Am 2018-09-25 um 19:25 schrieb Robbie Harwood:
>>> "Osipov, Michael" <[hidden email]> writes:
>>>
>>>> Hi folks,
>>>>
>>>> I have recently compiled MIT Kerberos 1.16.1 on HP-UX and yacc failed with:
>>>>
>>>>> "./kadmin/cli/getdate.y", line 180: fatal error: invalid escape, or illegal reserved word: expect
>>>>
>>>> Change introduced in
>>>> https://github.com/krb5/krb5/commit/28fd0a934cdc7b3b42ce213c6d334d4edf1ab591#diff-db7f4e6f3883dd26b97f7b3e10697846R180.
>>>>
>>>> I contacted HPE about this and it turned out that their yacc
>>>> implementation does not support extensions as the GNU or BSD
>>>> counterparts do.
>>>>
>>>> I'd like to have this fixed somehow and there are several ways to do this:
>>>>
>>>> * Remove this line manually before compiling on the platform which does
>>>> not support this "%expect" extension
>>>> * Revert the commit and live with the verbose output
>>>> * Test for this extension in the configure.ac script
>>>> * Require GNU bison if yacc is POSIX only. Note I am reluctant to this
>>>> because this is merely one line for less verbose output?
>>>>
>>>> Any comments from the devs?
>>>
>>> As the author of the change, it wasn't my intent to mandate GNU bison
>>> here.  Platform checking/configure tests seem like overkill for just a
>>> warning.  The intent was to get the codebase to be warning-free on clang
>>> on Travis to help with code reviews.
>>
>> Hi Robbie,
>>
>> I never assumed anything else ;-) Bison also has a YACC mode with '-y',
>> but I do not know whether extensions will be disabled.
>>
>>> I've opened https://github.com/krb5/krb5/pull/849 to revert this change.
>>
>> Looks promising, but I would leave the %expect as a comment and add a
>> comment above why we cannot enable this.
>
> Sounds reasonable; updated.

The commit looks perfect, thank you guys!
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos