FS#39014 - [flex] 2.5.38-1: switch to shared library breaks AC_CHECK_LIB(fl, yywrap)

Attached to Project: Arch Linux
Opened by Jed Brown (jedbrown) - Sunday, 23 February 2014, 19:31 GMT
Last edited by Allan McRae (Allan) - Saturday, 20 February 2016, 02:04 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
In libfl, main calls yylex() while yywrap() was defined independently. Static libraries allowed the following autoconf-generated code to link with -fl.

char yywrap ();
int main ()
{
yywrap ();
return 0;
}

It also allowed -lfl to be added when not explicitly used (common in configure scripts that expand a LIBS variable). Now with shared libraries, -lfl cannot be used if yylex() is not defined. This can be worked around in packages like c2html by explicitly passing LEXLIB=-lfl (which suppresses the test), but I don't know if this side-effect was known.

I have asked on the flex-users mailing list, but I'm adding this ticket to clarify the issue if someone else stumbles upon it, and in case Arch would like to do something to mitigate this issue.

Additional info:
* flex-2.5.38-1

This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 20 February 2016, 02:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  Was fixed in 2.6.0
Comment by Allan McRae (Allan) - Sunday, 23 February 2014, 21:33 GMT
can you confirm that adding options=('staticlibs') and rebuilding the package fixes this issue for you?
Comment by Jed Brown (jedbrown) - Sunday, 23 February 2014, 21:47 GMT
It does not fix the problem because gcc picks up the shared library by default. The configure test would have to be changed to use -static.

The flex-help list appears to be moderated so my message hasn't appeared on the website or gotten a reply yet.
Comment by Allan McRae (Allan) - Friday, 16 May 2014, 10:47 GMT

Loading...