Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677040 - app-admin/syslog-ng USE=python with =sys-devel/bison-3.3.1 fails to build - lib/pragma-grammar.y: In function ‘pragma_parse’: lib/pragma-grammar.y:420:5: error: expected expression at end of input
Summary: app-admin/syslog-ng USE=python with =sys-devel/bison-3.3.1 fails to build - l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
URL: https://github.com/balabit/syslog-ng/...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-02-01 08:50 UTC by Seong-ho Cho
Modified: 2019-02-04 13:42 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log of app-admin/syslog-ng-3.19.1 with sys-devel/bison-3.3.1 (build.log,135.29 KB, text/plain)
2019-02-01 21:40 UTC, Jenny Danzmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seong-ho Cho 2019-02-01 08:50:11 UTC
PetaMem R&D wrote in Bug ID 674222

> JFYI: 3.19.1 doesn't compile here
> 
> lib/pragma-grammar.y: In function ‘pragma_parse’:
> lib/pragma-grammar.y:420:5: error: expected expression at end of input
>          : KW_VERSION ':' string_or_number               { configuration->parsed_version = __process_version_string($3); free($3); }
>      ^
> lib/pragma-grammar.y:420:5: error: expected declaration or statement at end of input
> lib/pragma-grammar.y:420:5: error: expected declaration or statement at end of input
> lib/pragma-grammar.y:420:5: error: expected declaration or statement at end of input
> lib/pragma-grammar.c:2845:5: error: label ‘yyerrlab’ used but not defined
>      goto yyerrlab;
>      ^~~~
> lib/pragma-grammar.y:412:5: error: label ‘yyacceptlab’ used but not defined
>            stmt_and_eol                                  { if (yychar != YYEMPTY) {  cfg_lexer_unput_token(lexer, &yylval); } PRAGMA_END(); YYACCEPT; }
>      ^
> lib/pragma-grammar.c:2762:9: error: label ‘yyabortlab’ used but not defined
>          YYABORT;
>          ^~~~~~~
> lib/pragma-grammar.c:2744:11: error: label ‘yyexhaustedlab’ used but not defined
>            goto yyexhaustedlab;
>            ^~~~
> make[2]: *** [Makefile:14385: lib/libsyslog_ng_la-pragma-grammar.lo] Error 1
> make[2]: *** Waiting for unfinished jobs....
> 
> 
> looks like a yacc/bison problem
> 
> # emerge --info
> Portage 2.3.59 (python 2.7.15-final-0, default/linux/amd64/17.0/no-multilib, gcc-8.2.0, glibc-2.28-r5, 4.18.5-gentoo x86_64)
> =================================================================
> System uname: Linux-4.18.5-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X5672_@_3.20GHz-with-gentoo-2.6
> KiB Mem:   148408604 total, 112410640 free
> KiB Swap:          0 total,         0 free
> Timestamp of repository gentoo: Mon, 28 Jan 2019 13:30:01 +0000
> Head commit of repository gentoo:  6abc5adb65a7b44f2cc7ac05db093884f35ae27b
> sh bash 5.0_p2
> ld GNU ld (Gentoo 2.30 p3) 2.30.0
> app-shells/bash:          5.0_p2::gentoo
> dev-java/java-config:     2.2.0-r4::gentoo
> dev-lang/perl:            5.28.0::gentoo
> dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
> dev-util/cmake:           3.13.3::gentoo
> dev-util/pkgconfig:       0.29.2::gentoo
> sys-apps/baselayout:      2.6-r1::gentoo
> sys-apps/openrc:          0.40.3::gentoo
> sys-apps/sandbox:         2.15::gentoo
> sys-devel/autoconf:       2.69-r4::gentoo
> sys-devel/automake:       1.15.1-r2::gentoo, 1.16.1-r1::gentoo
> sys-devel/binutils:       2.30-r3::gentoo, 2.31.1-r3::gentoo
> sys-devel/gcc:            7.3.0-r4::gentoo, 7.4.0::gentoo, 8.2.0-r6::gentoo
> sys-devel/gcc-config:     2.0::gentoo
> sys-devel/libtool:        2.4.6-r5::gentoo
> sys-devel/make:           4.2.1-r4::gentoo
> sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
> sys-libs/glibc:           2.28-r5::gentoo

I found this bug could be occured by =sys-devel/bison-3.3.1, 
and I succeeded with =sys-devel/bison-3.2.4.

so.. I seem to find bison's bug(maybe?)

is there anyone to prove this my test?
Comment 1 Tomáš Mózes 2019-02-01 10:55:17 UTC
Please attach the full build log and your emerge --info, thanks.
Comment 2 Jenny Danzmayr 2019-02-01 21:40:11 UTC
Created attachment 563460 [details]
build.log of app-admin/syslog-ng-3.19.1 with sys-devel/bison-3.3.1

I get the same error, I attached a complete build log.
Comment 3 PhobosK 2019-02-02 12:49:41 UTC
I confirm this bug with the same configuration.

For some reason using python (no matter the config of python itself if 2.7 only, 3.6 only etc) breaks the compilation.

A workaround is to IUSE "-python"
Comment 4 Tomáš Mózes 2019-02-03 04:40:48 UTC
There is some work on this upstream (https://github.com/balabit/syslog-ng/pull/2526), but the patch does not fix the build failure, we'll have to either use <bison-3.3.1 or disable USE=python.
Comment 5 Larry the Git Cow gentoo-dev 2019-02-03 19:14:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=644c4d2379e2c9a8930a2e50450ef54c74b77e47

commit 644c4d2379e2c9a8930a2e50450ef54c74b77e47
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2019-02-03 03:47:48 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-02-03 19:13:48 +0000

    app-admin/syslog-ng: add version constraint on sys-devel/bison
    
    Bug: https://bugs.gentoo.org/677040
    Signed-off-by: Tomas Mozes <hydrapolic@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/10967
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-admin/syslog-ng/syslog-ng-3.19.1.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 6 Tomáš Mózes 2019-02-04 04:20:36 UTC
As agreed with Andreas, we will close this when an upstream fix is available.
Comment 7 Tomáš Mózes 2019-02-04 11:02:20 UTC
Please try with bison 3.3.2, it should work now.
Comment 8 Larry the Git Cow gentoo-dev 2019-02-04 13:42:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8fbdc1c848d15a324da2742a2a322267b0964d6

commit f8fbdc1c848d15a324da2742a2a322267b0964d6
Author:     Tomas Mozes <tmozes@sygic.com>
AuthorDate: 2019-02-04 11:07:34 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-02-04 13:39:41 +0000

    app-admin/syslog-ng: Revert "add version constraint on sys-devel/bison"
    
    This reverts commit 644c4d2379e2c9a8930a2e50450ef54c74b77e47
    because sys-devel/bison-3.3.2 fixed the issue.
    Closes: https://bugs.gentoo.org/677040
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/10978
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-admin/syslog-ng/syslog-ng-3.19.1.ebuild | 1 -
 1 file changed, 1 deletion(-)