Fixing Perl object version mismatch for icalds

After installing the Security Update 2009-001 on my Mac (OS X 10.5.6) this week-end, my icalds Sun-iCal calendar sync script stopped working with the following error message at start-up :

Sys::Syslog object version 0.13 does not match bootstrap parameter 0.24 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/Sys/Syslog.pm line 69.
Compilation failed in require at .../icalds.pl line 23.
BEGIN failed--compilation aborted at .../icalds.pl line 23.

Searching the web on the topic, I learned that this means the Syslog.pm perl file is out of sync with the Syslog.so native library on my system. I am guessing that the Apple Security Update has partially upgraded Perl and left the Perl installation in a broken state. I thus needed to perform a re-install of the Sys::Syslog module to fix the object version mismatch. It took some more effort than anticipated --in the same vein of there is no 5-minute benchmarks-- so I thought I'd share my trials here --filtering out the errors from my trials-n-errors to keep it short :).

I entered the CPAN Perl archive as follows --I entered my own password, I have admin rights.

$ sudo perl -MCPAN -e shell
Password:
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> 
I quickly realized though that my CPAN mirror was no longer responding. Bad luck.
cpan> install Sys::Syslog
CPAN: Storable loaded ok
Going to read ~/.cpan/Metadata
  Database was generated on Mon, 02 Jun 2008 04:06:52 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://ftp.inria.fr/pub/CPAN/authors/01mailrc.txt.gz
LWP failed with code[500] message[]
Fetching with Net::FTP:
  ftp://ftp.inria.fr/pub/CPAN/authors/01mailrc.txt.gz
Issuing "/usr/bin/ftp -n"
Connected to ftp-c.inria.fr.
421 Service not available, remote server has closed connection.
Not connected.
Local directory now: ~/.cpan/sources/authors
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.inria.fr/pub/CPAN/authors/01mailrc.txt.gz.

Please check, if the URLs I found in your configuration file
(ftp://ftp.inria.fr/pub/CPAN/) are valid. The urllist can be edited. E.g.
with 'o conf urllist push ftp://myurl/'

Could not fetch authors/01mailrc.txt.gz
I googled for new mirror sites and entered them as follows.
cpan> o conf
CPAN::Config options from /System/Library/Perl/5.8.8/CPAN/Config.pm:
    commit             Commit changes to disk
(...)
    urllist           
	ftp://ftp.inria.fr/pub/CPAN/

cpan> o conf urllist push http://cpan.cict.fr/

cpan> o conf urllist push http://cpan.mirrors.easynet.fr/

cpan> o conf urllist shift

cpan> o conf
CPAN::Config options from /System/Library/Perl/5.8.8/CPAN/Config.pm:
    commit             Commit changes to disk
(...)
    urllist           
	http://cpan.cict.fr/
	http://cpan.mirrors.easynet.fr/

cpan> o conf commit
commit: wrote /System/Library/Perl/5.8.8/CPAN/Config.pm

Great... I am all set then... I can re-install Sys::Syslog... Bummer! It is fine according to CPAN and I see no way in the help section to force a re-install of that module.

cpan> install Sys::Syslog
Sys::Syslog is up to date.

cpan> help

Display Information
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about anything of above
 r        NONE              reinstall recommendations
 ls       AUTHOR            about files in the author's directory

Download, Test, Make, Install...
 get                        download
 make                       make (implies get)
 test      MODULES,         make test (implies make)
 install   DISTS, BUNDLES   make install (implies test)
 clean                      make clean
 look                       open subshell in these dists' directories
 readme                     display these dists' README files

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                force cmd     unconditionally do cmd

With no clear intentions initially, I ended up upgrading CPAN which now provides more options.

$ sudo perl -MCPAN -e shell
CPAN: File::HomeDir loaded ok (v0.69)

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled

cpan[1]> help                                                                                                                                                               

Display Information                                                (ver 1.9205)
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about any of the above
 ls       AUTHOR or GLOB    about files in the author's directory
    (with WORD being a module, bundle or author name or a distribution
    name of the form AUTHOR/DISTRIBUTION)

Download, Test, Make, Install...
 get      download                     clean    make clean
 make     make (implies get)           look     open subshell in dist directory
 test     make test (implies make)     readme   display these README files
 install  make install (implies test)  perldoc  display POD documentation

Upgrade
 r        WORDs or /REGEXP/ or NONE    report updates for some/matching/all modules
 upgrade  WORDs or /REGEXP/ or NONE    upgrade some/matching/all modules

Pragmas
 force  CMD    try hard to do command  fforce CMD    try harder
 notest CMD    skip testing

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                recent        latest CPAN uploads
One of them should work... Yes!
cpan[7]> force install Sys::Syslog                                                                                                                                          
Running install for module 'Sys::Syslog'
Running make for S/SA/SAPER/Sys-Syslog-0.24.tar.gz
Checksum for ~/.cpan/sources/authors/id/S/SA/SAPER/Sys-Syslog-0.24.tar.gz ok
Sys-Syslog-0.24
Sys-Syslog-0.24/Changes
Sys-Syslog-0.24/eg
Sys-Syslog-0.24/fallback
Sys-Syslog-0.24/Makefile.PL
Sys-Syslog-0.24/MANIFEST
Sys-Syslog-0.24/META.yml
Sys-Syslog-0.24/ppport.h
Sys-Syslog-0.24/README
Sys-Syslog-0.24/README.win32
Sys-Syslog-0.24/Syslog.pm
Sys-Syslog-0.24/Syslog.xs
Sys-Syslog-0.24/t
Sys-Syslog-0.24/win32
Sys-Syslog-0.24/win32/compile.pl
Sys-Syslog-0.24/win32/PerlLog.mc
Sys-Syslog-0.24/win32/PerlLog.RES
Sys-Syslog-0.24/win32/PerlLog_dll.uu
Sys-Syslog-0.24/win32/PerlLog_RES.uu
Sys-Syslog-0.24/win32/Win32.pm
Sys-Syslog-0.24/t/00-load.t
Sys-Syslog-0.24/t/constants.t
Sys-Syslog-0.24/t/distchk.t
Sys-Syslog-0.24/t/pod.t
Sys-Syslog-0.24/t/podcover.t
Sys-Syslog-0.24/t/podspell.t
Sys-Syslog-0.24/t/portfs.t
Sys-Syslog-0.24/t/syslog.t
Sys-Syslog-0.24/fallback/const-c.inc
Sys-Syslog-0.24/fallback/const-xs.inc
Sys-Syslog-0.24/fallback/syslog.h
Sys-Syslog-0.24/eg/syslog.pl

  CPAN.pm: Going to build S/SA/SAPER/Sys-Syslog-0.24.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Sys::Syslog
Could not read '~/.cpan/build/Sys-Syslog-0.24-qUIpeP/META.yml'. Falling back to other methods to determine prerequisites
cp Syslog.pm blib/lib/Sys/Syslog.pm
/usr/bin/perl /System/Library/Perl/5.8.8/ExtUtils/xsubpp -noprototypes -typemap /System/Library/Perl/5.8.8/ExtUtils/typemap  Syslog.xs > Syslog.xsc && mv Syslog.xsc Syslog.c
cc -c   -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3   -DVERSION=\\"0.24\\" -DXS_VERSION=\\"0.24\\"  "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE"  -DUSE_PPPORT_H Syslog.c
Running Mkbootstrap for Sys::Syslog ()
chmod 644 Syslog.bs
rm -f blib/arch/auto/Sys/Syslog/Syslog.bundle
cc -mmacosx-version-min=10.5.6  -arch i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib Syslog.o  -o blib/arch/auto/Sys/Syslog/Syslog.bundle 	\\
	     	\\
	  
chmod 755 blib/arch/auto/Sys/Syslog/Syslog.bundle
cp Syslog.bs blib/arch/auto/Sys/Syslog/Syslog.bs
chmod 644 blib/arch/auto/Sys/Syslog/Syslog.bs
Manifying blib/man3/Sys::Syslog.3pm
  SAPER/Sys-Syslog-0.24.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/\*.t
t/00-load........1/1 # Testing Sys::Syslog 0.24, Perl 5.008008, /usr/bin/perl
t/00-load........ok   
t/constants......ok     
t/distchk........skipped: Test::Distribution required for checking distribution
t/pod............skipped: Test::Pod 1.14 required for testing POD
t/podcover.......skipped: Test::Pod::Coverage 1.06 required for testing POD coverage
t/podspell.......skipped: Pod spelling: for developer interest only :)
t/portfs.........skipped: Test::Portability::Files required for testing filenames portability
t/syslog.........ok       
All tests successful.
Files=8, Tests=290,  1 wallclock secs ( 0.05 usr  0.02 sys +  0.23 cusr  0.05 csys =  0.35 CPU)
Result: PASS
  SAPER/Sys-Syslog-0.24.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make install
Prepending ~/.cpan/build/Sys-Syslog-0.24-qUIpeP/blib/arch ~/.cpan/build/Sys-Syslog-0.24-qUIpeP/blib/lib to PERL5LIB for 'install'
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Sys/Syslog/Syslog.bundle
Writing /System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Sys/Syslog/.packlist
Appending installation info to /System/Library/Perl/5.8.8/darwin-thread-multi-2level/perllocal.pod
  SAPER/Sys-Syslog-0.24.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

How open innovation and technology adoption translates to business value, with stories from our developer support work at Oracle's ISV Engineering.

Subscribe

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
5
6
8
9
10
11
12
13
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Feeds