[Bug 42132] New: undefined reference yywrap in winhlp32/ macro.lex.yy.c when building with flex-2.6.3
https://bugs.winehq.org/show_bug.cgi?id=42132 Bug ID: 42132 Summary: undefined reference yywrap in winhlp32/macro.lex.yy.c when building with flex-2.6.3 Product: Wine Version: 2.0-rc3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: nvinson234(a)gmail.com Distribution: --- Created attachment 56679 --> https://bugs.winehq.org/attachment.cgi?id=56679 winhlp32-macro-flex-2.6.3-flex.patch Flex-2.6.3 uses C preprocessor macros to change the prefix of its functions from the standard yy to a user-defined one. This is a change in Flex behavior and causes wine to fail with any version of Flex newer than 2.6.1. The failure is caused because programs/winhlp32/macros.lex.l only defines the yywrap macro if it is not already defined. The end result is C code that is looking for an undefined yywrap() function. I have attached a patch that fixes this issue by removing the yywrap macro check and definition from macros.lex.l and adding the noyywrap flex option. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 --- Comment #1 from nvinson234(a)gmail.com --- Created attachment 56680 --> https://bugs.winehq.org/attachment.cgi?id=56680 build log showing error with flex-2.6.3 and wine-2.0-rc3 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Lars Wendler <polynomial-c(a)gentoo.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |polynomial-c(a)gentoo.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Danny Rawlins <monster.romster(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monster.romster(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 --- Comment #2 from Danny Rawlins <monster.romster(a)gmail.com> --- That attached patch solved my compile problem with flex 1.6.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest(a)luukku.com --- Comment #3 from winetest(a)luukku.com --- You need to send the patch to wine-patches list for it to get merged in wine. https://wiki.winehq.org/Submitting_Patches -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTOURBUG --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- The fix isn't quite enough: flex -omacro.lex.yy.c macro.lex.l gcc -m32 -c -o macro.lex.yy.o macro.lex.yy.c -I. -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe \ -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla \ -Wwrite-strings -Wpointer-arith -Wlogical-op -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer \ -Werror -g -O2 -fno-diagnostics-show-caret macro.lex.yy.c:398:0: error: "yywrap" redefined [-Werror] macro.lex.yy.c:74:0: note: this is the location of the previous definition cc1: all warnings being treated as errors Makefile:280: recipe for target 'macro.lex.yy.o' failed That's really a flex bug: https://github.com/westes/flex/issues/160 We could add a workaround, but let's see if we can't get it fixed first. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 --- Comment #5 from nvinson234(a)gmail.com --- (In reply to Alexandre Julliard from comment #4)
The fix isn't quite enough:
flex -omacro.lex.yy.c macro.lex.l gcc -m32 -c -o macro.lex.yy.o macro.lex.yy.c -I. -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe \ -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla \ -Wwrite-strings -Wpointer-arith -Wlogical-op -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer \ -Werror -g -O2 -fno-diagnostics-show-caret macro.lex.yy.c:398:0: error: "yywrap" redefined [-Werror] macro.lex.yy.c:74:0: note: this is the location of the previous definition cc1: all warnings being treated as errors
The yywrap macro redefinition error is a known issue. See https://github.com/wested/flex/issues/155 The workaround is to remove the -Werror flag. An alternate fix would be to define the yywrap function without the yywrap macro guard.
Makefile:280: recipe for target 'macro.lex.yy.o' failed
That's really a flex bug: https://github.com/westes/flex/issues/160
We could add a workaround, but let's see if we can't get it fixed first.
I personally doubt anything will be charged with respect to issue 160 given issue 113 and the reasons behind it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de URL| |https://github.com/westes/f | |lex/issues/160 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- This is now fixed in flex by https://github.com/westes/flex/commit/078b46c69d063aef1715b11348a2871d6036f2.... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Aaron <aa1ronham(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aa1ronham(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Merc <mercdb.fb(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mercdb.fb(a)gmail.com --- Comment #7 from Merc <mercdb.fb(a)gmail.com> --- Thanks flex for releasing shitty code for all of us and congrats on the wine dev team to rely on shitty code to build their platform, really awesome work guys. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42132 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Bruno Jesus <00cpxxx(a)gmail.com> --- Flex 2.6.4 was released. https://github.com/westes/flex/releases/tag/v2.6.4 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org