Bug 177830
Summary: | urandom dummy function breaks builds | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan S. Shapiro <shap> | ||||||
Component: | flex | Assignee: | Petr Machata <pmachata> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
Severity: | high | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4 | CC: | mnewsome, mstefani | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | FC-4 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-01-25 16:34:42 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Jonathan S. Shapiro
2006-01-15 03:26:41 UTC
Okay. I have looked at the source. Contrary to the comment, urandom isn't called at all. This is a statically introduced name in the skeleton file that absolutely cannot be exported this way. Petr just didn't quite think this patch through properly. If the goal is to suppress warnings from GCC, it might make more sense to use attributes indicating that the procedure may be unused and no warning should be emitted. These, of course, need to be conditionalized according to whether GCC is in use. Also, while I have Petr's attention, the correction on use of cerr incorporated in this patch is not complete. There are a bunch of references to cerr that are emitted from gen.c. These should be prefixed with std:: as well. Petr doesn't seem to be working this weekend. I need to get some things done and I can't wait on this, so I fixed it myself. The attached patch is relative to flex-2.5.4a-35.fc4. I have removed Petr's dummy function from the skeleton file and replaced it with a conditionalized __attribute__() attached to the declaration of yy_flex_realloc(). This attribute is added *only* when compiling with GCC (because other compilers don't grok the attribute extension). It uses the __attribute__() form so that the qualifier will work even when compiling with --std=xxx. It is possible (indeed, it is is likely) that other functions will need to have YY_MAY_BE_UNUSED added to their declarations. I have not attempted an exhaustive search for them -- my priority was simply to get flex working again. This patch also updates gen.c to appropriately convert "cerr" to "std::cerr" in the diagnostics that are generated for debugging code. It is mildly surprising that these weren't included in Petr's patch, since they were easy enough to find with grep. All that is needed is to install the current flex source rpm, add the patch in the obvious places, and update the version number. I have sufficient IP rights to make this patch public, and I hereby jointly assign it to RedHat (which should be good enough, since my "commit" on this note is an electronic signature, but contact me if you need more). While you are tinkering with the SPEC file, please update the license to GPL (it currently says BSD, which is wrong) and you can then close https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115354 and also the one I filed about the license being wrong (which isn't showing up in the bug list yet). For those who need an immediate fix, you can pull an updated RPM from the Coyotos repository at http://srl.cs.jhu.edu/YUM/coyotos/4/i386. This version will be supersceded automatically when Petr releases the official fix, so you should be able to "install and forget." The source RPM can be found at http://srl.cs.jhu.edu/YUM/coyotos/SRPMS/ Created attachment 123219 [details]
Fix for warnings and missing std::cerr's emitted with -d
Created attachment 123220 [details]
Revised spec file with license update
You will certainly want to change the version number!
Hm, exactly... I realized that the patch is nonsense at the weekend, and I hoped nobody would crash on it until I get around to fix it properly. My bad. From User-Agent: XML-RPC flex-2.5.4a-36.fc4 has been pushed for FC4, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report. *** Bug 177813 has been marked as a duplicate of this bug. *** It is already pushed for final, so hopefully in a couple of hours. There is fixed version in testing already, if it is the option for you. The push came through, and I confirm the fix. This bug can be closed. Nice to see that my patch was useful, and your edit of the comment above YY_MAY_BE_UNUSED was a good call. Also, for anybody who pulled my binary RPM in desperation, I have also confirmed that this update correctly replaces my temporary fix. Thanks for the help, Jonathan. I'm closing the bug. |