Bug 2168170 - htmlcxx: Build in C89 mode due to undeclared functions in lexer/parser integration
Summary: htmlcxx: Build in C89 mode due to undeclared functions in lexer/parser integr...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: htmlcxx
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCExemptions
TreeView+ depends on / blocked
 
Reported: 2023-02-08 11:22 UTC by Florian Weimer
Modified: 2023-08-16 09:23 UTC (History)
1 user (show)

Fixed In Version: htmlcxx-0.86-19.fc38
Clone Of:
Environment:
Last Closed: 2023-02-08 11:36:19 UTC
Type: Bug
Embargoed:
fweimer: mirror+


Attachments (Terms of Use)

Description Florian Weimer 2023-02-08 11:22:14 UTC
Building the package with a compiler which does not support implicit function declarations currently fails:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c css_syntax.c  -fPIC -DPIC -o .libs/css_syntax.o
/usr/share/bison/bison.simple: In function 'yyparse':
/usr/share/bison/bison.simple:215:19: error: implicit declaration of function 'yylex'
/usr/share/bison/bison.simple:573:16: note: in expansion of macro 'YYLEX'
css_syntax.y:158:25: error: implicit declaration of function 'free'
  158 |                         free($1);
      |                         ^~~~


The missing declaration of free is easy enough to fix, but supplying a proper definition of yylex is difficult because the header defining yystype (a union) cannot be included from the parser: the generated parser C code contains a separate definition of that union.

Therefore, it is necessary to build the package in C89 mode.

Comment 1 Florian Weimer 2023-02-08 11:29:09 UTC
Upstream switched to a much newer Bison version, fixing these problems:

commit d3f6f2588206897ba4f2af04be8c1a01e7019284
Author: James Le Cuirot <chewi>
Date:   Fri Sep 16 10:09:36 2016 +0100

    Updated css_syntax.c generated with Bison 3.0.4 instead of 1.35

commit 807081583ea58b07a5ff2e0659f4173492befb8a
Author: James Le Cuirot <chewi>
Date:   Wed Sep 14 22:56:35 2016 +0100

    Update css_syntax.y for use with less ancient Bison
    
    New pregenerated css_syntax.c to follow.


Note You need to log in before you can comment on or make changes to this bug.