Bug 170088
| Summary: | bits/resource.ph has syntax errors | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Bojan Smojver <bojan> |
| Component: | perl | Assignee: | Jason Vas Dias <jvdias> |
| Status: | CLOSED ERRATA | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.0 | CC: | poelstra, prockai, sean.oconnell |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | RHSA-2005-880 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-12-20 14:30:16 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 168429, 172256 | ||
|
Description
Bojan Smojver
2005-10-07 04:47:34 UTC
This problem is not specific to RHEL-4, but occurs with all linux perl versions.
There is no 'resource.ph' - you mean 'sys/resource.ph', which includes
'bits/resource.ph' .
The include dependencies are:
'sys/resource.ph' -> 'bits/resource.ph' -> 'bits/types.h' -> 'stddef.ph' .
Unfortunately, there is no 'stddef.ph' - there is only 'linux/stddef.ph' .
You can workaround this problem by adding this directory to @INC:
'push @INC, "/usr/lib/perl-${PERL_VERSION}/${ARCH}-linux-thread-multi/linux";
require "sys/resource.ph";
'
It appears that the 'linux/' include directory is in the gcc standard
include path, but not in the perl standard @INC path.
I'll consider adding this directory to the standard @INC path in the next
PERL version.
I have no idea what all this really means as I'm not really a Perl guy, but
maybe there is a way to fix syntax errors by including different files. Anyway,
the compiler doesn't like lines like this (I picked these from one of my FC4
boxes, but RHEL4 has similar lines):
-------------------------
eval("sub () { 6; }") unless defined(&);
eval("sub () { 1; }") unless defined(&);
eval("sub () { 7; }") unless defined(&);
eval("sub () { 8; }") unless defined(&);
eval("sub () { 9; }") unless defined(&);
eval("sub () { 10; }") unless defined(&);
eval("sub () { 11; }") unless defined(&);
-------------------------
Basically, it appears that there must be something _after_ sub and _before_ ()
in order for the line to be valid Perl. Like this:
-------------------------
eval("sub RLIMIT_CPU () { 0; }") unless defined(&RLIMIT_CPU);
-------------------------
When I hose the lines with nothing after sub, everything works.
Current Rawhide ( perl-5.8.7-0.5.fc5) doesn't have any of these syntax errors.
The files looks different.
OK, sorry, it appears there are 2 problems here :
1. perl-5.8.5's h2ph generates incorrect headers with missing names for
subroutines, as in :
---
eval("sub () { x; }") unless defined(&);
---
should be:
---
eval("sub CONST_NAME () { x; }") unless defined(&CONST_NAME);
---
This problem is specific to the perl-5.8.5 version in RHEL-4 .
2. The C-standard headers (eg. stddef.h, stdarg.h, syslimits.h)
are not being picked up from the right location on
Linux / glibc / gcc systems :
/usr/lib/gcc-${arch}-${os}/${gcc-version}/include/
but instead are being looked for in incorrect locations, eg.
/usr/include/linux/stddef.h : stddef.h used by the kernel
syslimits.h : not found
resulting in missing include dependencies for all PERL versions on Linux.
This bug, which describes problem 1 in comment #3: > 1. perl-5.8.5's h2ph generates incorrect headers with missing names for > subroutines is a duplicate of upstream an perl bug: # 34498 - h2ph unable to parse definitions inside enumerations ( http://rt.perl.org/rt3/Ticket/Display.html?id=34498 ) that is fixed with the h2ph from perl-5.8.7 . I've generated a patch from perl-5.8.7 to the RHEL-4 5.8.5 h2ph which fixes this problem, in versions >= perl-5.8.5-17.RHEL4 . This should be in a RHEL-4 update release shortly. Problem 2 of comment #3: > 2. The C-standard headers (eg. stddef.h, stdarg.h, syslimits.h) > are not being picked up is covered by bug 172236, also to be fixed in perl-5.8.5-17.RHEL4. Brilliant. Thanks! Is there an ETA for perl-5.8.5-17? (In reply to comment #7) > Is there an ETA for perl-5.8.5-17? perl-5.8.5-17.RHEL4 is a candidate for the next RHEL-4 update release (U3). Meanwhile, it can be downloaded from: http://people.redhat.com/~jvdias/perl/RHEL-4 Please try out this version and let me know of any issues - thanks. Sorry, I've been a little lazy on this. Downloading now... From User-Agent: XML-RPC perl-5.8.5-18.FC3 has been pushed for FC3, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report. The looks good here. No complaints so far. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2005-880.html |