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@winehq.org Reporter: nvinson234@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.