Re: Sudden death of PDF::API2
On 2009–02–15, at 14:01, Landry Le Chevanton wrote: This recipe worked for me so far. Looking at the contents of the update (via Flat Package Editor and lsbom), it appears that, as well as /usr/bin/perl, its shared library and its documentation, the entire set of standard XS-based modules in / System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto has been replaced. This makes sense: they depend on the shared perl library, which has been updated. This means that restoring the following from a back-up (if you have one) should do the trick: /System/Library/Perl/5.8.8/ /usr/bin/perl /usr/bin/perl-5.8.8 /usr/bin/perlbug although this will leave you with an installation suffering from the arcane malformed Unicode-related security issue that the update was supposed to address. (See http://support.apple.com/kb/HT3438.) -- Dominic Dunlop
Re: Sudden death of PDF::API2
On 15 Feb 2009, at 13:01, Landry Le Chevanton wrote: I did also had problems with perl scripts after installing the security patch. Strategy for fixing has been worked out and reported here: http://bulknews.typepad.com/blog/2009/02/mac-os-x-security-update-2009001-br eaks-perl-cpan.html As well as in Apple forum http://discussions.apple.com/thread.jspa?threadID=1905157tstart=0 Thank you very much for these links, which confirmed it was the security patch which was the cause of the problem and gave a good start on how to go about fixing the matter. This recipe worked for me so far. I reinstalled IO-1.2301 and Compress-Zlib but this did not restore functionality to PDF::API2. Running one of the 'example scripts' provided in the documentation for Zlib.pm resulted in an error involving 'dualval' which turned out to be a subroutine in Scalar::Utils which is 'use'd by Zlib.pm. Reinstalling Scalar-List-Utils-1.19 fixed that problem and also (thankfully) restored PDF::API2. I am not sure what happened to Scalar::Utils when the security patch was applied but I have a suspicion it might have been deleted? Whilst these measures have fixed my immediate problems with Perl I fear we may yet see some more bugs emerging from the woodwork as time goes on. I am most grateful for your help, Kind regards, Alan Landry Le 15/02/09 12:10, « Alan Fry » a...@afco.demon.co.uk a écrit : I have an Intel MacPro running Mac OS X 10.5.6 (Perl 5.8.8) and a copy of PDF::API2. This has worked flawlessly for a long time. Suddenly it has failed. There have been no changes at all to the machine apart from a recent 'Security Update', which I think had to do mostly with a loophole in Safari. This minimal script: my $pdf_in = PDF::API2-open($file_in) or die $!\n; my $pdf_out = PDF::API2-new or die $!\n; $page = $pdf_out-page; $page-mediabox(595, 842); $gfx = $page-gfx; #$xo = $pdf_out-importPageIntoForm($pdf_in, 1); #$gfx-formimage($xo, 0, 0, 1); fails with the error message: Undefined subroutine Compress::Zlib::compress called at /Library/ Perl/ 5.8.8/PDF/API2/Content.pm line 103. However the folder 'Compress' is there, (alongside the folder 'PDFwhich contains the module), the file 'Zlib' in that folder, and Zlib has a subroutine named 'compress'. So what can possibly have gone wrong here? If the last two lines above are uncommented, the error message becomes: Can't call method infilt on an undefined value at /Library/Perl/ 5.8.8/PDF/API2/Util.pm line 667. presumably as a result of failure to access Zlib subroutines? I have run 'repair permissions' which has not altered the situation and run out of ideas of what to do next. I would be most grateful if anyone could help. Alan Fry
Re: Sudden death of PDF::API2
On Mon, Feb 16, 2009 at 4:53 AM, Alan Fry a...@afco.demon.co.uk wrote: I am not sure what happened to Scalar::Utils when the security patch was applied but I have a suspicion it might have been deleted? Looks to me like the security patch included updated .dylibs for a number of core Perl modules, but didn't include the .pm files. So, for those who had updated those modules with newer versions from CPAN, that left a mismatch between the version number in the .pm and the .dylib. In some cases, it appears that the newer .pm (from CPAN) also tries to export functions that don't actually exist in the older (i.e. core Perl) .dylib. I suspect that these updates are created by an automated process that looks to see what files have actually been changed, and that process was run against a virgin OS install in which none of the core Perl modules had been updated from CPAN. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Sudden death of PDF::API2
I did also had problems with perl scripts after installing the security patch. Strategy for fixing has been worked out and reported here: http://bulknews.typepad.com/blog/2009/02/mac-os-x-security-update-2009001-br eaks-perl-cpan.html As well as in Apple forum http://discussions.apple.com/thread.jspa?threadID=1905157tstart=0 This recipe worked for me so far. Landry Le 15/02/09 12:10, « Alan Fry » a...@afco.demon.co.uk a écrit : I have an Intel MacPro running Mac OS X 10.5.6 (Perl 5.8.8) and a copy of PDF::API2. This has worked flawlessly for a long time. Suddenly it has failed. There have been no changes at all to the machine apart from a recent 'Security Update', which I think had to do mostly with a loophole in Safari. This minimal script: my $pdf_in = PDF::API2-open($file_in) or die $!\n; my $pdf_out = PDF::API2-new or die $!\n; $page = $pdf_out-page; $page-mediabox(595, 842); $gfx = $page-gfx; #$xo = $pdf_out-importPageIntoForm($pdf_in, 1); #$gfx-formimage($xo, 0, 0, 1); fails with the error message: Undefined subroutine Compress::Zlib::compress called at /Library/Perl/ 5.8.8/PDF/API2/Content.pm line 103. However the folder 'Compress' is there, (alongside the folder 'PDFwhich contains the module), the file 'Zlib' in that folder, and Zlib has a subroutine named 'compress'. So what can possibly have gone wrong here? If the last two lines above are uncommented, the error message becomes: Can't call method infilt on an undefined value at /Library/Perl/ 5.8.8/PDF/API2/Util.pm line 667. presumably as a result of failure to access Zlib subroutines? I have run 'repair permissions' which has not altered the situation and run out of ideas of what to do next. I would be most grateful if anyone could help. Alan Fry
Re: Sudden death of PDF::API2
--As of February 15, 2009 11:10:33 AM +, Alan Fry is alleged to have said: I have an Intel MacPro running Mac OS X 10.5.6 (Perl 5.8.8) and a copy of PDF::API2. This has worked flawlessly for a long time. Suddenly it has failed. There have been no changes at all to the machine apart from a recent 'Security Update', which I think had to do mostly with a loophole in Safari. --As for the rest, it is mine. From the notes on the recent Security Update: perl CVE-ID: CVE-2008-1927 Available for: Mac OS X v10.4.11, Mac OS X Server v10.4.11, Mac OS X v10.5.6, Mac OS X Server v10.5.6 Impact: Using regular expressions containing UTF-8 characters may lead to an unexpected application termination or arbitrary code execution Description: A memory corruption issue exists in the handling of certain UTF-8 characters in regular expressions. Parsing maliciously crafted regular expressions may lead to an unexpected application termination or arbitrary code execution. This update addresses the issue by performing additional validation of regular expressions. So, they definitely updated Perl. Likely any/all XS modules will need to be recompiled. I'd _hope_ that Apple updated the ones they shipped, but you'll still have to update any you've installed yourself. (I haven't gotten around to installing the update myself yet...) Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---