Description of problem: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/bits/resource.ph file, as shipped with the package has syntax errors in lines 15, 17, 19 - 23. Version-Release number of selected component (if applicable): perl-5.8.5-16.RHEL4 How reproducible: Always. Steps to Reproduce: 1. Include the file in some other Perl (i.e. require 'resource.ph';) 2. Try to run. 3. Get: Compilation failed in require at XXXX.perl line YYY. Actual results: Compilation fails due to syntax errors. Expected results: The file should be shipped without syntax errors. Additional info: N/A
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